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

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3861
Merged at revision: 3869
Proposed branch: lp:~townsend/compiz/fix-lp347390
Merge into: lp:compiz/0.9.11
Diff against target: 67 lines (+23/-5)
2 files modified
plugins/resize/src/logic/include/resize-logic.h (+3/-0)
plugins/resize/src/logic/src/resize-logic.cpp (+20/-5)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp347390
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+221170@code.launchpad.net

Commit message

Fix issue where horizontal and vertical keyboard resizing could not happen at the same time.

Description of the change

Fix issue where horizontal and vertical keyboard resizing could not happen at the same time.

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
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/resize/src/logic/include/resize-logic.h'
2--- plugins/resize/src/logic/include/resize-logic.h 2012-08-15 21:36:40 +0000
3+++ plugins/resize/src/logic/include/resize-logic.h 2014-05-28 07:29:08 +0000
4@@ -176,6 +176,9 @@
5 unsigned int output,
6 int &op,
7 int &wap);
8+
9+ unsigned int lastMaskX;
10+ unsigned int lastMaskY;
11 };
12
13 #endif /* RESIZELOGIC_H */
14
15=== modified file 'plugins/resize/src/logic/src/resize-logic.cpp'
16--- plugins/resize/src/logic/src/resize-logic.cpp 2014-03-11 18:35:18 +0000
17+++ plugins/resize/src/logic/src/resize-logic.cpp 2014-05-28 07:29:08 +0000
18@@ -65,7 +65,9 @@
19 offWorkAreaConstrained (true),
20 options (NULL),
21 cScreen (NULL),
22- gScreen (NULL)
23+ gScreen (NULL),
24+ lastMaskX (0),
25+ lastMaskY (0)
26 {
27 rKeys[0].name = "Left";
28 rKeys[0].dx = -1;
29@@ -411,6 +413,19 @@
30
31 mask = rKeys[i].resizeMask;
32
33+ if ((mask & ResizeLeftMask || mask & ResizeRightMask) && (mask != lastMaskX))
34+ {
35+ pointerDx *= -1;
36+
37+ lastMaskX = mask;
38+ }
39+ if ((mask & ResizeUpMask || mask & ResizeDownMask) && (mask != lastMaskY))
40+ {
41+ pointerDy *= -1;
42+
43+ lastMaskY = mask;
44+ }
45+
46 mScreen->updateGrab (grabIndex, cursor[i]);
47 }
48 break;
49@@ -439,14 +454,14 @@
50 accumulatePointerMotion (xRoot, yRoot);
51 }
52
53- if (mask & ResizeLeftMask)
54+ if (mask & ResizeLeftMask || lastMaskX & ResizeLeftMask)
55 wi -= pointerDx;
56- else if (mask & ResizeRightMask)
57+ else if (mask & ResizeRightMask || lastMaskX & ResizeRightMask)
58 wi += pointerDx;
59
60- if (mask & ResizeUpMask)
61+ if (mask & ResizeUpMask || lastMaskY & ResizeUpMask)
62 he -= pointerDy;
63- else if (mask & ResizeDownMask)
64+ else if (mask & ResizeDownMask || lastMaskY & ResizeDownMask)
65 he += pointerDy;
66
67 if (w->state () & CompWindowStateMaximizedVertMask)

Subscribers

People subscribed via source and target branches