Merge lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic into lp:~mc-return/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 3680
Proposed branch: lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic
Merge into: lp:~mc-return/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken
Diff against target: 331 lines (+111/-61)
5 files modified
plugins/wall/src/wall.cpp (+49/-55)
plugins/wall/src/wall.h (+2/-4)
plugins/wall/wall.xml.in (+4/-1)
src/screen.cpp (+7/-1)
tests/manual/plugins/wall.txt (+49/-0)
To merge this branch: bzr merge lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic
Reviewer Review Type Date Requested Status
Sam Spilsbury Pending
MC Return Pending
Review via email: mp+163887@code.launchpad.net

This proposal supersedes a proposal from 2013-05-13.

Commit message

wall: Remove mouse polling edge flip detection code, instead turn edges on
      in the following situations:

    1. Edge flip pointer is on (always on)
    2. Edge flip move is on, and the screen is grabbed (someone is moving
       a window)
    3. Edge flip dnd is on, and a dnd type window is mapped (someone is
       doing a dnd)

Fix a misconstructed boolean condition in removeAction that could cause
actions to be removed twice and as such cause the edge reference count to
go negative.

Note that dnd window detection is a bit imprecise, but I didn't want to resort
to using some exotic workarounds for the dnd edge cases (such as non-EWMH
compliant dnd windows which are still compliant with ICCCM).

Description of the change

wall: Remove mouse polling edge flip detection code, instead turn edges on
      in the following situations:

    1. Edge flip pointer is on (always on)
    2. Edge flip move is on, and the screen is grabbed (someone is moving
       a window)
    3. Edge flip dnd is on, and a dnd type window is mapped (someone is
       doing a dnd)

Fix a misconstructed boolean condition in removeAction that could cause
actions to be removed twice and as such cause the edge reference count to
go negative.

Note that dnd window detection is a bit imprecise, but I didn't want to resort
to using some exotic workarounds for the dnd edge cases (such as non-EWMH
compliant dnd windows which are still compliant with ICCCM)

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

You did it :)

From a first look:

Typos:

332 + or colum

316 + or colum

I do not understand this step:

292 + and set up screen edges as appropriate

307 + and set up screen edges as appropriate

323 + and set up screen edges as appropriate

I think this ^^ could be removed.

Please add newlines after:

66 + break;

70 + break;

The rest LGTM. I will test this ASAP.

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Did you test this ?

It does not seem to work here, none of the edge-flipping modes... :(

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Or am I missing something ?

Ah -> probably I am missing this part:

260 - if (!(privateScreen.initialized || action->active ()))
261 + if (!privateScreen.initialized ||
262 + !action->active ())

hmm, but this change seems to be unrelated and does not change the logic ?!

(I just exchanged the plugin)

*clueless* at the moment

review: Needs Information
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Or is it this:

292 + and set up screen edges as appropriate

What exactly should I setup here and where ?

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

But I have some good news as well:

I did not have to change anything regarding the cmake config to compile this MP, just cmake .. && make -j5 :)
This means for the first time ever here all the tests compiled :), which means recent trunk fixes seem to work :)

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Yes I did, it works fine here.

Its possible that when I took the patch off my main branch I may have
missed something. I can look into that.
On 27/04/2013 4:42 PM, "MC Return" <email address hidden> wrote:

> Did you test this ?
>
> It does not seem to work here, none of the edge-flipping modes... :(
> --
>
> https://code.launchpad.net/~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic/+merge/161279
> You are the owner of
> lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic.
>

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Yes I did, it works fine here.
>
> Its possible that when I took the patch off my main branch I may have
> missed something. I can look into that.

Thanks :)
I am pretty sure I made no mistake -> and I double-checked, so most probably
something's missing...

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Note: I just took the compiled libwall.so to test, so if this needs changes to core...

But this thing below seems unrelated and does not change anything, or does it ?

