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 744172 - Wayland: Clients won't work on compositors that support wl_seat < 4
Wayland: Clients won't work on compositors that support wl_seat < 4
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.15.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-02-08 16:54 UTC by Pier Luigi Fiorini
Modified: 2015-02-14 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that respects lower wl_seat versions (1.30 KB, patch)
2015-02-08 16:54 UTC, Pier Luigi Fiorini
none Details | Review
Add Reviewed by Daniel Stone (1.36 KB, patch)
2015-02-10 13:43 UTC, Pier Luigi Fiorini
none Details | Review
patch v3 (1.62 KB, patch)
2015-02-11 06:46 UTC, Pier Luigi Fiorini
accepted-commit_now Details | Review

Description Pier Luigi Fiorini 2015-02-08 16:54:21 UTC
Created attachment 296391 [details] [review]
Patch that respects lower wl_seat versions

With commit 61f0ed80 the wl_seat requirement was bumped to version 4, instead of 3 however this will cause GTK+ clients to not work with compositors supporting a lower wl_seat version.

A better practice would be to min-bound the version requirement.

wl_seat 4 introduces a request for keyboard repeat information.
The code seems to deal with the fact that this information might not be available, it only need to accept lower versions.

It's not reasonable to expect all compositors have the latest version all at once, especially considering that a distro might ship a newer GTK+ version and an older compositor version.
Comment 1 Pier Luigi Fiorini 2015-02-10 13:43:11 UTC
Created attachment 296507 [details] [review]
Add Reviewed by Daniel Stone

Daniel Stone reviewed this patch on IRC
Comment 2 Matthias Clasen 2015-02-10 21:24:09 UTC
"seems to deal with" seems a bit weak...

The commit message should say which compositors this patch was tested against.
Comment 3 Pier Luigi Fiorini 2015-02-11 06:45:53 UTC
> "seems to deal with" seems a bit weak...

GdkWaylandDeviceData has a "have_server_repeat" field set to FALSE by default.
It is set to TRUE only when the compositor offers repeat_info.
When TRUE, GDK uses repeat_info from the compositor otherwise it will query GSettings for that information and fallsback to default values.

This means that the code can already deal with missing repeat_info hence there's no reason to require wl_seat 4.

> The commit message should say which compositors this patch was tested against.

Updated
Comment 4 Pier Luigi Fiorini 2015-02-11 06:46:31 UTC
Created attachment 296560 [details] [review]
patch v3
Comment 5 Matthias Clasen 2015-02-12 01:01:28 UTC
Review of attachment 296560 [details] [review]:

ok, thanks
Comment 6 Pier Luigi Fiorini 2015-02-14 12:11:46 UTC
Thanks for the review, could you please push it?
I don't believe I have the rights to do it, this was my first GTK+ patch.