Merge lp:~laney/unity/keygrabber-xf86 into lp:unity

Proposed by Iain Lane on 2014-10-02
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2014-10-03
Approved revision: 3878
Merged at revision: 3877
Proposed branch: lp:~laney/unity/keygrabber-xf86
Merge into: lp:unity
Diff against target: 19 lines (+9/-0)
1 file modified
unity-shared/GnomeKeyGrabber.cpp (+9/-0)
To merge this branch: bzr merge lp:~laney/unity/keygrabber-xf86
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2014-10-02 Approve on 2014-10-03
PS Jenkins bot (community) continuous-integration Needs Fixing on 2014-10-02
Review via email: mp+236842@code.launchpad.net

Commit message

When grabbing keys, try prefixing "XF86" if the key isn't found. GNOME gives us unprefixed keys sometimes.

Description of the change

Some keys are being saved in gsettings without the XF86 prefix.

If we can't find a key (get "Disabled" from Compiz), try prefixing "XF86"

https://git.gnome.org/browse/mutter/commit/src/core/meta-accel-parse.c?id=8d29d22e991f8816f47529e366a947b3565993e8

I think this could be SRUed too, since the linked bug mentions the problem on 14.04.

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:3876
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~laney/unity/keygrabber-xf86/+merge/236842/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-ci/1090/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-utopic-amd64-ci/177
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-utopic-armhf-ci/177
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-utopic-i386-ci/177/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-ci/1090/rebuild

review: Needs Fixing (continuous-integration)
Marco Trevisan (Treviño) (3v1n0) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/GnomeKeyGrabber.cpp'
2--- unity-shared/GnomeKeyGrabber.cpp 2014-02-28 18:52:30 +0000
3+++ unity-shared/GnomeKeyGrabber.cpp 2014-10-03 16:54:04 +0000
4@@ -200,6 +200,15 @@
5 CompAction action;
6 action.keyFromString(accelerator);
7
8+ if (action.key().toString().empty())
9+ {
10+ CompString prefixed = "XF86" + CompString(accelerator);
11+ LOG_DEBUG(logger) << "Can't grab \"" << accelerator << "\", trying \"" << prefixed << "\"";
12+ action.keyFromString(prefixed);
13+ }
14+ else
15+ LOG_DEBUG(logger) << "grabAccelerator \"" << accelerator << "\"";
16+
17 if (!isActionPostponed(action))
18 {
19 action.setState(CompAction::StateInitKey);