]> Pileus Git - ~andy/gtk/commit
Compress motion synchronized with the paint cycle
authorOwen W. Taylor <otaylor@fishsoup.net>
Wed, 26 Sep 2012 14:28:06 +0000 (10:28 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Thu, 14 Feb 2013 22:19:49 +0000 (17:19 -0500)
commita69285da08a2a61d5fd817ee8ccb88a6b6deaef6
treec4fdef3922ea6eca4d1e16ef320b3a6760cbe09b
parent05386b44e04bc23e6cd68b74dd9047b874a2020b
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
gdk/gdkdisplay.c
gdk/gdkdisplayprivate.h
gdk/gdkevents.c
gdk/gdkframeclock.c
gdk/gdkframeclock.h
gdk/gdkframeclockidle.c
gdk/gdkinternals.h
gdk/gdkwindow.c
tests/Makefile.am
tests/motion-compression.c [new file with mode: 0644]