GNOME Bugzilla – Bug 762888
[PATCH] backend: check for wayland before x11
Last modified: 2016-11-30 09:47:41 UTC
gtk+ ordering was changed a while ago, use the same ordering for clutter-gtk applications to work seemlessly
Created attachment 322691 [details] [review] check for wayland before x11
Review of attachment 322691 [details] [review]: Okay, I don't have actual objections, except one remark: Clutter-GTK applications should be using the GDK backend, not the Wayland or the X11 one. Is this something you observed in an actual application?
I have clutter built with only the x11 and wayland backends, if I launch any clutter-gtk app, it fails with unsupported backend (gnome-control-center, totem, cheese, ...). Exporting CLUTTER_BACKEND=wayland makes them work. Rebuilding clutter adding the gdk backend ends up with the same failure, and exporting CLUTTER_BACKEND=wayland makes them work then too.
Fwiw, just rebuilt it with • Clutter Backends: Windowing systems: x11 gdk wayland egl Input backends: x11 gdk wayland evdev Cogl drivers: * Here is what I get with each backend (the wayland one works) keruspe@Lou ~ % CLUTTER_BACKEND=gdk gnome-control-center (gnome-control-center:16524): Clutter-Gtk-ERROR **: *** Unsupported backend. zsh: trace trap (core dumped) CLUTTER_BACKEND=gdk gnome-control-center keruspe@Lou ~ % CLUTTER_BACKEND=x11 gnome-control-center (gnome-control-center:16536): Clutter-Gtk-ERROR **: *** Unsupported backend. zsh: trace trap (core dumped) CLUTTER_BACKEND=x11 gnome-control-center keruspe@Lou ~ % CLUTTER_BACKEND=egl gnome-control-center (gnome-control-center:16548): Clutter-ERROR **: No default Clutter backend found. zsh: trace trap (core dumped) CLUTTER_BACKEND=egl gnome-control-center keruspe@Lou ~ % CLUTTER_BACKEND=wayland gnome-control-center keruspe@Lou ~ %
(In reply to Marc-Antoine Perennou from comment #3) > I have clutter built with only the x11 and wayland backends, if I launch any > clutter-gtk app, it fails with unsupported backend (gnome-control-center, > totem, cheese, ...). Then it may very well be a bug inside Clutter-GTK. > Exporting CLUTTER_BACKEND=wayland makes them work. > Rebuilding clutter adding the gdk backend ends up with the same failure, and > exporting CLUTTER_BACKEND=wayland makes them work then too. Are you building Clutter-GTK correctly? Are you linking it correctly?
Rebuilding clutter-gtk after enabling the gdk backend indeed makes both the gdk and wayland backends work (so no need for exporting the CLUTTER_BACKEND anymore as gdk has priority). This fixes my problem but I still think the patch is a good idea to match the gtk+ ordering. (From what I saw in the bugzilla, wayland used to be before x11, and it was inverted because gtk+ had x11 before wayland at this moment)
Review of attachment 322691 [details] [review]: Commited as 55093e304ec0c8cdc287ed933f4d78ca6eea5e07