253 === modified file 'src/screen.cpp'
254 --- src/screen.cpp 2013-02-03 17:58:29 +0000
255 +++ src/screen.cpp 2013-04-27 06:17:25 +0000
256 @@ -3486,7 +3486,8 @@
257 void
258 CompScreenImpl::removeAction (CompAction *action)
259 {
260 - if (!(privateScreen.initialized || action->active ()))
261 + if (!privateScreen.initialized ||
262 + !action->active ())
263 return;
264
265 grabManager.setCurrentState(action->state());
266 @@ -3902,6 +3903,11 @@
267 SubstructureRedirectMask | SubstructureNotifyMask, &xev);
268 }
269
270 +/* These functions do not guard against negative decrements
271 + * as they are unable to determine the source of the reference
272 + * and as such they should only be called by functions that
273 + * actually determine the source of what was referencing the
274 + * edge and can guard against multiple-references-per-owner */
275 void
276 PrivateScreen::enableEdge (int edge)
277 {
278

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

In testing I remember coming across something that would effectively
cause actions to be removed from the active actions list multiple
times, which would in term cause the screen edge reference count to go
below zero. The if condition was the problem. It read:

if NOT
   (privateScreen.initialized OR
    action->active ())
    return false;

The sub-condition is true if either privateScreen.initialized or
action->active () is true. This means that in order for it to be
false, both of them must be false. Eg,

!(A || B) -> !A && !B

That's incorrect, because privateScreen.initialized is usually always
true, so you'd run into situations like this:

A && !B

But that still satisfies A || B because A is still true.

The adjusted condition is correct:

if (!A || !B) -> !(A && B)

What we want is for the function to always return false if
action->active () is false, regardless of what the value of
privateScreen.initialized is.

On Sat, Apr 27, 2013 at 5:43 PM, MC Return <email address hidden> wrote:
> Note: I just took the compiled libwall.so to test, so if this needs changes to core...
>
> But this thing below seems unrelated and does not change anything, or does it ?
>
> 253 === modified file 'src/screen.cpp'
> 254 --- src/screen.cpp 2013-02-03 17:58:29 +0000
> 255 +++ src/screen.cpp 2013-04-27 06:17:25 +0000
> 256 @@ -3486,7 +3486,8 @@
> 257 void
> 258 CompScreenImpl::removeAction (CompAction *action)
> 259 {
> 260 - if (!(privateScreen.initialized || action->active ()))
> 261 + if (!privateScreen.initialized ||
> 262 + !action->active ())
> 263 return;
> 264
> 265 grabManager.setCurrentState(action->state());
> 266 @@ -3902,6 +3903,11 @@
> 267 SubstructureRedirectMask | SubstructureNotifyMask, &xev);
> 268 }
> 269
> 270 +/* These functions do not guard against negative decrements
> 271 + * as they are unable to determine the source of the reference
> 272 + * and as such they should only be called by functions that
> 273 + * actually determine the source of what was referencing the
> 274 + * edge and can guard against multiple-references-per-owner */
> 275 void
> 276 PrivateScreen::enableEdge (int edge)
> 277 {
> 278
>
> --
> https://code.launchpad.net/~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic/+merge/161279
> You are the owner of lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic.

--
Sam Spilsbury

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> In testing I remember coming across something that would effectively
> cause actions to be removed from the active actions list multiple
> times, which would in term cause the screen edge reference count to go
> below zero. The if condition was the problem. It read:
>
> if NOT
> (privateScreen.initialized OR
> action->active ())
> return false;
>
> The sub-condition is true if either privateScreen.initialized or
> action->active () is true. This means that in order for it to be
> false, both of them must be false. Eg,
>
> !(A || B) -> !A && !B
>
> That's incorrect, because privateScreen.initialized is usually always
> true, so you'd run into situations like this:
>
> A && !B
>
> But that still satisfies A || B because A is still true.
>
> The adjusted condition is correct:
>
> if (!A || !B) -> !(A && B)
>
> What we want is for the function to always return false if
> action->active () is false, regardless of what the value of
> privateScreen.initialized is.
>
>
Aha -> I thought this might be the problem, but was too lazy to really rethink
the boolean logic (I am still missing my shower & coffee today ;))...

I will approve this blindly this time, because I hope and am sure you will
immediately take care of regressions should those occur...

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Can you verify it please?

On Sat, Apr 27, 2013 at 6:06 PM, MC Return <email address hidden> wrote:
> Review: Approve
>
>> In testing I remember coming across something that would effectively
>> cause actions to be removed from the active actions list multiple
>> times, which would in term cause the screen edge reference count to go
>> below zero. The if condition was the problem. It read:
>>
>> if NOT
>> (privateScreen.initialized OR
>> action->active ())
>> return false;
>>
>> The sub-condition is true if either privateScreen.initialized or
>> action->active () is true. This means that in order for it to be
>> false, both of them must be false. Eg,
>>
>> !(A || B) -> !A && !B
>>
>> That's incorrect, because privateScreen.initialized is usually always
>> true, so you'd run into situations like this:
>>
>> A && !B
>>
>> But that still satisfies A || B because A is still true.
>>
>> The adjusted condition is correct:
>>
>> if (!A || !B) -> !(A && B)
>>
>> What we want is for the function to always return false if
>> action->active () is false, regardless of what the value of
>> privateScreen.initialized is.
>>
>>
> Aha -> I thought this might be the problem, but was too lazy to really rethink
> the boolean logic (I am still missing my shower & coffee today ;))...
>
> I will approve this blindly this time, because I hope and am sure you will
> immediately take care of regressions should those occur...
>
>
> --
> https://code.launchpad.net/~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic/+merge/161279
> You are the owner of lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic.

