Merge lp:~mc-return/compiz/compiz.merge-fix284158-cube-rotate-eats-mouse-clicks-on-side-of-screen into lp:compiz/0.9.11

Proposed by MC Return
Status: Needs review
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix284158-cube-rotate-eats-mouse-clicks-on-side-of-screen
Merge into: lp:compiz/0.9.11
Diff against target: 60 lines (+31/-1)
2 files modified
plugins/rotate/src/rotate.cpp (+28/-0)
plugins/rotate/src/rotate.h (+3/-1)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix284158-cube-rotate-eats-mouse-clicks-on-side-of-screen
Reviewer Review Type Date Requested Status
MC Return Needs Information
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+176722@code.launchpad.net

Commit message

Rotate Cube plugin:
Do not eat mouse clicks on the sides of the screen.

(Credits and thanks for this patch, Matija Skala <email address hidden>)

(LP: #284158) !!!

Description of the change

It fixes the bug, but seems to break "Edge Flip Pointer" and "Edge Flip DnD" here...

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) :
review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
MC Return (mc-return) wrote :

This needs information from the original author.
Let us see if he comments on it, otherwise we might have to reject it.

review: Needs Information

Unmerged revisions

3773. By MC Return

Minor improvements:
No need to negate, added name of the bool

3772. By Matija Skala

Rotate cube plugin:
Do not eat mouse clicks on the sides of the screen

(LP: #284158) !!!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/rotate/src/rotate.cpp'
2--- plugins/rotate/src/rotate.cpp 2013-05-21 14:13:15 +0000
3+++ plugins/rotate/src/rotate.cpp 2013-07-24 16:00:47 +0000
4@@ -800,6 +800,17 @@
5
6 break;
7
8+ case FocusIn:
9+ case FocusOut:
10+ /* Edges on when grabbed */
11+ if (!optionGetEdgeFlipPointer ())
12+ {
13+ if (event->xfocus.mode == NotifyGrab)
14+ toggleEdges (true);
15+ else if (event->xfocus.mode == NotifyUngrab)
16+ toggleEdges (false);
17+ }
18+
19 case ClientMessage:
20 if (event->xclient.message_type == Atoms::desktopViewport)
21 {
22@@ -892,6 +903,23 @@
23 window->activate ();
24 }
25
26+void
27+RotateScreen::toggleEdges (bool enabled)
28+{
29+ ROTATE_SCREEN (screen);
30+
31+ if (enabled)
32+ {
33+ screen->addAction (&rs->optionGetRotateFlipLeftEdge ());
34+ screen->addAction (&rs->optionGetRotateFlipRightEdge ());
35+ }
36+ else
37+ {
38+ screen->removeAction (&rs->optionGetRotateFlipLeftEdge ());
39+ screen->removeAction (&rs->optionGetRotateFlipRightEdge ());
40+ }
41+}
42+
43 void
44 RotateWindow::grabNotify (int x,
45 int y,
46
47=== modified file 'plugins/rotate/src/rotate.h'
48--- plugins/rotate/src/rotate.h 2013-05-19 13:44:51 +0000
49+++ plugins/rotate/src/rotate.h 2013-07-24 16:00:47 +0000
50@@ -105,7 +105,9 @@
51 CompOption::Vector &options);
52
53 int rotateToDirection (int face);
54-
55+
56+ void toggleEdges (bool enabled);
57+
58 bool rotateTo (CompAction *action,
59 CompAction::State state,
60 CompOption::Vector &options,

Subscribers

People subscribed via source and target branches

to all changes: