GNOME Bugzilla – Bug 770742
Add 'need feature' API for marking important backend features as needed
Last modified: 2018-04-15 00:39:28 UTC
The idea behind this API is to make it possible for GTK+ or applications to mark some features it "needs" as extra important, so that GDK can fall back on X11 if there are no compatible protocol versions available via Wayland. For example a drawing application that uses tablets built using GTK+ 3.22, using the unstable tablet protocol, running on a future compositor with only the future stable (thus incompatible with the current tablet protocol) should fall back on X11, so that it has a higher chance of functioning properly. Honenstly, I'm not very fond of the API, or the concept in general, but uploading it here anyway (with an example usage that makes GDK fall back on X11 if there is no compatible xdg-foreign protocol available). A more robust solution, although a pity, would be for the GNOME 3.22 Flatpak runtime to ship a GTK+ 3.22 that defaults to using the X11 backend, and wait until hopefully the GNOME 3.24 Flatpak runtime to default to Wayland.
Created attachment 334624 [details] [review] gdk: Add 'need feature' API Add an API for GTK+ or GTK+ using applications to mark what features is needed. GDK will then try to select a backend that works the best, given the needed features. In practice, this means that an application using for example tablets can declare the need for using tablets and if Wayland compositor doesn't have a compatible tablet protocol advertised, it can fall back to X11.
Created attachment 334625 [details] [review] gtk: Mark exporting as a needed feature if using portals Add 'GDK_FEATURE_WAYLAND_EXPORT' as a needed feature if portals are to be used. This means that if a Wayland compositor doesn't have a compatible xdg-foreign version, GDK will fallback to X11.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new