GNOME Bugzilla – Bug 108406
setxkbmap doesn't change layout in gtk2.2 input fields
Last modified: 2004-12-22 21:47:04 UTC
After changing the keyboard layout with the "setxkbmap" command, gtk2.2 input fields quite often keep using the old layout. Set American layout with "setxkbmap us". Launch an application using gtk2.2 which has nice input fields such as the URL field of galeon or the whole area of gnome-terminal. Press the [ and ] keys, [ and ] appears on the screen. Switch to another layout, e.g. to Hungarian with "setxkbmap hu". Type [ and ]. Accented vowels should appear, but in many cases [ and ] appears, even though all the non-gtk2.2 applications (gtk1, qt, athena, lesstif etc.) print those accented vowels -- they are all somehow notified about the change. (I didn't have any problem with gtk2.0 either as long as I used that). This behaviour is not consistent, it occurs for me in about 60% of the cases, in the remaining 40% the application will use the new layout. If this happens, close it and try to run it later, try another gtk2.2 application, or maybe log out from X and log in again to face this buggy behaviour. If you right-click on the input field and choose "X Input Method", everything will be fine as long as you keep this setting and don't quit this application. Everything is fine if you use xmodmap instead of setxkbmap. I've tested it with gtk+-2.2.1 (actually a complete gnome2.2 environment with xfree 4.3), and I've compiled gtk both with and without the --with-xinput=yes configure option, it resulted in different config.h but produced the same inconsistently buggy behaviour of the library.
*** Bug 108231 has been marked as a duplicate of this bug. ***
Fri Apr 18 14:15:09 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdisplay-x11.c (gdk_display_open): * gdk/x11/gdkevents-x11.c (gdk_event_translate): You don't get a XkbMapNotify event if you get a XkbNewKeyboardNotify event, so select for both. (#108406, Egmont Koblinger)