Merge lp:~attente/gnome-control-center/upstream-xkb-option into lp:~ubuntu-desktop/gnome-control-center/ubuntu

Proposed by William Hua
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 638
Merged at revision: 638
Proposed branch: lp:~attente/gnome-control-center/upstream-xkb-option
Merge into: lp:~ubuntu-desktop/gnome-control-center/ubuntu
Diff against target: 111 lines (+91/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/git_keyboard_grp_xkb_option.patch (+83/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~attente/gnome-control-center/upstream-xkb-option
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+214538@code.launchpad.net

Commit message

Take upstream's grp xkb option combo for modifier-only input switching.

Description of the change

Take upstream's grp xkb option combo for modifier-only input switching.

Upstream GNOME implements it using xkb options, and the functionality already exists, but hasn't been exposed in g-c-c.

To post a comment you must log in.
Revision history for this message
Tim Lunn (darkxst) wrote :

OK, seems fine to me!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-03-21 11:25:43 +0000
3+++ debian/changelog 2014-04-07 13:39:07 +0000
4@@ -1,3 +1,10 @@
5+gnome-control-center (1:3.6.3-0ubuntu55) UNRELEASED; urgency=medium
6+
7+ * debian/patches/git_keyboard_grp_xkb_option.patch:
8+ - take upstream's grp xkb option combo for modifier-only input switching
9+
10+ -- William Hua <william.hua@canonical.com> Tue, 08 Apr 2014 01:03:33 +1200
11+
12 gnome-control-center (1:3.6.3-0ubuntu54) trusty; urgency=medium
13
14 * debian/control.in, debian/gnome/control-center-data.install,
15
16=== added file 'debian/patches/git_keyboard_grp_xkb_option.patch'
17--- debian/patches/git_keyboard_grp_xkb_option.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/git_keyboard_grp_xkb_option.patch 2014-04-07 13:39:07 +0000
19@@ -0,0 +1,83 @@
20+From 5b98213b04627f57c55d54b10f03351c9381ccc9 Mon Sep 17 00:00:00 2001
21+From: Rui Matos <tiagomatos@gmail.com>
22+Date: Mon, 1 Apr 2013 20:22:16 +0200
23+Subject: [PATCH] keyboard: Add the XKB option for the input source switch
24+ shortcut
25+
26+Mutter now uses the "grp" XKB option to implement a special
27+modifiers-only shortcut use by gnome-shell to switch input sources.
28+
29+https://bugzilla.gnome.org/show_bug.cgi?id=700346
30+---
31+ panels/keyboard/cc-keyboard-option.c | 34 ++++++++++++++++++++++++++++++++++
32+ 1 file changed, 34 insertions(+)
33+
34+diff --git a/panels/keyboard/cc-keyboard-option.c b/panels/keyboard/cc-keyboard-option.c
35+index 33cb415..7a94f66 100644
36+--- a/panels/keyboard/cc-keyboard-option.c
37++++ b/panels/keyboard/cc-keyboard-option.c
38+@@ -39,6 +39,7 @@
39+
40+ #define XKB_OPTION_GROUP_LVL3 "lv3"
41+ #define XKB_OPTION_GROUP_COMP "Compose key"
42++#define XKB_OPTION_GROUP_GRP "grp"
43+
44+ enum
45+ {
46+@@ -97,6 +98,32 @@ static const gchar *xkb_option_comp_whitelist[] = {
47+ NULL
48+ };
49+
50++/* This list must be kept in sync with what mutter is able to
51++ * handle. */
52++static const gchar *xkb_option_grp_whitelist[] = {
53++ "grp:toggle",
54++ "grp:lalt_toggle",
55++ "grp:lwin_toggle",
56++ "grp:rwin_toggle",
57++ "grp:lshift_toggle",
58++ "grp:rshift_toggle",
59++ "grp:lctrl_toggle",
60++ "grp:rctrl_toggle",
61++ "grp:sclk_toggle",
62++ "grp:menu_toggle",
63++ "grp:caps_toggle",
64++ "grp:shift_caps_toggle",
65++ "grp:alt_caps_toggle",
66++ "grp:alt_space_toggle",
67++ "grp:ctrl_shift_toggle",
68++ "grp:lctrl_lshift_toggle",
69++ "grp:rctrl_rshift_toggle",
70++ "grp:ctrl_alt_toggle",
71++ "grp:alt_shift_toggle",
72++ "grp:lalt_lshift_toggle",
73++ NULL
74++};
75++
76+ static GList *objects_list = NULL;
77+
78+ GType cc_keyboard_option_get_type (void);
79+@@ -233,6 +260,8 @@ cc_keyboard_option_constructed (GObject *object)
80+ self->whitelist = xkb_option_lvl3_whitelist;
81+ else if (g_str_equal (self->group, XKB_OPTION_GROUP_COMP))
82+ self->whitelist = xkb_option_comp_whitelist;
83++ else if (g_str_equal (self->group, XKB_OPTION_GROUP_GRP))
84++ self->whitelist = xkb_option_grp_whitelist;
85+ else
86+ g_assert_not_reached ();
87+
88+@@ -328,6 +357,11 @@ cc_keyboard_option_get_all (void)
89+ "group", XKB_OPTION_GROUP_COMP,
90+ "description", _("Compose Key"),
91+ NULL));
92++ objects_list = g_list_prepend (objects_list,
93++ g_object_new (CC_TYPE_KEYBOARD_OPTION,
94++ "group", XKB_OPTION_GROUP_GRP,
95++ "description", _("Modifiers-only switch to next source"),
96++ NULL));
97+ return objects_list;
98+ }
99+
100+--
101+1.9.1
102+
103
104=== modified file 'debian/patches/series'
105--- debian/patches/series 2014-02-26 18:20:56 +0000
106+++ debian/patches/series 2014-04-07 13:39:07 +0000
107@@ -1,3 +1,4 @@
108+git_keyboard_grp_xkb_option.patch
109 0001-online-accounts-use-the-async-function-to-get-all-th.patch
110 0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch
111 05_run_update_manager.patch

Subscribers

People subscribed via source and target branches