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 762888 - [PATCH] backend: check for wayland before x11
[PATCH] backend: check for wayland before x11
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-29 18:55 UTC by Marc-Antoine Perennou
Modified: 2016-11-30 09:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check for wayland before x11 (1.26 KB, patch)
2016-02-29 18:55 UTC, Marc-Antoine Perennou
committed Details | Review

Description Marc-Antoine Perennou 2016-02-29 18:55:04 UTC
gtk+ ordering was changed a while ago, use the same ordering for clutter-gtk applications to work seemlessly
Comment 1 Marc-Antoine Perennou 2016-02-29 18:55:55 UTC
Created attachment 322691 [details] [review]
check for wayland before x11
Comment 2 Emmanuele Bassi (:ebassi) 2016-02-29 19:09:21 UTC
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?
Comment 3 Marc-Antoine Perennou 2016-02-29 19:22:19 UTC
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.
Comment 4 Marc-Antoine Perennou 2016-02-29 19:27:12 UTC
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 ~ %
Comment 5 Emmanuele Bassi (:ebassi) 2016-02-29 19:45:33 UTC
(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?
Comment 6 Marc-Antoine Perennou 2016-02-29 19:50:03 UTC
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)
Comment 7 Marc-Antoine Perennou 2016-11-30 09:47:20 UTC
Review of attachment 322691 [details] [review]:

Commited as 55093e304ec0c8cdc287ed933f4d78ca6eea5e07