GNOME Bugzilla – Bug 754889
Fix compositor synchronization in GDK backend
Last modified: 2015-09-11 22:42:00 UTC
Even though we are synchronized with the compositor in the GDK backend, it doesn't work properly when using Clutter inside GTK+, because we're currently hooked to the "update" signal of the FrameClock. When embedding Clutter inside GTK+ we want to have the layout phase of GTK+ to notify us the size of our stage before we actually do our layout/paint phases.
Created attachment 311160 [details] [review] gdk: master clock: hook ourselves to the paint signal We're currently hooked to the "update" signal of the FrameClock. When embedding Clutter inside GTK+ we want to have the layout phase of GTK+ to notify us the size of our stage. This patch change to FrameClock signal we're listening to, to the "paint" signal to make sure we've received the layout information from GTK+, before painting. Otherwise we paint with a delay of one frame.
Review of attachment 311160 [details] [review]: I assume you also tested the non-embedding case, and it's still working. ;-) In theory, it should be fine: we relayout on paint anyway, as our frame clock does not have separate phases like the GDK one.
Review of attachment 311160 [details] [review]: Tested indeed :)
Review of attachment 311160 [details] [review]: Pushed to master.