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 770742 - Add 'need feature' API for marking important backend features as needed
Add 'need feature' API for marking important backend features as needed
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-09-02 09:00 UTC by Jonas Ådahl
Modified: 2018-04-15 00:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk: Add 'need feature' API (4.54 KB, patch)
2016-09-02 09:00 UTC, Jonas Ådahl
none Details | Review
gtk: Mark exporting as a needed feature if using portals (946 bytes, patch)
2016-09-02 09:00 UTC, Jonas Ådahl
none Details | Review

Description Jonas Ådahl 2016-09-02 09:00:02 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.
Comment 1 Jonas Ådahl 2016-09-02 09:00:07 UTC
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.
Comment 2 Jonas Ådahl 2016-09-02 09:00:13 UTC
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.
Comment 3 Matthias Clasen 2018-02-10 05:11:08 UTC
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.
Comment 4 Matthias Clasen 2018-04-15 00:39:28 UTC
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