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 686904 - Update Wayland backend for libxkbcommon API change
Update Wayland backend for libxkbcommon API change
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-10-26 00:58 UTC by Ran Benita
Modified: 2012-10-29 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix building against xkbcommon 0.2.0 (4.68 KB, patch)
2012-10-26 00:58 UTC, Ran Benita
reviewed Details | Review
Patch v2 (5.25 KB, patch)
2012-10-26 08:14 UTC, Ran Benita
accepted-commit_now Details | Review

Description Ran Benita 2012-10-26 00:58:43 UTC
Created attachment 227318 [details] [review]
Patch to fix building against xkbcommon 0.2.0

libxkbcommon-0.2.0 was released (first release), but it contains a change to API, which adds a 'flags' argument to xkb_keysym_from_name(). So current HEAD (6245362a52616ef0a5e568ddeead53f9d3160a83, 3.7.0) fails to build against that release.

Attached is a patch that fixes the error, and also replaces all of the deprecated xkbcommon symbols with their current counterparts.
Comment 1 Emmanuele Bassi (:ebassi) 2012-10-26 08:01:52 UTC
Review of attachment 227318 [details] [review]:

looks okay, with minor coding style to be fixed.

::: gdk/wayland/gdkdisplaymanager-wayland.c
@@ +137,3 @@
   g_return_val_if_fail (keyval_name != NULL, 0);
 
+  return xkb_keysym_from_name(keyval_name, 0);

coding style: missing space between function and parenthesis.

::: gdk/wayland/gdkkeys-wayland.c
@@ +222,3 @@
   names.variant = "";
   names.options = "";
+  keymap->xkb_keymap = xkb_keymap_new_from_names(context, &names, 0);

coding style: missing space between function name and parenthesis.
Comment 2 Ran Benita 2012-10-26 08:14:45 UTC
Created attachment 227331 [details] [review]
Patch v2

Thanks Emmanuele, I haven't noticed that style.
Attached a fixed patch. I've also made another change, to have configure.ac check for the appropriate xkbcommon version.
Comment 3 Darxus 2012-10-27 22:38:19 UTC
Verified Patch v2 works, ran gnome-terminal under weston.  Tested commits:

gtk+:         63c75a23847f5e46c599ae5417f6b755a886ce48
libxkbcommon: a35d3223224fe6a24df0a16d599761aea70ac2dc
wayland:      1f521a4f7760df73e1d1d8a6791d1c7bf536584e
weston:       16b41e442ba42824f7b7bca2208efa8e0572492e
Comment 4 Rob Bradford 2012-10-29 15:43:56 UTC
Review of attachment 227331 [details] [review]:

LGTM.
Comment 5 Rob Bradford 2012-10-29 15:59:06 UTC
Patch merged, tested and pushed to master.Thanks.