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
=== modified file 'plugins/resize/src/logic/include/resize-logic.h'
--- plugins/resize/src/logic/include/resize-logic.h 2012-08-15 21:36:40 +0000
+++ plugins/resize/src/logic/include/resize-logic.h 2014-05-28 07:29:08 +0000
@@ -176,6 +176,9 @@
176 unsigned int output,176 unsigned int output,
177 int &op,177 int &op,
178 int &wap);178 int &wap);
179
180 unsigned int lastMaskX;
181 unsigned int lastMaskY;
179};182};
180183
181#endif /* RESIZELOGIC_H */184#endif /* RESIZELOGIC_H */
182185
=== modified file 'plugins/resize/src/logic/src/resize-logic.cpp'
--- plugins/resize/src/logic/src/resize-logic.cpp 2014-03-11 18:35:18 +0000
+++ plugins/resize/src/logic/src/resize-logic.cpp 2014-05-28 07:29:08 +0000
@@ -65,7 +65,9 @@
65 offWorkAreaConstrained (true),65 offWorkAreaConstrained (true),
66 options (NULL),66 options (NULL),
67 cScreen (NULL),67 cScreen (NULL),
68 gScreen (NULL)68 gScreen (NULL),
69 lastMaskX (0),
70 lastMaskY (0)
69{71{
70 rKeys[0].name = "Left";72 rKeys[0].name = "Left";
71 rKeys[0].dx = -1;73 rKeys[0].dx = -1;
@@ -411,6 +413,19 @@
411413
412 mask = rKeys[i].resizeMask;414 mask = rKeys[i].resizeMask;
413415
416 if ((mask & ResizeLeftMask || mask & ResizeRightMask) && (mask != lastMaskX))
417 {
418 pointerDx *= -1;
419
420 lastMaskX = mask;
421 }
422 if ((mask & ResizeUpMask || mask & ResizeDownMask) && (mask != lastMaskY))
423 {
424 pointerDy *= -1;
425
426 lastMaskY = mask;
427 }
428
414 mScreen->updateGrab (grabIndex, cursor[i]);429 mScreen->updateGrab (grabIndex, cursor[i]);
415 }430 }
416 break;431 break;
@@ -439,14 +454,14 @@
439 accumulatePointerMotion (xRoot, yRoot);454 accumulatePointerMotion (xRoot, yRoot);
440 }455 }
441456
442 if (mask & ResizeLeftMask)457 if (mask & ResizeLeftMask || lastMaskX & ResizeLeftMask)
443 wi -= pointerDx;458 wi -= pointerDx;
444 else if (mask & ResizeRightMask)459 else if (mask & ResizeRightMask || lastMaskX & ResizeRightMask)
445 wi += pointerDx;460 wi += pointerDx;
446461
447 if (mask & ResizeUpMask)462 if (mask & ResizeUpMask || lastMaskY & ResizeUpMask)
448 he -= pointerDy;463 he -= pointerDy;
449 else if (mask & ResizeDownMask)464 else if (mask & ResizeDownMask || lastMaskY & ResizeDownMask)
450 he += pointerDy;465 he += pointerDy;
451466
452 if (w->state () & CompWindowStateMaximizedVertMask)467 if (w->state () & CompWindowStateMaximizedVertMask)

Subscribers

People subscribed via source and target branches