--
Sam Spilsbury

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Can you verify it please?
>
If you ask me to, how can I say no ?
;)

But it'll take a few hours until I can get to it...

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

I get this error, when trying to install this branch locally (probably not related to changes in this branch):

...
copying build/locale/or/ccsm.mo -> /home/mcr2010/staging/share/locale/or/LC_MESSAGES
copying build/locale/pl/ccsm.mo -> /home/mcr2010/staging/share/locale/pl/LC_MESSAGES
running install_egg_info
Removing /home/mcr2010/staging/lib/python2.7/site-packages/ccsm-0.9.10.0-py2.7.egg-info
Writing /home/mcr2010/staging/lib/python2.7/site-packages/ccsm-0.9.10.0-py2.7.egg-info
gtk-update-icon-cache: Cache file created successfully.
Updating Gtk icon cache.
CMake Error at compizconfig/gconf/cmake_install.cmake:50 (FILE):
  file cannot create directory: /compizconfig/backends. Maybe need
  administrative privileges.
Call Stack (most recent call first):
  compizconfig/cmake_install.cmake:41 (INCLUDE)
  cmake_install.cmake:85 (INCLUDE)

make: *** [install] Error 1

I do not know why I cannot install locally, but I do not want to try to sudo it through...

Installing this way worked not long ago, recently I was not forced to do it, because I was just replacing the compiled plugin binaries manually to test them...

review: Abstain
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Sam, I got this report (quote by bryonak, who is helping with testing):
"
@MC Return:
Sadly, this one doesn't work well. Window move and pointer flipping work flawlessly, but d&d has some issues. Moreover, after trying to d&d, the other two stop working. Here's a video of it: http://caleo.dyx.ch/stuff/.compiz/flipping.mp4
"

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Did the other tester also install the core patch or just the wall plugin.

The core patch is necessary to prevent he bug which the tester has referred
to.
On 28/04/2013 11:07 PM, "MC Return" <email address hidden> wrote:

> Sam, I got this report (quote by bryonak, who is helping with testing):
> "
> @MC Return:
> Sadly, this one doesn't work well. Window move and pointer flipping work
> flawlessly, but d&d has some issues. Moreover, after trying to d&d, the
> other two stop working. Here's a video of it:
> http://caleo.dyx.ch/stuff/.compiz/flipping.mp4
> "
> --
>
> https://code.launchpad.net/~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic/+merge/161279
> You are the owner of
> lp:~smspillaz/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken.wall_edge_flip_logic.
>

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Sam, could you merge trunk into this branch ? -> then I could test it myself as IIRC the bug I had above is already fixed in trunk...

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Forget it -> (I could do it locally myself)

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Ping.

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Ping.

Sorry for the delay -> it is due to the core-changing nature of this MP.
I still had no chance to test this properly... :(
My suggestion would be this, to not hold up this any longer:

First we merge lp:~mc-return/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken into lp:compiz, then this branch here afterwards.

Currently I have this PPA running here locally: gebner/compiz-cms
It correctly updates and has the latest Compiz core from trunk in it.
I could then run the latest version of trunk here and would spot regressions or non-functionality of wall then. In the worst case we could revert this branch, which probably won't be necessary anyway...

How about this plan ?

review: Needs Information
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

On Sat, May 11, 2013 at 5:07 PM, MC Return <email address hidden> wrote:
> Review: Needs Information
>
>> Ping.
>
> Sorry for the delay -> it is due to the core-changing nature of this MP.
> I still had no chance to test this properly... :(
> My suggestion would be this, to not hold up this any longer:
> ...
> Currently I have this PPA running here locally: gebner/compiz-cms
> It correctly updates and has the latest Compiz core from trunk in it.
> I could then run the latest version of trunk here and would spot regressions or non-functionality of wall then. In the worst case we could revert this branch, which probably won't be necessary anyway...

Huh?

What's stopping you from compiling compiz and unity locally?

The reason why I proposed this one is because
lp:~mc-return/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken
breaks edge-flip-dnd.

--
Sam Spilsbury

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

>
> Huh?
>
> What's stopping you from compiling compiz and unity locally?
>
My additionally installed lenses/scopes, Compiz plugins and special CCSM settings.

> The reason why I proposed this one is because
> lp:~mc-return/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-broken
> breaks edge-flip-dnd.
>
For maximally 3 hours until your branch lands and just in trunk, while fixing all
those other things ;)
Come on, now you must be joking...

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> >
> > Huh?
> >
> > What's stopping you from compiling compiz and unity locally?
> >
> My additionally installed lenses/scopes, Compiz plugins and special CCSM
> settings.
>
> > The reason why I proposed this one is because
> > lp:~mc-return/compiz/compiz.merge-fix771448-desktop-wall-edge-flipping-
> broken
> > breaks edge-flip-dnd.
> >
> For maximally 3 hours until your branch lands and just in trunk, while fixing
> all
> those other things ;)
> Come on, now you must be joking...

