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
=== modified file 'plugins/wall/src/wall.cpp'
--- plugins/wall/src/wall.cpp 2013-05-11 09:13:17 +0000
+++ plugins/wall/src/wall.cpp 2013-05-15 10:42:26 +0000
@@ -495,23 +495,19 @@
495495
496 moveViewport (-dx, -dy, None);496 moveViewport (-dx, -dy, None);
497 }497 }
498 if (event->xclient.message_type == Atoms::xdndEnter)
499 {
500 toggleEdges (true);
501 edgeDrag = true;
502 }
503 else if (event->xclient.message_type == Atoms::xdndLeave)
504 edgeDrag = false;
505498
506 break;499 break;
507500
508 case FocusIn:501 case FocusIn:
509 case FocusOut:502 case FocusOut:
510 if (event->xfocus.mode == NotifyGrab)503 /* Edges on when grabbed */
511 poller.start ();504 if (!optionGetEdgeflipPointer ())
512 else if (event->xfocus.mode == NotifyUngrab)505 {
513 poller.stop ();506 if (event->xfocus.mode == NotifyGrab)
514 break;507 toggleEdges (true);
508 else if (event->xfocus.mode == NotifyUngrab)
509 toggleEdges (false);
510 }
515511
516 case ConfigureNotify:512 case ConfigureNotify:
517 break;513 break;
@@ -523,20 +519,33 @@
523 screen->handleEvent (event);519 screen->handleEvent (event);
524}520}
525521
522/*
523 * When a dnd type window is mapped toggle edge flip dnd windows back on
524 * _NET_WM_WINDOW_TYPE_DND windows. This will not detect all dnd windows
525 * but it will detect the EWMH-compliant ones without resorting to
526 * hacks involving selection stealing.
527 */
526void528void
527WallScreen::positionUpdate (const CompPoint &pos)529WallWindow::windowNotify (CompWindowNotify n)
528{530{
529 if (edgeDrag)531 WallScreen *ws = WallScreen::get (screen);
530 return;532 bool toggleOnDnd = ws->optionGetEdgeflipDnd ();
531533
532 if (edgeRegion.contains (pos))534 switch (n)
533 toggleEdges (false);
534 else if (noEdgeRegion.contains (pos))
535 {535 {
536 if (!screen->grabbed ())536 case CompWindowNotifyMap:
537 poller.stop ();537 if (window->type () & CompWindowTypeDndMask && toggleOnDnd)
538 toggleEdges (true);538 ws->toggleEdges (true);
539 break;
540 case CompWindowNotifyUnmap:
541 if (window->type () & CompWindowTypeDndMask && toggleOnDnd)
542 ws->toggleEdges (false);
543 break;
544 default:
545 break;
539 }546 }
547
548 window->windowNotify (n);
540}549}
541550
542void551void
@@ -599,19 +608,19 @@
599void608void
600WallWindow::grabNotify (int x,609WallWindow::grabNotify (int x,
601 int y,610 int y,
602 unsigned int width,611 unsigned int state,
603 unsigned int height)612 unsigned int mask)
604{613{
605 WallScreen::get (screen)->toggleEdges (true);614 if (mask & (CompWindowGrabMoveMask | CompWindowGrabButtonMask))
606 WallScreen::get (screen)->edgeDrag = true;615 WallScreen::get (screen)->windowIsDragMoved = true;
607616
608 window->grabNotify (x, y, width, height);617 window->grabNotify (x, y, state, mask);
609}618}
610619
611void620void
612WallWindow::ungrabNotify ()621WallWindow::ungrabNotify ()
613{622{
614 WallScreen::get (screen)->edgeDrag = false;623 WallScreen::get (screen)->windowIsDragMoved = false;
615624
616 window->ungrabNotify ();625 window->ungrabNotify ();
617}626}
@@ -760,30 +769,16 @@
760 int dx, dy;769 int dx, dy;
761 int amountX, amountY;770 int amountX, amountY;
762771
763 if (screen->otherGrabExist ("wall", "move", "group-drag", NULL))772 const bool allowFlipDnd = (state & CompAction::StateInitEdgeDnd) &&
764 return false;773 optionGetEdgeflipDnd ();
774 const bool allowFlipMove = (windowIsDragMoved &&
775 optionGetEdgeflipMove ());
776 const bool allowFlipPointer = optionGetEdgeflipPointer ();
765777
766 if (state & CompAction::StateInitEdgeDnd)778 if (!allowFlipDnd &&
767 {779 !allowFlipMove &&
768 if (!optionGetEdgeflipDnd ())780 !allowFlipPointer)
769 return false;
770 }
771 else if (screen->grabExist ("move"))
772 {
773 if (!optionGetEdgeflipMove ())
774 return false;
775 }
776 else if (screen->grabExist ("group-drag"))
777 {
778 if (!optionGetEdgeflipDnd ())
779 return false;
780 }
781 else if (!optionGetEdgeflipPointer ())
782 {
783 toggleEdges (false);
784 poller.start ();
785 return false;781 return false;
786 }
787782
788 switch (direction)783 switch (direction)
789 {784 {
@@ -1573,6 +1568,9 @@
1573 ww->isSliding = !optionGetNoSlideMatch ().evaluate (w);1568 ww->isSliding = !optionGetNoSlideMatch ().evaluate (w);
1574 }1569 }
1575 break;1570 break;
1571 case WallOptions::EdgeflipPointer:
1572 toggleEdges (optionGetEdgeflipPointer ());
1573 break;
15761574
1577 default:1575 default:
1578 break;1576 break;
@@ -1633,7 +1631,7 @@
1633 moveWindow (None),1631 moveWindow (None),
1634 focusDefault (true),1632 focusDefault (true),
1635 transform (NoTransformation),1633 transform (NoTransformation),
1636 edgeDrag (false)1634 windowIsDragMoved (false)
1637{1635{
1638 ScreenInterface::setHandler (screen);1636 ScreenInterface::setHandler (screen);
1639 CompositeScreenInterface::setHandler (cScreen);1637 CompositeScreenInterface::setHandler (cScreen);
@@ -1700,9 +1698,6 @@
1700 setNotify (ArrowShadowColor);1698 setNotify (ArrowShadowColor);
1701 setNotify (NoSlideMatch);1699 setNotify (NoSlideMatch);
1702 setNotify (EdgeflipPointer);1700 setNotify (EdgeflipPointer);
1703
1704 poller.setCallback (boost::bind (&WallScreen::positionUpdate, this,
1705 _1));
1706}1701}
17071702
1708WallScreen::~WallScreen ()1703WallScreen::~WallScreen ()
@@ -1731,8 +1726,7 @@
1731{1726{
1732 if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) &&1727 if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) &&
1733 CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) &&1728 CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) &&
1734 CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) &&1729 CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI))
1735 CompPlugin::checkPluginABI ("mousepoll", COMPIZ_MOUSEPOLL_ABI))
1736 return true;1730 return true;
17371731
1738 return false;1732 return false;
17391733
=== modified file 'plugins/wall/src/wall.h'
--- plugins/wall/src/wall.h 2013-04-26 13:15:57 +0000
+++ plugins/wall/src/wall.h 2013-05-15 10:42:26 +0000
@@ -167,10 +167,7 @@
167 WallCairoContext highlightContext;167 WallCairoContext highlightContext;
168 WallCairoContext arrowContext;168 WallCairoContext arrowContext;
169169
170 MousePoller poller;170 bool windowIsDragMoved;
171 bool edgeDrag;
172 CompRegion edgeRegion;
173 CompRegion noEdgeRegion;
174};171};
175172
176class WallWindow :173class WallWindow :
@@ -184,6 +181,7 @@
184 virtual void activate ();181 virtual void activate ();
185 void grabNotify (int, int, unsigned int, unsigned int);182 void grabNotify (int, int, unsigned int, unsigned int);
186 void ungrabNotify ();183 void ungrabNotify ();
184 void windowNotify (CompWindowNotify);
187 bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,185 bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,
188 const CompRegion &, unsigned int);186 const CompRegion &, unsigned int);
189187
190188
=== modified file 'plugins/wall/wall.xml.in'
--- plugins/wall/wall.xml.in 2012-10-15 10:31:51 +0000
+++ plugins/wall/wall.xml.in 2013-05-15 10:42:26 +0000
@@ -17,7 +17,6 @@
17 </relation>17 </relation>
18 <requirement>18 <requirement>
19 <plugin>opengl</plugin>19 <plugin>opengl</plugin>
20 <plugin>mousepoll</plugin>
21 </requirement>20 </requirement>
22 </deps>21 </deps>
23 <options>22 <options>
@@ -290,6 +289,7 @@
290 <edge name="Left"/>289 <edge name="Left"/>
291 </default>290 </default>
292 <allowed edgednd="true"/>291 <allowed edgednd="true"/>
292 <passive_grab>false</passive_grab>
293 </option>293 </option>
294 <option name="flip_right_edge" type="edge">294 <option name="flip_right_edge" type="edge">
295 <_short>Flip Right</_short>295 <_short>Flip Right</_short>
@@ -299,6 +299,7 @@
299 <edge name="Right"/>299 <edge name="Right"/>
300 </default>300 </default>
301 <allowed edgednd="true"/>301 <allowed edgednd="true"/>
302 <passive_grab>false</passive_grab>
302 </option>303 </option>
303 <option name="flip_up_edge" type="edge">304 <option name="flip_up_edge" type="edge">
304 <_short>Flip Up</_short>305 <_short>Flip Up</_short>
@@ -308,6 +309,7 @@
308 <edge name="Top"/>309 <edge name="Top"/>
309 </default>310 </default>
310 <allowed edgednd="true"/>311 <allowed edgednd="true"/>
312 <passive_grab>false</passive_grab>
311 </option>313 </option>
312 <option name="flip_down_edge" type="edge">314 <option name="flip_down_edge" type="edge">
313 <_short>Flip Down</_short>315 <_short>Flip Down</_short>
@@ -317,6 +319,7 @@
317 <edge name="Bottom"/>319 <edge name="Bottom"/>
318 </default>320 </default>
319 <allowed edgednd="true"/>321 <allowed edgednd="true"/>
322 <passive_grab>false</passive_grab>
320 </option>323 </option>
321 </subgroup>324 </subgroup>
322 </group>325 </group>
323326
=== modified file 'src/screen.cpp'
--- src/screen.cpp 2013-05-12 08:20:10 +0000
+++ src/screen.cpp 2013-05-15 10:42:26 +0000
@@ -3487,7 +3487,8 @@
3487void3487void
3488CompScreenImpl::removeAction (CompAction *action)3488CompScreenImpl::removeAction (CompAction *action)
3489{3489{
3490 if (!(privateScreen.initialized || action->active ()))3490 if (!privateScreen.initialized ||
3491 !action->active ())
3491 return;3492 return;
34923493
3493 grabManager.setCurrentState(action->state());3494 grabManager.setCurrentState(action->state());
@@ -3903,6 +3904,11 @@
3903 SubstructureRedirectMask | SubstructureNotifyMask, &xev);3904 SubstructureRedirectMask | SubstructureNotifyMask, &xev);
3904}3905}
39053906
3907/* These functions do not guard against negative decrements
3908 * as they are unable to determine the source of the reference
3909 * and as such they should only be called by functions that
3910 * actually determine the source of what was referencing the
3911 * edge and can guard against multiple-references-per-owner */
3906void3912void
3907PrivateScreen::enableEdge (int edge)3913PrivateScreen::enableEdge (int edge)
3908{3914{
39093915
=== added directory 'tests/manual/plugins'
=== added file 'tests/manual/plugins/wall.txt'
--- tests/manual/plugins/wall.txt 1970-01-01 00:00:00 +0000
+++ tests/manual/plugins/wall.txt 2013-05-15 10:42:26 +0000
@@ -0,0 +1,49 @@
1COMPIZ WALL PLUGIN MANUAL TESTS
2===============================
3Sam Spilsbury <smspillaz@gmail.com>
4
5Edge Flip Pointer
6-----------------
7Setup:
8#. Enable "Edge Flip Pointer" in the wall plugin
9 and set up screen edges as appropriate
10
11Actions:
12#. Move cursor to relevant screen edge
13#. Viewport will change to the next one
14 over
15#. Viewport will not change if that
16 viewport is the last one in the row
17 or column
18
19Edge Flip Move
20--------------
21Setup:
22#. Disable "Edge Flip Pointer" in the wall plugin,
23 enable "Edge Flip Move" in the wall plugin,
24 and set up screen edges as appropriate
25
26Actions:
27#. Grab window by titlebar
28#. Move cursor to relevant screen edge
29#. Viewport will change to the next one
30 over while window is grabbed
31#. Viewport will not change if that
32 viewport is the last one in the row
33 or colum
34
35Edge Flip Dnd
36-------------
37Setup:
38#. Disable "Edge Flip Pointer" in the wall plugin,
39 enable "Edge Flip Dnd" in the wall plugin,
40 and set up screen edges as appropriate
41
42Actions:
43#. Grab a desktop icon
44#. Move cursor to relevant screen edge
45#. Viewport will change to the next one
46 over while icon is grabbed
47#. Viewport will not change if that
48 viewport is the last one in the row
49 or colum

Subscribers

People subscribed via source and target branches

to all changes: