Merge lp:~townsend/compiz/fix-lp1304877 into lp:compiz/0.9.11

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3854
Merged at revision: 3855
Proposed branch: lp:~townsend/compiz/fix-lp1304877
Merge into: lp:compiz/0.9.11
Diff against target: 69 lines (+19/-26)
2 files modified
src/screen.cpp (+3/-0)
src/window.cpp (+16/-26)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp1304877
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+214945@code.launchpad.net

Commit message

Allow binding of other buttons greater than button 7 for windows other than the desktop.

Description of the change

Allow binding of other buttons greater than button 7 for windows other than the desktop.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~townsend/compiz/fix-lp1304877 updated
3854. By Christopher Townsend

Fix Compiz tab/indentation.

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

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/screen.cpp'
--- src/screen.cpp 2014-04-02 21:45:25 +0000
+++ src/screen.cpp 2014-04-09 15:53:23 +0000
@@ -3438,9 +3438,12 @@
3438 if (ignore & ~modHandler->ignoredModMask ())3438 if (ignore & ~modHandler->ignoredModMask ())
3439 continue;3439 continue;
34403440
3441 /* Do not allow binding of the scroll wheel for windows other than the desktop
3442 * unless there is a modifier defined */
3441 if (window &&3443 if (window &&
3442 !(window->type () & CompWindowTypeDesktopMask) &&3444 !(window->type () & CompWindowTypeDesktopMask) &&
3443 bind.button > 3 &&3445 bind.button > 3 &&
3446 bind.button < 8 &&
3444 !mods)3447 !mods)
3445 continue;3448 continue;
34463449
34473450
=== modified file 'src/window.cpp'
--- src/window.cpp 2014-04-07 16:18:09 +0000
+++ src/window.cpp 2014-04-09 15:53:23 +0000
@@ -5624,32 +5624,22 @@
5624 screen->updatePassiveButtonGrabs(serverFrame);5624 screen->updatePassiveButtonGrabs(serverFrame);
5625 else5625 else
5626 {5626 {
5627 if (priv->type & CompWindowTypeDesktopMask)5627 /* Grab all buttons */
5628 {5628 XGrabButton (screen->dpy (),
5629 /* Grab all buttons for the desktop window */5629 AnyButton,
5630 XGrabButton (screen->dpy (),5630 AnyModifier,
5631 AnyButton,5631 serverFrame, false,
5632 AnyModifier,5632 ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
5633 serverFrame, false,5633 GrabModeSync,
5634 ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,5634 GrabModeAsync,
5635 GrabModeSync,5635 None,
5636 GrabModeAsync,5636 None);
5637 None,5637
5638 None);5638 if (!(priv->type & CompWindowTypeDesktopMask))
5639 }5639 {
5640 else5640 /* Ungrab Buttons 4-7 for scrolling if the window is not the desktop window */
5641 {5641 for (int i = 4; i <= 7; i++)
5642 /* Only grab buttons 1-3 */5642 XUngrabButton (screen->dpy (), i, AnyModifier, frame);
5643 for (int i = 1; i <= 3; i++)
5644 XGrabButton (screen->dpy (),
5645 i,
5646 AnyModifier,
5647 serverFrame, false,
5648 ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
5649 GrabModeSync,
5650 GrabModeAsync,
5651 None,
5652 None);
5653 }5643 }
5654 }5644 }
5655}5645}

Subscribers

People subscribed via source and target branches