After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734906 - Unpainted GtkClutterEmbed with GDK backend
Unpainted GtkClutterEmbed with GDK backend
Status: RESOLVED FIXED
Product: clutter-gtk
Classification: Platform
Component: GtkClutterEmbed
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-gtk maintainer(s)
clutter-gtk maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-16 14:03 UTC by Lionel Landwerlin
Modified: 2014-08-18 22:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk-clutter-embed: use draw() from Gtk+ as Expose event for the GDK backend (2.33 KB, patch)
2014-08-16 14:04 UTC, Lionel Landwerlin
committed Details | Review
gtk-clutter-embed: don't use queue redraw on gtk+'s draw() (1.34 KB, patch)
2014-08-17 20:35 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2014-08-16 14:03:32 UTC
GtkClutterEmbed puts a filter on its GdkWindow to capture events and pass them to the ClutterBackend. That works well for X11, because the filter function receives an XEvent that can be directly fed to the ClutterX11Backend.

For the GDK backend we can't do this because the filter function provides an untranslated event to the callee. Thus we can't give a valid GdkEvent to the ClutterGDKBackend.

To work around this problem the current GtkClutterEmbed listen to the 'event' signal of its widget, and puts fed them to the ClutterGDKBackend.

The problem with this is that Gtk+ already does some filtering, mostly on Expose events. This means that initially a GtkClutterEmbed often appears unpainted with the Gdk backend of Clutter.
Comment 1 Lionel Landwerlin 2014-08-16 14:04:00 UTC
Created attachment 283594 [details] [review]
gtk-clutter-embed: use draw() from Gtk+ as Expose event for the GDK backend
Comment 2 Emmanuele Bassi (:ebassi) 2014-08-17 10:10:59 UTC
Review of attachment 283594 [details] [review]:

looks good.
Comment 3 Lionel Landwerlin 2014-08-17 18:43:17 UTC
I'm going to reverse this one. It triggers a never ending loop of redraw, because the toolkits have different paint cycle.
Comment 4 Lionel Landwerlin 2014-08-17 20:35:27 UTC
Created attachment 283685 [details] [review]
gtk-clutter-embed: don't use queue redraw on gtk+'s draw()
Comment 5 Emmanuele Bassi (:ebassi) 2014-08-18 16:20:33 UTC
Review of attachment 283685 [details] [review]:

okay.