[GTK] Remove GDK dependency from SharedTimerGtk
[WebKit-https.git] / Source / WebCore / platform / gtk / SharedTimerGtk.cpp
index bdc3c55..74c6f70 100644 (file)
@@ -28,7 +28,6 @@
 #include "config.h"
 #include "SharedTimer.h"
 
-#include <gdk/gdk.h>
 #include <wtf/gobject/GMainLoopSource.h>
 
 namespace WebCore {
@@ -47,8 +46,10 @@ void setSharedTimerFireInterval(double interval)
 {
     ASSERT(sharedTimerFiredFunction);
 
+    // This is GDK_PRIORITY_REDRAW, but we don't want to depend on GDK here just to use a constant.
+    static const int priority = G_PRIORITY_HIGH_IDLE + 20;
     gSharedTimer.scheduleAfterDelay("[WebKit] sharedTimerTimeoutCallback", std::function<void()>(sharedTimerFiredFunction),
-        std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(interval)), GDK_PRIORITY_REDRAW);
+        std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(interval)), priority);
 }
 
 void stopSharedTimer()