Bug 62171 - keymap layout set in weston.ini is not respected by XWayland clients
Summary: keymap layout set in weston.ini is not respected by XWayland clients
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-11 14:55 UTC by Rune K. Svendsen
Modified: 2013-04-10 16:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Rune K. Svendsen 2013-03-11 14:55:37 UTC
When setting a keyboard layout in weston.ini using the keymap_layout value under [keyboard], it works for toytoolkit apps like weston-terminal, but not XWayland applications, like for example gedit.

Executing the below command in Weston fixes this issue:

setxkbmap <keymap_layout>

So for example, for the keyboard layout for Denmark you would run

setxkbmap dk

I'm wondering whether this command can somehow be executed at startup of an X Server, or maybe specified as an argument when launching the X Server.
Comment 1 Kristian Høgsberg 2013-04-09 20:08:10 UTC
xwayland-input.c:146:

        /* FIXME: Get the keymap from wl_keyboard::keymap events, which         
         *        requires more X server API to set a keymap from a string      
         *        rather than RMLVO. */
        rmlvo.rules = "evdev";
        rmlvo.model = "evdev";
        rmlvo.layout = "us";
        rmlvo.variant = NULL;
        rmlvo.options = NULL;

We need to add a XKB function to compile from the keymap file we pass to clients and use that in InitKeyboardDeviceStruct() or new, similar function.

This affects xwayland integration with all compositors.  GNOME Shell, eg, not just weston.
Comment 2 Kristian Høgsberg 2013-04-10 02:56:44 UTC
Ok, here's an first attempt at fixing this:

http://cgit.freedesktop.org/~krh/xserver/log/?h=xkb-from-string
Comment 3 Kristian Høgsberg 2013-04-10 16:17:59 UTC
Cleaned up the commits and pushed to xwayland-1.12 branch.  Closing this one now, reopen if it doesn't fix the problem for you.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.