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

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3858
Merged at revision: 3864
Proposed branch: lp:~townsend/compiz/fix-lp1311303
Merge into: lp:compiz/0.9.11
Prerequisite: lp:~townsend/compiz/fix-lp1311788
Diff against target: 33 lines (+4/-5)
2 files modified
src/screen.cpp (+2/-3)
src/window.cpp (+2/-2)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp1311303
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+217973@code.launchpad.net

Commit message

Only constrain the non-modifier scrolling to the vertical scrolling buttons - buttons 4 & 5.

Description of the change

Only constrain the non-modifier scrolling to the vertical scrolling buttons - buttons 4 & 5.

Some users have mapped horizontal scrolling to other functions. I think this is reasonable since horizontal scrolling is not used very often and users would know that they have mapped this to something else.

To post a comment you must log in.
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
1=== modified file 'src/screen.cpp'
2--- src/screen.cpp 2014-04-16 12:35:24 +0000
3+++ src/screen.cpp 2014-05-01 19:25:45 +0000
4@@ -3421,12 +3421,11 @@
5 if (ignore & ~modHandler->ignoredModMask ())
6 continue;
7
8- /* Do not allow binding of the scroll wheel for windows other than the desktop
9+ /* Do not allow binding of vertical scrolling for windows other than the desktop
10 * unless there is a modifier defined */
11 if (window &&
12 !(window->type () & CompWindowTypeDesktopMask) &&
13- bind.button > 3 &&
14- bind.button < 8 &&
15+ (bind.button == Button4 || bind.button == Button5) &&
16 !mods)
17 continue;
18
19
20=== modified file 'src/window.cpp'
21--- src/window.cpp 2014-05-01 19:25:45 +0000
22+++ src/window.cpp 2014-05-01 19:25:45 +0000
23@@ -5637,8 +5637,8 @@
24
25 if (!(priv->type & CompWindowTypeDesktopMask))
26 {
27- /* Ungrab Buttons 4-7 for scrolling if the window is not the desktop window */
28- for (int i = 4; i <= 7; i++)
29+ /* Ungrab Buttons 4 & 5 for vertical scrolling if the window is not the desktop window */
30+ for (int i = Button4; i <= Button5; ++i)
31 XUngrabButton (screen->dpy (), i, Mod2Mask, frame);
32 }
33 }

Subscribers

People subscribed via source and target branches