summaryrefslogtreecommitdiff
path: root/gdk/gdkinternals.h
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2012-09-26 10:28:06 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2013-02-14 17:19:49 -0500
commita69285da08a2a61d5fd817ee8ccb88a6b6deaef6 (patch)
treec4fdef3922ea6eca4d1e16ef320b3a6760cbe09b /gdk/gdkinternals.h
parent05386b44e04bc23e6cd68b74dd9047b874a2020b (diff)
downloadgtk+-a69285da08a2a61d5fd817ee8ccb88a6b6deaef6.tar.gz
Compress motion synchronized with the paint cycle
When we have pending motion events, instead of delivering them directly, request the new FLUSH_EVENTS phase of the frame clock. This allows us to compress repeated motion events sent to the same window. In the FLUSH_EVENTS phase, which occur at priority GDK_PRIORITY_EVENTS + 1, we deliver any pending motion events then turn off event delivery until the end of the next frame. Turning off event delivery means that we'll reliably paint the compressed motion events even if more have arrived. Add a motion-compression test case which demonstrates behavior when an application takes too long handle motion events. It is unusable without this patch but behaves fine with the patch. https://bugzilla.gnome.org/show_bug.cgi?id=685460
Diffstat (limited to 'gdk/gdkinternals.h')
-rw-r--r--gdk/gdkinternals.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index fb561e6f74..babef6e7f6 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -300,6 +300,9 @@ GList* _gdk_event_queue_insert_after (GdkDisplay *display,
GList* _gdk_event_queue_insert_before(GdkDisplay *display,
GdkEvent *after_event,
GdkEvent *event);
+
+void _gdk_event_queue_handle_motion_compression (GdkDisplay *display);
+
void _gdk_event_button_generate (GdkDisplay *display,
GdkEvent *event);