Merge lp:~brandontschaefer/compiz/lp.1075207-fix-ubuntu-super-p-patch into lp:compiz/0.9.9

Proposed by Brandon Schaefer
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3630
Merged at revision: 3631
Proposed branch: lp:~brandontschaefer/compiz/lp.1075207-fix-ubuntu-super-p-patch
Merge into: lp:compiz/0.9.9
Diff against target: 43 lines (+31/-0)
2 files modified
debian/patches/series (+1/-0)
debian/patches/ubuntu_super_p.patch (+30/-0)
To merge this branch: bzr merge lp:~brandontschaefer/compiz/lp.1075207-fix-ubuntu-super-p-patch
Reviewer Review Type Date Requested Status
Andrea Azzarone Approve
Sam Spilsbury Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+151079@code.launchpad.net

Commit message

Instead of not grabbing all the keys when IgnoreTap is set, add a patch to only not grab Super+P. Allowing part of this bug to say fix (LP:950160), while fixing bugs such as this (LP:1075207). This is only a patch for unity, otherwise it will not cause any problems with trunk compiz.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Do we have existing tests for super+p functionality? Seems like a good thing to make sure doesn't regress, if we don't already have them.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Hmm I don't think there are any test atm. Though, there doesn't seem to be way to check if a key is grabbed (through X) or not making this test hard to do...as the Super+P is a misinterpretation by BIOS vendors (so it wont be true on all computers)... Though there are AP tests that test some keys are grabbed (Like the regression this branch fixes)

Ill see if I can come up with a test in meantime.

Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/patches/series'
2--- debian/patches/series 2013-02-17 07:28:12 +0000
3+++ debian/patches/series 2013-02-28 19:13:22 +0000
4@@ -1,3 +1,4 @@
5+ubuntu_super_p.patch
6 ubuntu-config.patch
7 ccp_plugin.patch
8 ccsm_remove_redundant_sliders.patch
9
10=== added file 'debian/patches/ubuntu_super_p.patch'
11--- debian/patches/ubuntu_super_p.patch 1970-01-01 00:00:00 +0000
12+++ debian/patches/ubuntu_super_p.patch 2013-02-28 19:13:22 +0000
13@@ -0,0 +1,30 @@
14+--- a/src/screen.cpp
15++++ b/src/screen.cpp
16+@@ -3253,12 +3253,22 @@
17+ * This is so that we can detect taps on individual modifier
18+ * keys, and know to cancel the tap if <modifier>+k is pressed.
19+ */
20+- if (!(currentState & CompAction::StateIgnoreTap))
21++ int minCode, maxCode;
22++ XDisplayKeycodes (screen->dpy(), &minCode, &maxCode);
23++
24++ if ((currentState & CompAction::StateIgnoreTap))
25++ {
26++ KeySym sym_p = XStringToKeysym("p");
27++ KeyCode code_p = XKeysymToKeycode(screen->dpy(), sym_p);
28++
29++ for (k = minCode; k <= maxCode; k++)
30++ if (k != code_p)
31++ grabUngrabOneKey (modifiers | ignore, k, grab);
32++ }
33++ else
34+ {
35+- int minCode, maxCode;
36+- XDisplayKeycodes (screen->dpy(), &minCode, &maxCode);
37+- for (k = minCode; k <= maxCode; k++)
38+- grabUngrabOneKey (modifiers | ignore, k, grab);
39++ for (k = minCode; k <= maxCode; k++)
40++ grabUngrabOneKey (modifiers | ignore, k, grab);
41+ }
42+ }
43+

Subscribers

People subscribed via source and target branches