No, I'm not.

1. I know its broken. It would be unconscionable for me to land something that I know is broken.
2. Landing this doesn't change the fact that you can't yet test the branch that fixes it because it requires a core change.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Hmm, merge conflicts I see.

review: Needs Fixing
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Hmm, merge conflicts I see.

It is just the ABI logic change...
I merged latest lp:compiz to the other branch already.

Please fix the conflict, I will test this ASAP to get it off the table finally...

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Back to needs-review again so this gets noticed.

Can you merge your branch with lp:compiz again? Just merged mine but yours is behind again.

Revision history for this message
Sam Spilsbury (smspillaz) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Back to needs-review again so this gets noticed.
>
I did not forget it, there's just so much to do...

> Can you merge your branch with lp:compiz again? Just merged mine but yours is
> behind again.
Just noticed, sorry...
I will do it right now.

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Can you merge your branch with lp:compiz again? Just merged mine but yours is
> behind again.

Done and pushed...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/wall/src/wall.cpp'
2--- plugins/wall/src/wall.cpp 2013-05-11 09:13:17 +0000
3+++ plugins/wall/src/wall.cpp 2013-05-15 10:42:26 +0000
4@@ -495,23 +495,19 @@
5
6 moveViewport (-dx, -dy, None);
7 }
8- if (event->xclient.message_type == Atoms::xdndEnter)
9- {
10- toggleEdges (true);
11- edgeDrag = true;
12- }
13- else if (event->xclient.message_type == Atoms::xdndLeave)
14- edgeDrag = false;
15
16 break;
17
18 case FocusIn:
19 case FocusOut:
20- if (event->xfocus.mode == NotifyGrab)
21- poller.start ();
22- else if (event->xfocus.mode == NotifyUngrab)
23- poller.stop ();
24- break;
25+ /* Edges on when grabbed */
26+ if (!optionGetEdgeflipPointer ())
27+ {
28+ if (event->xfocus.mode == NotifyGrab)
29+ toggleEdges (true);
30+ else if (event->xfocus.mode == NotifyUngrab)
31+ toggleEdges (false);
32+ }
33
34 case ConfigureNotify:
35 break;
36@@ -523,20 +519,33 @@
37 screen->handleEvent (event);
38 }
39
40+/*
41+ * When a dnd type window is mapped toggle edge flip dnd windows back on
42+ * _NET_WM_WINDOW_TYPE_DND windows. This will not detect all dnd windows
43+ * but it will detect the EWMH-compliant ones without resorting to
44+ * hacks involving selection stealing.
45+ */
46 void
47-WallScreen::positionUpdate (const CompPoint &pos)
48+WallWindow::windowNotify (CompWindowNotify n)
49 {
50- if (edgeDrag)
51- return;
52+ WallScreen *ws = WallScreen::get (screen);
53+ bool toggleOnDnd = ws->optionGetEdgeflipDnd ();
54
55- if (edgeRegion.contains (pos))
56- toggleEdges (false);
57- else if (noEdgeRegion.contains (pos))
58+ switch (n)
59 {
60- if (!screen->grabbed ())
61- poller.stop ();
62- toggleEdges (true);
63+ case CompWindowNotifyMap:
64+ if (window->type () & CompWindowTypeDndMask && toggleOnDnd)
65+ ws->toggleEdges (true);
66+ break;
67+ case CompWindowNotifyUnmap:
68+ if (window->type () & CompWindowTypeDndMask && toggleOnDnd)
69+ ws->toggleEdges (false);
70+ break;
71+ default:
72+ break;
73 }
74+
75+ window->windowNotify (n);
76 }
77
78 void
79@@ -599,19 +608,19 @@
80 void
81 WallWindow::grabNotify (int x,
82 int y,
83- unsigned int width,
84- unsigned int height)
85+ unsigned int state,
86+ unsigned int mask)
87 {
88- WallScreen::get (screen)->toggleEdges (true);
89- WallScreen::get (screen)->edgeDrag = true;
90+ if (mask & (CompWindowGrabMoveMask | CompWindowGrabButtonMask))
91+ WallScreen::get (screen)->windowIsDragMoved = true;
92
93- window->grabNotify (x, y, width, height);
94+ window->grabNotify (x, y, state, mask);
95 }
96
97 void
98 WallWindow::ungrabNotify ()
99 {
100- WallScreen::get (screen)->edgeDrag = false;
101+ WallScreen::get (screen)->windowIsDragMoved = false;
102
103 window->ungrabNotify ();
104 }
105@@ -760,30 +769,16 @@
106 int dx, dy;
107 int amountX, amountY;
108
109- if (screen->otherGrabExist ("wall", "move", "group-drag", NULL))
110- return false;
111+ const bool allowFlipDnd = (state & CompAction::StateInitEdgeDnd) &&
112+ optionGetEdgeflipDnd ();
113+ const bool allowFlipMove = (windowIsDragMoved &&
114+ optionGetEdgeflipMove ());
115+ const bool allowFlipPointer = optionGetEdgeflipPointer ();
116
117- if (state & CompAction::StateInitEdgeDnd)
118- {
119- if (!optionGetEdgeflipDnd ())
120- return false;
121- }
122- else if (screen->grabExist ("move"))
123- {
124- if (!optionGetEdgeflipMove ())
125- return false;
126- }
127- else if (screen->grabExist ("group-drag"))
128- {
129- if (!optionGetEdgeflipDnd ())
130- return false;
131- }
132- else if (!optionGetEdgeflipPointer ())
133- {
134- toggleEdges (false);
135- poller.start ();
136+ if (!allowFlipDnd &&
137+ !allowFlipMove &&
138+ !allowFlipPointer)
139 return false;
140- }
141
142 switch (direction)
143 {
144@@ -1573,6 +1568,9 @@
145 ww->isSliding = !optionGetNoSlideMatch ().evaluate (w);
146 }
147 break;
148+ case WallOptions::EdgeflipPointer:
149+ toggleEdges (optionGetEdgeflipPointer ());
150+ break;
151
152 default:
153 break;
154@@ -1633,7 +1631,7 @@
155 moveWindow (None),
156 focusDefault (true),
157 transform (NoTransformation),
158- edgeDrag (false)
159+ windowIsDragMoved (false)
160 {
161 ScreenInterface::setHandler (screen);
162 CompositeScreenInterface::setHandler (cScreen);
163@@ -1700,9 +1698,6 @@
164 setNotify (ArrowShadowColor);
165 setNotify (NoSlideMatch);
166 setNotify (EdgeflipPointer);
167-
168- poller.setCallback (boost::bind (&WallScreen::positionUpdate, this,
169- _1));
170 }
171
172 WallScreen::~WallScreen ()
173@@ -1731,8 +1726,7 @@
174 {
175 if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) &&
176 CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) &&
177- CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) &&
178- CompPlugin::checkPluginABI ("mousepoll", COMPIZ_MOUSEPOLL_ABI))
179+ CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI))
180 return true;
181
182 return false;
183
184=== modified file 'plugins/wall/src/wall.h'
185--- plugins/wall/src/wall.h 2013-04-26 13:15:57 +0000
186+++ plugins/wall/src/wall.h 2013-05-15 10:42:26 +0000
187@@ -167,10 +167,7 @@
188 WallCairoContext highlightContext;
189 WallCairoContext arrowContext;
190
191- MousePoller poller;
192- bool edgeDrag;
193- CompRegion edgeRegion;
194- CompRegion noEdgeRegion;
195+ bool windowIsDragMoved;
196 };
197
198 class WallWindow :
199@@ -184,6 +181,7 @@
200 virtual void activate ();
201 void grabNotify (int, int, unsigned int, unsigned int);
202 void ungrabNotify ();
203+ void windowNotify (CompWindowNotify);
204 bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,
205 const CompRegion &, unsigned int);
206
207
208=== modified file 'plugins/wall/wall.xml.in'
209--- plugins/wall/wall.xml.in 2012-10-15 10:31:51 +0000
210+++ plugins/wall/wall.xml.in 2013-05-15 10:42:26 +0000
211@@ -17,7 +17,6 @@
212 </relation>
213 <requirement>
214 <plugin>opengl</plugin>
215- <plugin>mousepoll</plugin>
216 </requirement>
217 </deps>
218 <options>
219@@ -290,6 +289,7 @@
220 <edge name="Left"/>
221 </default>
222 <allowed edgednd="true"/>
223+ <passive_grab>false</passive_grab>
224 </option>
225 <option name="flip_right_edge" type="edge">
226 <_short>Flip Right</_short>
227@@ -299,6 +299,7 @@
228 <edge name="Right"/>
229 </default>
230 <allowed edgednd="true"/>
231+ <passive_grab>false</passive_grab>
232 </option>
233 <option name="flip_up_edge" type="edge">
234 <_short>Flip Up</_short>
235@@ -308,6 +309,7 @@
236 <edge name="Top"/>
237 </default>
238 <allowed edgednd="true"/>
239+ <passive_grab>false</passive_grab>
240 </option>
241 <option name="flip_down_edge" type="edge">
242 <_short>Flip Down</_short>
243@@ -317,6 +319,7 @@
244 <edge name="Bottom"/>
245 </default>
246 <allowed edgednd="true"/>
247+ <passive_grab>false</passive_grab>
248 </option>
249 </subgroup>
250 </group>
251
252=== modified file 'src/screen.cpp'
253--- src/screen.cpp 2013-05-12 08:20:10 +0000
254+++ src/screen.cpp 2013-05-15 10:42:26 +0000
255@@ -3487,7 +3487,8 @@
256 void
257 CompScreenImpl::removeAction (CompAction *action)
258 {
259- if (!(privateScreen.initialized || action->active ()))
260+ if (!privateScreen.initialized ||
261+ !action->active ())
262 return;
263
264 grabManager.setCurrentState(action->state());
265@@ -3903,6 +3904,11 @@
266 SubstructureRedirectMask | SubstructureNotifyMask, &xev);
267 }
268
269+/* These functions do not guard against negative decrements
270+ * as they are unable to determine the source of the reference
271+ * and as such they should only be called by functions that
272+ * actually determine the source of what was referencing the
273+ * edge and can guard against multiple-references-per-owner */
274 void
275 PrivateScreen::enableEdge (int edge)
276 {
277
278=== added directory 'tests/manual/plugins'
279=== added file 'tests/manual/plugins/wall.txt'
280--- tests/manual/plugins/wall.txt 1970-01-01 00:00:00 +0000
281+++ tests/manual/plugins/wall.txt 2013-05-15 10:42:26 +0000
282@@ -0,0 +1,49 @@
283+COMPIZ WALL PLUGIN MANUAL TESTS
284+===============================
285+Sam Spilsbury <smspillaz@gmail.com>
286+
287+Edge Flip Pointer
288+-----------------
289+Setup:
290+#. Enable "Edge Flip Pointer" in the wall plugin
291+ and set up screen edges as appropriate
292+
293+Actions:
294+#. Move cursor to relevant screen edge
295+#. Viewport will change to the next one
296+ over
297+#. Viewport will not change if that
298+ viewport is the last one in the row
299+ or column
300+
301+Edge Flip Move
302+--------------
303+Setup:
304+#. Disable "Edge Flip Pointer" in the wall plugin,
305+ enable "Edge Flip Move" in the wall plugin,
306+ and set up screen edges as appropriate
307+
308+Actions:
309+#. Grab window by titlebar
310+#. Move cursor to relevant screen edge
311+#. Viewport will change to the next one
312+ over while window is grabbed
313+#. Viewport will not change if that
314+ viewport is the last one in the row
315+ or colum
316+
317+Edge Flip Dnd
318+-------------
319+Setup:
320+#. Disable "Edge Flip Pointer" in the wall plugin,
321+ enable "Edge Flip Dnd" in the wall plugin,
322+ and set up screen edges as appropriate
323+
324+Actions:
325+#. Grab a desktop icon
326+#. Move cursor to relevant screen edge
327+#. Viewport will change to the next one
328+ over while icon is grabbed
329+#. Viewport will not change if that
330+ viewport is the last one in the row
331+ or colum

Subscribers

People subscribed via source and target branches

to all changes: