GNOME Bugzilla – Bug 709085
keyboard: Don't set the XKB group switching option when not needed
Last modified: 2013-10-01 08:52:31 UTC
Emmanuele got his keyboard layout in a confused state and reported it on IRC the other day. This should fix it.
Created attachment 256076 [details] [review] keyboard: Don't set the XKB group switching option when not needed We might set up different layouts in different groups - see replace_layout_and_variant(). But we don't want the X server group switching feature to actually switch them. Regularly, if we have at least two input sources, gnome-shell will tell us to switch input source at that point so we fix that automatically. But when there's only one source, gnome-shell short circuits as an optimization and doesn't call us so we can't set the group switching XKB option in the first place otherwise the X server's switch will take effect and we get a broken configuration.
Review of attachment 256076 [details] [review]: Looks good. We should really have a couple of strv convenience functions in glib though. ::: plugins/keyboard/gsd-keyboard-manager.c @@ +878,3 @@ + options[last] = NULL; + } + p += 1; p++;?
(In reply to comment #2) > ::: plugins/keyboard/gsd-keyboard-manager.c > + p += 1; > > p++;? I tend to avoid the unary increment/decrement operators. I find them harder to parse for some reason. Pushed to master and 3.8. Attachment 256076 [details] pushed as f3b6e35 - keyboard: Don't set the XKB group switching option when not needed