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: Superseded
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: 3814 lines (+1207/-942) (has conflicts)
32 files modified
CMakeLists.txt (+1/-1)
debian/patches/100_workaround_virtualbox_hang.patch (+14/-22)
debian/patches/ubuntu-config.patch (+31/-61)
plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h (+1/-1)
plugins/compiztoolbox/src/compiztoolbox.cpp (+2/-2)
plugins/decor/src/pixmap-requests/tests/integration/xorg-gtest/CMakeLists.txt (+1/-1)
plugins/grid/grid.xml.in (+459/-455)
plugins/grid/src/grid.cpp (+103/-97)
plugins/grid/src/grid.h (+88/-60)
plugins/kdecompat/src/kdecompat.cpp (+1/-1)
plugins/put/put.xml.in (+8/-0)
plugins/put/src/put.cpp (+10/-2)
plugins/put/src/put.h (+9/-8)
plugins/resize/src/logic/src/resize-logic.cpp (+20/-18)
plugins/resize/src/resize.cpp (+19/-19)
plugins/ring/src/ring.cpp (+2/-2)
plugins/scale/src/scale.cpp (+1/-1)
plugins/shift/src/shift.cpp (+4/-0)
plugins/stackswitch/src/stackswitch.cpp (+10/-0)
plugins/staticswitcher/src/staticswitcher.cpp (+2/-0)
plugins/staticswitcher/src/staticswitcher.h (+1/-1)
plugins/wall/src/wall.cpp (+75/-19)
plugins/wall/src/wall.h (+2/-4)
plugins/wall/wall.xml.in (+4/-1)
plugins/wobbly/src/wobbly.cpp (+115/-153)
src/privatescreen.h (+1/-0)
src/screen.cpp (+14/-4)
tests/acceptance-tests/xorg-gtest/tests/CMakeLists.txt (+1/-1)
tests/manual/plugins/wall.txt (+49/-0)
tests/system/xorg-gtest/tests/CMakeLists.txt (+1/-1)
tests/xorg-gtest/CMakeLists.txt (+4/-7)
tests/xorg-gtest/src/compiz_xorg_gtest_main.cpp (+154/-0)
Text conflict in plugins/grid/src/grid.cpp
Text conflict in plugins/shift/src/shift.cpp
Text conflict in plugins/stackswitch/src/stackswitch.cpp
Text conflict in plugins/wall/src/wall.cpp
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 (community) Needs Fixing
MC Return Pending
Review via email: mp+163452@code.launchpad.net

This proposal supersedes a proposal from 2013-04-27.

This proposal has been superseded by a proposal from 2013-05-15.

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 :

Hmm, merge conflicts I see.

review: Needs Fixing
Revision history for this message
MC Return (mc-return) wrote :

> 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 :

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) :
review: Needs Fixing
Revision history for this message
MC Return (mc-return) wrote :

> 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 :

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

Done and pushed...

3680. By Sam Spilsbury

Merge from upstream

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-02-27 11:48:55 +0000
3+++ CMakeLists.txt 2013-05-13 13:29:47 +0000
4@@ -104,7 +104,7 @@
5 x11-xcb
6 xrandr
7 xinerama
8- xext
9+ xi
10 ice
11 sm
12 libxml-2.0
13
14=== modified file 'debian/patches/100_workaround_virtualbox_hang.patch'
15--- debian/patches/100_workaround_virtualbox_hang.patch 2013-02-17 07:28:12 +0000
16+++ debian/patches/100_workaround_virtualbox_hang.patch 2013-05-13 13:29:47 +0000
17@@ -1,8 +1,6 @@
18-Index: compiz/plugins/opengl/include/opengl/opengl.h
19-===================================================================
20---- compiz.orig/plugins/opengl/include/opengl/opengl.h 2013-02-17 10:22:08.012876000 +0800
21-+++ compiz/plugins/opengl/include/opengl/opengl.h 2013-02-17 10:23:36.643958000 +0800
22-@@ -578,6 +578,17 @@
23+--- a/plugins/opengl/include/opengl/opengl.h
24++++ b/plugins/opengl/include/opengl/opengl.h
25+@@ -582,6 +582,17 @@
26
27 extern GLScreenPaintAttrib defaultScreenPaintAttrib;
28
29@@ -20,7 +18,7 @@
30 class GLScreen;
31 class GLFramebufferObject;
32 class GLScreenInterface;
33-@@ -770,6 +781,13 @@
34+@@ -774,6 +785,13 @@
35
36 bool glInitContext (XVisualInfo *);
37
38@@ -34,11 +32,9 @@
39 WRAPABLE_HND (0, GLScreenInterface, bool, glPaintOutput,
40 const GLScreenPaintAttrib &, const GLMatrix &,
41 const CompRegion &, CompOutput *, unsigned int);
42-Index: compiz/plugins/opengl/src/privates.h
43-===================================================================
44---- compiz.orig/plugins/opengl/src/privates.h 2013-02-17 10:22:08.012876000 +0800
45-+++ compiz/plugins/opengl/src/privates.h 2013-02-17 10:23:36.643958000 +0800
46-@@ -46,6 +46,24 @@
47+--- a/plugins/opengl/src/privates.h
48++++ b/plugins/opengl/src/privates.h
49+@@ -47,6 +47,24 @@
50
51 extern CompOutput *targetOutput;
52
53@@ -63,7 +59,7 @@
54 class GLDoubleBuffer :
55 public compiz::opengl::DoubleBuffer
56 {
57-@@ -122,6 +140,7 @@
58+@@ -123,6 +141,7 @@
59 class PrivateGLScreen :
60 public ScreenInterface,
61 public compiz::composite::PaintHandler,
62@@ -71,7 +67,7 @@
63 public OpenglOptions
64 {
65 public:
66-@@ -206,6 +225,7 @@
67+@@ -207,6 +226,7 @@
68 std::vector<GLTexture::BindPixmapProc> bindPixmap;
69 bool hasCompositing;
70 bool commonFrontbuffer;
71@@ -79,7 +75,7 @@
72 bool incorrectRefreshRate; // hack for NVIDIA specifying an incorrect
73 // refresh rate, causing us to miss vblanks
74
75-@@ -225,6 +245,10 @@
76+@@ -226,6 +246,10 @@
77
78 mutable CompString prevRegex;
79 mutable bool prevBlacklisted;
80@@ -90,10 +86,8 @@
81 };
82
83 class PrivateGLWindow :
84-Index: compiz/plugins/opengl/src/screen.cpp
85-===================================================================
86---- compiz.orig/plugins/opengl/src/screen.cpp 2013-02-17 10:22:08.012876000 +0800
87-+++ compiz/plugins/opengl/src/screen.cpp 2013-02-17 10:23:36.643958000 +0800
88+--- a/plugins/opengl/src/screen.cpp
89++++ b/plugins/opengl/src/screen.cpp
90 @@ -67,6 +67,7 @@
91
92
93@@ -148,10 +142,8 @@
94 if (strstr (glExtensions, "GL_ARB_texture_non_power_of_two"))
95 GL::textureNonPowerOfTwo = true;
96 GL::textureNonPowerOfTwoMipmap = GL::textureNonPowerOfTwo;
97-Index: compiz/plugins/opengl/src/texture.cpp
98-===================================================================
99---- compiz.orig/plugins/opengl/src/texture.cpp 2013-02-17 10:22:08.012876000 +0800
100-+++ compiz/plugins/opengl/src/texture.cpp 2013-02-17 10:23:36.643958000 +0800
101+--- a/plugins/opengl/src/texture.cpp
102++++ b/plugins/opengl/src/texture.cpp
103 @@ -41,6 +41,7 @@
104 #include "glx-tfp-bind.h"
105
106
107=== modified file 'debian/patches/ubuntu-config.patch'
108--- debian/patches/ubuntu-config.patch 2013-02-14 05:47:11 +0000
109+++ debian/patches/ubuntu-config.patch 2013-05-13 13:29:47 +0000
110@@ -204,7 +204,6 @@
111 <min>0</min>
112 <max>1</max>
113 <precision>0.01</precision>
114-
115 --- a/plugins/decor/decor.xml.in
116 +++ b/plugins/decor/decor.xml.in
117 @@ -31,7 +31,7 @@
118@@ -243,7 +242,6 @@
119 </option>
120 <option name="mipmap" type="bool">
121 <_short>Mipmap</_short>
122-
123 --- a/plugins/expo/expo.xml.in
124 +++ b/plugins/expo/expo.xml.in
125 @@ -17,6 +17,7 @@
126@@ -321,15 +319,6 @@
127 <min>0.0</min>
128 <max>100.0</max>
129 <precision>0.1</precision>
130-@@ -211,7 +209,7 @@
131- <option name="vp_saturation" type="float">
132- <_short>Saturation</_short>
133- <_long>Inactive viewport saturation.</_long>
134-- <default>100.0</default>
135-+ <default>40.0</default>
136- <min>0.0</min>
137- <max>100.0</max>
138- <precision>0.1</precision>
139 @@ -223,7 +221,7 @@
140 <red>0xfbfb</red>
141 <green>0x8b8b</green>
142@@ -348,16 +337,6 @@
143 </option>
144 <option name="ground_color1" type="color">
145 <_short>Ground color(near)</_short>
146-@@ -265,7 +263,7 @@
147- <option name="scale_factor" type="float">
148- <_short>Reflection Scale</_short>
149- <_long>Scale factor of the expo wall reflection</_long>
150-- <default>0.75</default>
151-+ <default>1.0</default>
152- <min>0.0</min>
153- <max>2.0</max>
154- <precision>0.01</precision>
155-
156 --- a/plugins/ezoom/ezoom.xml.in
157 +++ b/plugins/ezoom/ezoom.xml.in
158 @@ -29,7 +29,6 @@
159@@ -393,7 +372,6 @@
160 </option>
161 </subgroup>
162 </group>
163-
164 --- a/plugins/fade/fade.xml.in
165 +++ b/plugins/fade/fade.xml.in
166 @@ -10,6 +10,7 @@
167@@ -413,7 +391,6 @@
168 </option>
169 <option name="visual_bell" type="bell">
170 <_short>Visual Bell</_short>
171-
172 --- a/plugins/gnomecompat/gnomecompat.xml.in
173 +++ b/plugins/gnomecompat/gnomecompat.xml.in
174 @@ -53,6 +53,7 @@
175@@ -424,38 +401,6 @@
176 </option>
177 </group>
178 </options>
179-
180---- a/plugins/grid/grid.xml.in
181-+++ b/plugins/grid/grid.xml.in
182-@@ -23,17 +23,16 @@
183- <option name="put_center_key" type="key">
184- <_short>Put Center</_short>
185- <_long>Move window to the center</_long>
186-- <default>&lt;Control&gt;&lt;Alt&gt;KP_5</default>
187- </option>
188- <option name="put_left_key" type="key">
189- <_short>Put Left</_short>
190- <_long>Move window to the left edge</_long>
191-- <default>&lt;Control&gt;&lt;Alt&gt;KP_4</default>
192-+ <default>&lt;Control&gt;&lt;Super&gt;Left</default>
193- </option>
194- <option name="put_right_key" type="key">
195- <_short>Put Right</_short>
196- <_long>Move window to the right edge</_long>
197-- <default>&lt;Control&gt;&lt;Alt&gt;KP_6</default>
198-+ <default>&lt;Control&gt;&lt;Super&gt;Right</default>
199- </option>
200- <option name="put_top_key" type="key">
201- <_short>Put Top</_short>
202-@@ -68,7 +67,6 @@
203- <option name="put_maximize_key" type="key">
204- <_short>Maximize</_short>
205- <_long>Maximize window</_long>
206-- <default>&lt;Control&gt;&lt;Alt&gt;KP_0</default>
207- </option>
208- <option name="put_restore_key" type="key">
209- <_short>Restore</_short>
210-
211 --- a/plugins/place/place.xml.in
212 +++ b/plugins/place/place.xml.in
213 @@ -20,8 +20,8 @@
214@@ -469,7 +414,6 @@
215 <max>5</max>
216 <desc>
217 <value>0</value>
218-
219 --- a/plugins/resize/resize.xml.in
220 +++ b/plugins/resize/resize.xml.in
221 @@ -28,7 +28,7 @@
222@@ -516,7 +460,6 @@
223 </default>
224 </option>
225 <subgroup>
226-
227 --- a/plugins/scale/scale.xml.in
228 +++ b/plugins/scale/scale.xml.in
229 @@ -19,14 +19,14 @@
230@@ -607,7 +550,6 @@
231 </option>
232 </group>
233 </options>
234-
235 --- a/plugins/staticswitcher/staticswitcher.xml.in
236 +++ b/plugins/staticswitcher/staticswitcher.xml.in
237 @@ -11,7 +11,6 @@
238@@ -686,7 +628,6 @@
239 <desc>
240 <value>0</value>
241 <_name>None</_name>
242-
243 --- a/plugins/vpswitch/vpswitch.xml.in
244 +++ b/plugins/vpswitch/vpswitch.xml.in
245 @@ -95,13 +95,11 @@
246@@ -703,7 +644,6 @@
247 <internal/>
248 </option>
249 <option name="initiate_button" type="button">
250-
251 --- a/plugins/wall/wall.xml.in
252 +++ b/plugins/wall/wall.xml.in
253 @@ -31,12 +31,12 @@
254@@ -853,7 +793,6 @@
255 </option>
256 <option name="edgeflip_dnd" type="bool">
257 <_short>Edge Flip DnD</_short>
258-
259 --- a/tests/system/xorg-gtest/tests/compiz_xorg_gtest_ewmh.cpp
260 +++ b/tests/system/xorg-gtest/tests/compiz_xorg_gtest_ewmh.cpp
261 @@ -46,7 +46,7 @@
262@@ -865,3 +804,34 @@
263 unsigned int DEFAULT_VIEWPORT_HEIGHT = 1;
264
265 bool Advance (Display *d, bool r)
266+--- a/plugins/grid/grid.xml.in
267++++ b/plugins/grid/grid.xml.in
268+@@ -23,17 +23,16 @@
269+ <option name="put_center_key" type="key">
270+ <_short>Put Center Key</_short>
271+ <_long>Move window to the center.</_long>
272+- <default>&lt;Control&gt;&lt;Alt&gt;KP_5</default>
273+ </option>
274+ <option name="put_left_key" type="key">
275+ <_short>Put Left Key</_short>
276+ <_long>Move window to the left edge.</_long>
277+- <default>&lt;Control&gt;&lt;Alt&gt;KP_4</default>
278++ <default>&lt;Control&gt;&lt;Super&gt;Left</default>
279+ </option>
280+ <option name="put_right_key" type="key">
281+ <_short>Put Right Key</_short>
282+ <_long>Move window to the right edge.</_long>
283+- <default>&lt;Control&gt;&lt;Alt&gt;KP_6</default>
284++ <default>&lt;Control&gt;&lt;Super&gt;Right</default>
285+ </option>
286+ <option name="put_top_key" type="key">
287+ <_short>Put Top Key</_short>
288+@@ -73,7 +72,7 @@
289+ <option name="put_restore_key" type="key">
290+ <_short>Restore</_short>
291+ <_long>Restore window to it's original size. Note: Use the same shortcut you are using to unmaximize a window to be able to restore grid-maximized windows.</_long>
292+- <default>&lt;Alt&gt;F5</default>
293++ <default>&lt;Control&gt;&lt;Super&gt;Down</default>
294+ </option>
295+ </group>
296+ <group>
297
298=== modified file 'plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h'
299--- plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h 2012-09-07 22:37:20 +0000
300+++ plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h 2013-05-13 13:29:47 +0000
301@@ -162,6 +162,6 @@
302 };
303
304 extern const unsigned short ICON_SIZE;
305-extern const unsigned int MAX_ICON_SIZE;
306+extern const unsigned short MAX_ICON_SIZE;
307
308 #endif
309
310=== modified file 'plugins/compiztoolbox/src/compiztoolbox.cpp'
311--- plugins/compiztoolbox/src/compiztoolbox.cpp 2013-05-09 13:43:07 +0000
312+++ plugins/compiztoolbox/src/compiztoolbox.cpp 2013-05-13 13:29:47 +0000
313@@ -29,8 +29,8 @@
314 #include <core/abiversion.h>
315 #include <core/propertywriter.h>
316
317-const unsigned short ICON_SIZE = 48;
318-const unsigned int MAX_ICON_SIZE = 256;
319+const unsigned short ICON_SIZE = 512;
320+const unsigned short MAX_ICON_SIZE = 512;
321
322 bool openGLAvailable;
323
324
325=== modified file 'plugins/decor/src/pixmap-requests/tests/integration/xorg-gtest/CMakeLists.txt'
326--- plugins/decor/src/pixmap-requests/tests/integration/xorg-gtest/CMakeLists.txt 2013-04-22 14:30:55 +0000
327+++ plugins/decor/src/pixmap-requests/tests/integration/xorg-gtest/CMakeLists.txt 2013-05-13 13:29:47 +0000
328@@ -18,7 +18,7 @@
329
330 set (COMPIZ_DECOR_PIXMAP_PROTOCOL_XORG_INTEGRATION_TEST_LIBRARIES
331 xorg_gtest_all
332- xorg_gtest_main
333+ compiz_xorg_gtest_main
334 compiz_xorg_gtest_system_test
335 compiz_decor_pixmap_requests
336 compiz_decor_pixmap_requests_mock
337
338=== modified file 'plugins/grid/grid.xml.in'
339--- plugins/grid/grid.xml.in 2013-04-25 10:11:04 +0000
340+++ plugins/grid/grid.xml.in 2013-05-13 13:29:47 +0000
341@@ -21,492 +21,486 @@
342 <group>
343 <_short>Bindings</_short>
344 <option name="put_center_key" type="key">
345- <_short>Put Center</_short>
346- <_long>Move window to the center</_long>
347+ <_short>Put Center Key</_short>
348+ <_long>Move window to the center.</_long>
349 <default>&lt;Control&gt;&lt;Alt&gt;KP_5</default>
350 </option>
351 <option name="put_left_key" type="key">
352- <_short>Put Left</_short>
353- <_long>Move window to the left edge</_long>
354+ <_short>Put Left Key</_short>
355+ <_long>Move window to the left edge.</_long>
356 <default>&lt;Control&gt;&lt;Alt&gt;KP_4</default>
357 </option>
358 <option name="put_right_key" type="key">
359- <_short>Put Right</_short>
360- <_long>Move window to the right edge</_long>
361+ <_short>Put Right Key</_short>
362+ <_long>Move window to the right edge.</_long>
363 <default>&lt;Control&gt;&lt;Alt&gt;KP_6</default>
364 </option>
365 <option name="put_top_key" type="key">
366- <_short>Put Top</_short>
367- <_long>Move window to the top edge</_long>
368+ <_short>Put Top Key</_short>
369+ <_long>Move window to the top edge.</_long>
370 <default>&lt;Control&gt;&lt;Alt&gt;KP_8</default>
371 </option>
372 <option name="put_bottom_key" type="key">
373- <_short>Put Bottom</_short>
374- <_long>Move window to the bottom edge</_long>
375+ <_short>Put Bottom Key</_short>
376+ <_long>Move window to the bottom edge.</_long>
377 <default>&lt;Control&gt;&lt;Alt&gt;KP_2</default>
378 </option>
379 <option name="put_topleft_key" type="key">
380- <_short>Put Top Left</_short>
381- <_long>Move window to the top left corner</_long>
382+ <_short>Put Top Left Key</_short>
383+ <_long>Move window to the top left corner.</_long>
384 <default>&lt;Control&gt;&lt;Alt&gt;KP_7</default>
385 </option>
386 <option name="put_topright_key" type="key">
387- <_short>Put Top Right</_short>
388- <_long>Move window to the top right corner</_long>
389+ <_short>Put Top Right Key</_short>
390+ <_long>Move window to the top right corner.</_long>
391 <default>&lt;Control&gt;&lt;Alt&gt;KP_9</default>
392 </option>
393 <option name="put_bottomleft_key" type="key">
394- <_short>Put Bottom Left</_short>
395- <_long>Move window to the bottom left corner</_long>
396+ <_short>Put Bottom Left Key</_short>
397+ <_long>Move window to the bottom left corner.</_long>
398 <default>&lt;Control&gt;&lt;Alt&gt;KP_1</default>
399 </option>
400 <option name="put_bottomright_key" type="key">
401- <_short>Put Bottom Right</_short>
402- <_long>Move window to the bottom right corner</_long>
403+ <_short>Put Bottom Right Key</_short>
404+ <_long>Move window to the bottom right corner.</_long>
405 <default>&lt;Control&gt;&lt;Alt&gt;KP_3</default>
406 </option>
407 <option name="put_maximize_key" type="key">
408- <_short>Maximize</_short>
409- <_long>Maximize window</_long>
410+ <_short>Maximize Key</_short>
411+ <_long>Maximize window.</_long>
412 <default>&lt;Control&gt;&lt;Alt&gt;KP_0</default>
413 </option>
414 <option name="put_restore_key" type="key">
415 <_short>Restore</_short>
416- <_long>Restores grid-resized, semi-maximized and maximized windows to their original size and position.</_long>
417- <default>&lt;Control&gt;&lt;Alt&gt;r</default>
418- </option>
419- </group>
420- <group>
421- <_short>Edges</_short>
422- <subgroup>
423- <_short>Resize Actions</_short>
424- <_long>Window resize action</_long>
425- <option name="top_left_corner_action" type="int">
426- <_short>Upper Left Corner</_short>
427- <_long>Action to be performed when window is dropped on the top left corner.</_long>
428- <default>4</default>
429- <min>0</min>
430- <max>10</max>
431- <desc>
432- <value>0</value>
433- <_name>None</_name>
434- </desc>
435- <desc>
436- <value>1</value>
437- <_name>Bottom Left Corner</_name>
438- </desc>
439- <desc>
440- <value>2</value>
441- <_name>Bottom Half</_name>
442- </desc>
443- <desc>
444- <value>3</value>
445- <_name>Bottom Right Corner</_name>
446- </desc>
447- <desc>
448- <value>4</value>
449- <_name>Left Half</_name>
450- </desc>
451- <desc>
452- <value>5</value>
453- <_name>Fill Screen</_name>
454- </desc>
455- <desc>
456- <value>6</value>
457- <_name>Right Half</_name>
458- </desc>
459- <desc>
460- <value>7</value>
461- <_name>Top Left Corner</_name>
462- </desc>
463- <desc>
464- <value>8</value>
465- <_name>Top Half</_name>
466- </desc>
467- <desc>
468- <value>9</value>
469- <_name>Top Right Corner</_name>
470- </desc>
471- <desc>
472- <value>10</value>
473- <_name>Maximize</_name>
474- </desc>
475- </option>
476- <option name="top_edge_action" type="int">
477- <_short>Top Edge</_short>
478- <_long>Action to be performed when window is dropped on the top edge.</_long>
479- <default>10</default>
480- <min>0</min>
481- <max>10</max>
482- <desc>
483- <value>0</value>
484- <_name>None</_name>
485- </desc>
486- <desc>
487- <value>1</value>
488- <_name>Bottom Left Corner</_name>
489- </desc>
490- <desc>
491- <value>2</value>
492- <_name>Bottom Half</_name>
493- </desc>
494- <desc>
495- <value>3</value>
496- <_name>Bottom Right Corner</_name>
497- </desc>
498- <desc>
499- <value>4</value>
500- <_name>Left Half</_name>
501- </desc>
502- <desc>
503- <value>5</value>
504- <_name>Fill Screen</_name>
505- </desc>
506- <desc>
507- <value>6</value>
508- <_name>Right Half</_name>
509- </desc>
510- <desc>
511- <value>7</value>
512- <_name>Top Left Corner</_name>
513- </desc>
514- <desc>
515- <value>8</value>
516- <_name>Top Half</_name>
517- </desc>
518- <desc>
519- <value>9</value>
520- <_name>Top Right Corner</_name>
521- </desc>
522- <desc>
523- <value>10</value>
524- <_name>Maximize</_name>
525- </desc>
526- </option>
527- <option name="top_right_corner_action" type="int">
528- <_short>Upper Right Corner</_short>
529- <_long>Action to be performed when window is dropped on the top right corner.</_long>
530- <default>6</default>
531- <min>0</min>
532- <max>10</max>
533- <desc>
534- <value>0</value>
535- <_name>None</_name>
536- </desc>
537- <desc>
538- <value>1</value>
539- <_name>Bottom Left Corner</_name>
540- </desc>
541- <desc>
542- <value>2</value>
543- <_name>Bottom Half</_name>
544- </desc>
545- <desc>
546- <value>3</value>
547- <_name>Bottom Right Corner</_name>
548- </desc>
549- <desc>
550- <value>4</value>
551- <_name>Left Half</_name>
552- </desc>
553- <desc>
554- <value>5</value>
555- <_name>Fill Screen</_name>
556- </desc>
557- <desc>
558- <value>6</value>
559- <_name>Right Half</_name>
560- </desc>
561- <desc>
562- <value>7</value>
563- <_name>Top Left Corner</_name>
564- </desc>
565- <desc>
566- <value>8</value>
567- <_name>Top Half</_name>
568- </desc>
569- <desc>
570- <value>9</value>
571- <_name>Top Right Corner</_name>
572- </desc>
573- <desc>
574- <value>10</value>
575- <_name>Maximize</_name>
576- </desc>
577- </option>
578- <option name="left_edge_action" type="int">
579- <_short>Left Edge</_short>
580- <_long>Action to be performed when window is dropped on the left edge.</_long>
581- <default>4</default>
582- <min>0</min>
583- <max>10</max>
584- <desc>
585- <value>0</value>
586- <_name>None</_name>
587- </desc>
588- <desc>
589- <value>1</value>
590- <_name>Bottom Left Corner</_name>
591- </desc>
592- <desc>
593- <value>2</value>
594- <_name>Bottom Half</_name>
595- </desc>
596- <desc>
597- <value>3</value>
598- <_name>Bottom Right Corner</_name>
599- </desc>
600- <desc>
601- <value>4</value>
602- <_name>Left Half</_name>
603- </desc>
604- <desc>
605- <value>5</value>
606- <_name>Fill Screen</_name>
607- </desc>
608- <desc>
609- <value>6</value>
610- <_name>Right Half</_name>
611- </desc>
612- <desc>
613- <value>7</value>
614- <_name>Top Left Corner</_name>
615- </desc>
616- <desc>
617- <value>8</value>
618- <_name>Top Half</_name>
619- </desc>
620- <desc>
621- <value>9</value>
622- <_name>Top Right Corner</_name>
623- </desc>
624- <desc>
625- <value>10</value>
626- <_name>Maximize</_name>
627- </desc>
628- </option>
629- <option name="right_edge_action" type="int">
630- <_short>Right Edge</_short>
631- <_long>Action to be performed when window is dropped on the right edge.</_long>
632- <default>6</default>
633- <min>0</min>
634- <max>10</max>
635- <desc>
636- <value>0</value>
637- <_name>None</_name>
638- </desc>
639- <desc>
640- <value>1</value>
641- <_name>Bottom Left Corner</_name>
642- </desc>
643- <desc>
644- <value>2</value>
645- <_name>Bottom Half</_name>
646- </desc>
647- <desc>
648- <value>3</value>
649- <_name>Bottom Right Corner</_name>
650- </desc>
651- <desc>
652- <value>4</value>
653- <_name>Left Half</_name>
654- </desc>
655- <desc>
656- <value>5</value>
657- <_name>Fill Screen</_name>
658- </desc>
659- <desc>
660- <value>6</value>
661- <_name>Right Half</_name>
662- </desc>
663- <desc>
664- <value>7</value>
665- <_name>Top Left Corner</_name>
666- </desc>
667- <desc>
668- <value>8</value>
669- <_name>Top Half</_name>
670- </desc>
671- <desc>
672- <value>9</value>
673- <_name>Top Right Corner</_name>
674- </desc>
675- <desc>
676- <value>10</value>
677- <_name>Maximize</_name>
678- </desc>
679- </option>
680- <option name="bottom_left_corner_action" type="int">
681- <_short>Bottom Left Corner</_short>
682- <_long>Action to be performed when window is dropped on the bottom left corner.</_long>
683- <default>4</default>
684- <min>0</min>
685- <max>10</max>
686- <desc>
687- <value>0</value>
688- <_name>None</_name>
689- </desc>
690- <desc>
691- <value>1</value>
692- <_name>Bottom Left Corner</_name>
693- </desc>
694- <desc>
695- <value>2</value>
696- <_name>Bottom Half</_name>
697- </desc>
698- <desc>
699- <value>3</value>
700- <_name>Bottom Right Corner</_name>
701- </desc>
702- <desc>
703- <value>4</value>
704- <_name>Left Half</_name>
705- </desc>
706- <desc>
707- <value>5</value>
708- <_name>Fill Screen</_name>
709- </desc>
710- <desc>
711- <value>6</value>
712- <_name>Right Half</_name>
713- </desc>
714- <desc>
715- <value>7</value>
716- <_name>Top Left Corner</_name>
717- </desc>
718- <desc>
719- <value>8</value>
720- <_name>Top Half</_name>
721- </desc>
722- <desc>
723- <value>9</value>
724- <_name>Top Right Corner</_name>
725- </desc>
726- <desc>
727- <value>10</value>
728- <_name>Maximize</_name>
729- </desc>
730- </option>
731- <option name="bottom_edge_action" type="int">
732- <_short>Bottom Edge</_short>
733- <_long>Action to be performed when window is dropped on the bottom edge.</_long>
734- <default>0</default>
735- <min>0</min>
736- <max>10</max>
737- <desc>
738- <value>0</value>
739- <_name>None</_name>
740- </desc>
741- <desc>
742- <value>1</value>
743- <_name>Bottom Left Corner</_name>
744- </desc>
745- <desc>
746- <value>2</value>
747- <_name>Bottom Half</_name>
748- </desc>
749- <desc>
750- <value>3</value>
751- <_name>Bottom Right Corner</_name>
752- </desc>
753- <desc>
754- <value>4</value>
755- <_name>Left Half</_name>
756- </desc>
757- <desc>
758- <value>5</value>
759- <_name>Fill Screen</_name>
760- </desc>
761- <desc>
762- <value>6</value>
763- <_name>Right Half</_name>
764- </desc>
765- <desc>
766- <value>7</value>
767- <_name>Top Left Corner</_name>
768- </desc>
769- <desc>
770- <value>8</value>
771- <_name>Top Half</_name>
772- </desc>
773- <desc>
774- <value>9</value>
775- <_name>Top Right Corner</_name>
776- </desc>
777- <desc>
778- <value>10</value>
779- <_name>Maximize</_name>
780- </desc>
781- </option>
782- <option name="bottom_right_corner_action" type="int">
783- <_short>Bottom Right Corner</_short>
784- <_long>Action to be performed when window is dropped on the bottom right corner.</_long>
785- <default>6</default>
786- <min>0</min>
787- <max>10</max>
788- <desc>
789- <value>0</value>
790- <_name>None</_name>
791- </desc>
792- <desc>
793- <value>1</value>
794- <_name>Bottom Left Corner</_name>
795- </desc>
796- <desc>
797- <value>2</value>
798- <_name>Bottom Half</_name>
799- </desc>
800- <desc>
801- <value>3</value>
802- <_name>Bottom Right Corner</_name>
803- </desc>
804- <desc>
805- <value>4</value>
806- <_name>Left Half</_name>
807- </desc>
808- <desc>
809- <value>5</value>
810- <_name>Fill Screen</_name>
811- </desc>
812- <desc>
813- <value>6</value>
814- <_name>Right Half</_name>
815- </desc>
816- <desc>
817- <value>7</value>
818- <_name>Top Left Corner</_name>
819- </desc>
820- <desc>
821- <value>8</value>
822- <_name>Top Half</_name>
823- </desc>
824- <desc>
825- <value>9</value>
826- <_name>Top Right Corner</_name>
827- </desc>
828- <desc>
829- <value>10</value>
830- <_name>Maximize</_name>
831- </desc>
832- </option>
833- <option name="snapoff_maximized" type="bool">
834- <_short>Snapoff Maximized/Semi-maximized Windows</_short>
835- <_long>Snapoff maximized and vertically maximized windows by dragging them up or down and horizontally maximized ones by dragging them left or right.</_long>
836- <default>false</default>
837- </option>
838- <option name="snapback_windows" type="bool">
839- <_short>Snap Windows Back To Original Size</_short>
840- <_long>Snaps windows back to their original size if dragged away from their gridded position.</_long>
841- <default>true</default>
842- </option>
843- <option name="cycle_sizes" type="bool">
844- <_short>Cycle Through Multiple Sizes</_short>
845- <_long>Cycle through multiple different sizes by using the same keyboard shortcut multiple times in a row.</_long>
846- <default>false</default>
847- </option>
848- </subgroup>
849- <subgroup>
850- <_short>Thresholds</_short>
851+ <_long>Restore window to it's original size. Note: Use the same shortcut you are using to unmaximize a window to be able to restore grid-maximized windows.</_long>
852+ <default>&lt;Alt&gt;F5</default>
853+ </option>
854+ </group>
855+ <group>
856+ <_short>Corners / Edges</_short>
857+ <option name="top_left_corner_action" type="int">
858+ <_short>Upper Left Corner</_short>
859+ <_long>Action to be performed when window is dropped on the top left corner.</_long>
860+ <default>4</default>
861+ <min>0</min>
862+ <max>10</max>
863+ <desc>
864+ <value>0</value>
865+ <_name>None</_name>
866+ </desc>
867+ <desc>
868+ <value>1</value>
869+ <_name>Bottom Left Corner</_name>
870+ </desc>
871+ <desc>
872+ <value>2</value>
873+ <_name>Bottom Half</_name>
874+ </desc>
875+ <desc>
876+ <value>3</value>
877+ <_name>Bottom Right Corner</_name>
878+ </desc>
879+ <desc>
880+ <value>4</value>
881+ <_name>Left Half</_name>
882+ </desc>
883+ <desc>
884+ <value>5</value>
885+ <_name>Fill Screen</_name>
886+ </desc>
887+ <desc>
888+ <value>6</value>
889+ <_name>Right Half</_name>
890+ </desc>
891+ <desc>
892+ <value>7</value>
893+ <_name>Top Left Corner</_name>
894+ </desc>
895+ <desc>
896+ <value>8</value>
897+ <_name>Top Half</_name>
898+ </desc>
899+ <desc>
900+ <value>9</value>
901+ <_name>Top Right Corner</_name>
902+ </desc>
903+ <desc>
904+ <value>10</value>
905+ <_name>Maximize</_name>
906+ </desc>
907+ </option>
908+ <option name="top_edge_action" type="int">
909+ <_short>Top Edge</_short>
910+ <_long>Action to be performed when window is dropped on the top edge.</_long>
911+ <default>10</default>
912+ <min>0</min>
913+ <max>10</max>
914+ <desc>
915+ <value>0</value>
916+ <_name>None</_name>
917+ </desc>
918+ <desc>
919+ <value>1</value>
920+ <_name>Bottom Left Corner</_name>
921+ </desc>
922+ <desc>
923+ <value>2</value>
924+ <_name>Bottom Half</_name>
925+ </desc>
926+ <desc>
927+ <value>3</value>
928+ <_name>Bottom Right Corner</_name>
929+ </desc>
930+ <desc>
931+ <value>4</value>
932+ <_name>Left Half</_name>
933+ </desc>
934+ <desc>
935+ <value>5</value>
936+ <_name>Fill Screen</_name>
937+ </desc>
938+ <desc>
939+ <value>6</value>
940+ <_name>Right Half</_name>
941+ </desc>
942+ <desc>
943+ <value>7</value>
944+ <_name>Top Left Corner</_name>
945+ </desc>
946+ <desc>
947+ <value>8</value>
948+ <_name>Top Half</_name>
949+ </desc>
950+ <desc>
951+ <value>9</value>
952+ <_name>Top Right Corner</_name>
953+ </desc>
954+ <desc>
955+ <value>10</value>
956+ <_name>Maximize</_name>
957+ </desc>
958+ </option>
959+ <option name="top_right_corner_action" type="int">
960+ <_short>Upper Right Corner</_short>
961+ <_long>Action to be performed when window is dropped on the top right corner.</_long>
962+ <default>6</default>
963+ <min>0</min>
964+ <max>10</max>
965+ <desc>
966+ <value>0</value>
967+ <_name>None</_name>
968+ </desc>
969+ <desc>
970+ <value>1</value>
971+ <_name>Bottom Left Corner</_name>
972+ </desc>
973+ <desc>
974+ <value>2</value>
975+ <_name>Bottom Half</_name>
976+ </desc>
977+ <desc>
978+ <value>3</value>
979+ <_name>Bottom Right Corner</_name>
980+ </desc>
981+ <desc>
982+ <value>4</value>
983+ <_name>Left Half</_name>
984+ </desc>
985+ <desc>
986+ <value>5</value>
987+ <_name>Fill Screen</_name>
988+ </desc>
989+ <desc>
990+ <value>6</value>
991+ <_name>Right Half</_name>
992+ </desc>
993+ <desc>
994+ <value>7</value>
995+ <_name>Top Left Corner</_name>
996+ </desc>
997+ <desc>
998+ <value>8</value>
999+ <_name>Top Half</_name>
1000+ </desc>
1001+ <desc>
1002+ <value>9</value>
1003+ <_name>Top Right Corner</_name>
1004+ </desc>
1005+ <desc>
1006+ <value>10</value>
1007+ <_name>Maximize</_name>
1008+ </desc>
1009+ </option>
1010+ <option name="left_edge_action" type="int">
1011+ <_short>Left Edge</_short>
1012+ <_long>Action to be performed when window is dropped on the left edge.</_long>
1013+ <default>4</default>
1014+ <min>0</min>
1015+ <max>10</max>
1016+ <desc>
1017+ <value>0</value>
1018+ <_name>None</_name>
1019+ </desc>
1020+ <desc>
1021+ <value>1</value>
1022+ <_name>Bottom Left Corner</_name>
1023+ </desc>
1024+ <desc>
1025+ <value>2</value>
1026+ <_name>Bottom Half</_name>
1027+ </desc>
1028+ <desc>
1029+ <value>3</value>
1030+ <_name>Bottom Right Corner</_name>
1031+ </desc>
1032+ <desc>
1033+ <value>4</value>
1034+ <_name>Left Half</_name>
1035+ </desc>
1036+ <desc>
1037+ <value>5</value>
1038+ <_name>Fill Screen</_name>
1039+ </desc>
1040+ <desc>
1041+ <value>6</value>
1042+ <_name>Right Half</_name>
1043+ </desc>
1044+ <desc>
1045+ <value>7</value>
1046+ <_name>Top Left Corner</_name>
1047+ </desc>
1048+ <desc>
1049+ <value>8</value>
1050+ <_name>Top Half</_name>
1051+ </desc>
1052+ <desc>
1053+ <value>9</value>
1054+ <_name>Top Right Corner</_name>
1055+ </desc>
1056+ <desc>
1057+ <value>10</value>
1058+ <_name>Maximize</_name>
1059+ </desc>
1060+ </option>
1061+ <option name="right_edge_action" type="int">
1062+ <_short>Right Edge</_short>
1063+ <_long>Action to be performed when window is dropped on the right edge.</_long>
1064+ <default>6</default>
1065+ <min>0</min>
1066+ <max>10</max>
1067+ <desc>
1068+ <value>0</value>
1069+ <_name>None</_name>
1070+ </desc>
1071+ <desc>
1072+ <value>1</value>
1073+ <_name>Bottom Left Corner</_name>
1074+ </desc>
1075+ <desc>
1076+ <value>2</value>
1077+ <_name>Bottom Half</_name>
1078+ </desc>
1079+ <desc>
1080+ <value>3</value>
1081+ <_name>Bottom Right Corner</_name>
1082+ </desc>
1083+ <desc>
1084+ <value>4</value>
1085+ <_name>Left Half</_name>
1086+ </desc>
1087+ <desc>
1088+ <value>5</value>
1089+ <_name>Fill Screen</_name>
1090+ </desc>
1091+ <desc>
1092+ <value>6</value>
1093+ <_name>Right Half</_name>
1094+ </desc>
1095+ <desc>
1096+ <value>7</value>
1097+ <_name>Top Left Corner</_name>
1098+ </desc>
1099+ <desc>
1100+ <value>8</value>
1101+ <_name>Top Half</_name>
1102+ </desc>
1103+ <desc>
1104+ <value>9</value>
1105+ <_name>Top Right Corner</_name>
1106+ </desc>
1107+ <desc>
1108+ <value>10</value>
1109+ <_name>Maximize</_name>
1110+ </desc>
1111+ </option>
1112+ <option name="bottom_left_corner_action" type="int">
1113+ <_short>Bottom Left Corner</_short>
1114+ <_long>Action to be performed when window is dropped on the bottom left corner.</_long>
1115+ <default>4</default>
1116+ <min>0</min>
1117+ <max>10</max>
1118+ <desc>
1119+ <value>0</value>
1120+ <_name>None</_name>
1121+ </desc>
1122+ <desc>
1123+ <value>1</value>
1124+ <_name>Bottom Left Corner</_name>
1125+ </desc>
1126+ <desc>
1127+ <value>2</value>
1128+ <_name>Bottom Half</_name>
1129+ </desc>
1130+ <desc>
1131+ <value>3</value>
1132+ <_name>Bottom Right Corner</_name>
1133+ </desc>
1134+ <desc>
1135+ <value>4</value>
1136+ <_name>Left Half</_name>
1137+ </desc>
1138+ <desc>
1139+ <value>5</value>
1140+ <_name>Fill Screen</_name>
1141+ </desc>
1142+ <desc>
1143+ <value>6</value>
1144+ <_name>Right Half</_name>
1145+ </desc>
1146+ <desc>
1147+ <value>7</value>
1148+ <_name>Top Left Corner</_name>
1149+ </desc>
1150+ <desc>
1151+ <value>8</value>
1152+ <_name>Top Half</_name>
1153+ </desc>
1154+ <desc>
1155+ <value>9</value>
1156+ <_name>Top Right Corner</_name>
1157+ </desc>
1158+ <desc>
1159+ <value>10</value>
1160+ <_name>Maximize</_name>
1161+ </desc>
1162+ </option>
1163+ <option name="bottom_edge_action" type="int">
1164+ <_short>Bottom Edge</_short>
1165+ <_long>Action to be performed when window is dropped on the bottom edge.</_long>
1166+ <default>0</default>
1167+ <min>0</min>
1168+ <max>10</max>
1169+ <desc>
1170+ <value>0</value>
1171+ <_name>None</_name>
1172+ </desc>
1173+ <desc>
1174+ <value>1</value>
1175+ <_name>Bottom Left Corner</_name>
1176+ </desc>
1177+ <desc>
1178+ <value>2</value>
1179+ <_name>Bottom Half</_name>
1180+ </desc>
1181+ <desc>
1182+ <value>3</value>
1183+ <_name>Bottom Right Corner</_name>
1184+ </desc>
1185+ <desc>
1186+ <value>4</value>
1187+ <_name>Left Half</_name>
1188+ </desc>
1189+ <desc>
1190+ <value>5</value>
1191+ <_name>Fill Screen</_name>
1192+ </desc>
1193+ <desc>
1194+ <value>6</value>
1195+ <_name>Right Half</_name>
1196+ </desc>
1197+ <desc>
1198+ <value>7</value>
1199+ <_name>Top Left Corner</_name>
1200+ </desc>
1201+ <desc>
1202+ <value>8</value>
1203+ <_name>Top Half</_name>
1204+ </desc>
1205+ <desc>
1206+ <value>9</value>
1207+ <_name>Top Right Corner</_name>
1208+ </desc>
1209+ <desc>
1210+ <value>10</value>
1211+ <_name>Maximize</_name>
1212+ </desc>
1213+ </option>
1214+ <option name="bottom_right_corner_action" type="int">
1215+ <_short>Bottom Right Corner</_short>
1216+ <_long>Action to be performed when window is dropped on the bottom right corner.</_long>
1217+ <default>6</default>
1218+ <min>0</min>
1219+ <max>10</max>
1220+ <desc>
1221+ <value>0</value>
1222+ <_name>None</_name>
1223+ </desc>
1224+ <desc>
1225+ <value>1</value>
1226+ <_name>Bottom Left Corner</_name>
1227+ </desc>
1228+ <desc>
1229+ <value>2</value>
1230+ <_name>Bottom Half</_name>
1231+ </desc>
1232+ <desc>
1233+ <value>3</value>
1234+ <_name>Bottom Right Corner</_name>
1235+ </desc>
1236+ <desc>
1237+ <value>4</value>
1238+ <_name>Left Half</_name>
1239+ </desc>
1240+ <desc>
1241+ <value>5</value>
1242+ <_name>Fill Screen</_name>
1243+ </desc>
1244+ <desc>
1245+ <value>6</value>
1246+ <_name>Right Half</_name>
1247+ </desc>
1248+ <desc>
1249+ <value>7</value>
1250+ <_name>Top Left Corner</_name>
1251+ </desc>
1252+ <desc>
1253+ <value>8</value>
1254+ <_name>Top Half</_name>
1255+ </desc>
1256+ <desc>
1257+ <value>9</value>
1258+ <_name>Top Right Corner</_name>
1259+ </desc>
1260+ <desc>
1261+ <value>10</value>
1262+ <_name>Maximize</_name>
1263+ </desc>
1264+ </option>
1265+ </group>
1266+ <group>
1267+ <_short>Resize Actions</_short>
1268+ <option name="snapback_windows" type="bool">
1269+ <_short>Snap Windows Back To Original Size</_short>
1270+ <_long>Snaps windows back to their original size if dragged away from their gridded position.</_long>
1271+ <default>true</default>
1272+ </option>
1273+ <option name="cycle_sizes" type="bool">
1274+ <_short>Cycle Through Multiple Sizes</_short>
1275+ <_long>Cycle through multiple different sizes by using the same keyboard shortcut multiple times in a row.</_long>
1276+ <default>false</default>
1277+ </option>
1278+ <subgroup>
1279+ <_short>Grid Snapback Thresholds</_short>
1280 <option name="left_edge_threshold" type="int">
1281 <_short>Left Edge</_short>
1282 <_long>Maximum number of pixels from the left edge a window can be dropped.</_long>
1283@@ -536,6 +530,16 @@
1284 <max>500</max>
1285 </option>
1286 </subgroup>
1287+ <subgroup>
1288+ <_short>Grid Snapoff Threshold</_short>
1289+ <option name="snapoff_threshold" type="int">
1290+ <_short>General Size</_short>
1291+ <_long>The pixels to drag until a grid-resized window snaps off.</_long>
1292+ <default>50</default>
1293+ <min>0</min>
1294+ <max>500</max>
1295+ </option>
1296+ </subgroup>
1297 </group>
1298 <group>
1299 <_short>Appearance</_short>
1300
1301=== modified file 'plugins/grid/src/grid.cpp'
1302--- plugins/grid/src/grid.cpp 2013-05-09 13:43:07 +0000
1303+++ plugins/grid/src/grid.cpp 2013-05-13 13:29:47 +0000
1304@@ -36,8 +36,8 @@
1305 static int const CURVE_ANIMATION = 35;
1306
1307 void
1308-GridScreen::handleCompizEvent(const char* plugin,
1309- const char* event,
1310+GridScreen::handleCompizEvent(const char *plugin,
1311+ const char *event,
1312 CompOption::Vector& o)
1313 {
1314 if (strcmp(event, "start_viewport_switch") == 0)
1315@@ -118,12 +118,12 @@
1316 }
1317
1318 bool
1319-GridScreen::initiateCommon (CompAction *action,
1320- CompAction::State state,
1321- CompOption::Vector &option,
1322- unsigned int where,
1323- bool resize,
1324- bool key)
1325+GridScreen::initiateCommon (CompAction *action,
1326+ CompAction::State state,
1327+ CompOption::Vector &option,
1328+ unsigned int where,
1329+ bool resize,
1330+ bool key)
1331 {
1332 CompWindow *cw = 0;
1333
1334@@ -142,7 +142,7 @@
1335 vertMaximizedGridPosition ||
1336 where & GridMaximize;
1337
1338- if (!(cw->actions () & CompWindowActionResizeMask) ||
1339+ if (!(cw->actions () & CompWindowActionResizeMask) ||
1340 (maximizeH && !(cw->actions () & CompWindowActionMaximizeHorzMask)) ||
1341 (maximizeV && !(cw->actions () & CompWindowActionMaximizeVertMask)) ||
1342 where & GridUnknown)
1343@@ -168,29 +168,20 @@
1344 if (props.numCellsX == 1)
1345 centerCheck = true;
1346
1347- /* Do not overwrite the original size if we already have been gridded */
1348- if (!gw->isGridResized && !gw->isGridHorzMaximized && !gw->isGridVertMaximized)
1349+ /* Do not overwrite the original size if we already have been gridded or
1350+ * have been grid-maximized */
1351+ if (!gw->isGridResized && !gw->isGridHorzMaximized && !gw->isGridVertMaximized &&
1352+ !(cw->state () & MAXIMIZE_STATE))
1353 /* Store size not including borders when using a keybinding */
1354 gw->originalSize = slotToRect(cw, cw->serverBorderRect ());
1355 }
1356
1357- if ((cw->state () & MAXIMIZE_STATE) &&
1358- (resize || optionGetSnapoffMaximized ()))
1359- /* maximized state interferes with us, clear it */
1360+ if ((cw->state () & MAXIMIZE_STATE) && resize)
1361+ // maximized state interferes with us, clear it
1362 cw->maximize (0);
1363
1364 if ((where & GridMaximize) && resize)
1365 {
1366- /* move the window to the correct output */
1367- if (cw == mGrabWindow)
1368- {
1369- /* TODO: Remove these magic numbers */
1370- xwc.x = workarea.x () + 50;
1371- xwc.y = workarea.y () + 50;
1372- xwc.width = workarea.width ();
1373- xwc.height = workarea.height ();
1374- cw->configureXWindow (CWX | CWY, &xwc);
1375- }
1376 cw->maximize (MAXIMIZE_STATE);
1377 /* Core can handle fully maximized windows so we don't
1378 * have to worry about them. Don't mark the window as a
1379@@ -202,6 +193,7 @@
1380
1381 for (unsigned int i = 0; i < animations.size (); ++i)
1382 animations.at (i).fadingOut = true;
1383+
1384 return true;
1385 }
1386
1387@@ -246,12 +238,12 @@
1388 * unless the user explicitely specified that in CCSM
1389 */
1390 if (gw->lastTarget == where &&
1391- gw->isGridResized &&
1392+ gw->isGridResized &&
1393 !optionGetCycleSizes ())
1394 return false;
1395
1396- /* !(Grid Left/Right/Top/Bottom) are only valid here, if
1397- * cycling through sizes is disabled also
1398+ /* !(Grid Left/Right/Top/Bottom) are only valid here,
1399+ * if cycling through sizes is disabled also
1400 */
1401 if ((where & ~(GridMaximize) ||
1402 ((!horzMaximizedGridPosition || !vertMaximizedGridPosition) &&
1403@@ -398,7 +390,7 @@
1404
1405 rwc.x = gw->originalSize.x ();
1406 rwc.y = gw->originalSize.y ();
1407- rwc.width = gw->originalSize.width ();
1408+ rwc.width = gw->originalSize.width ();
1409 rwc.height = gw->originalSize.height ();
1410
1411 cw->configureXWindow (CWX | CWY | CWWidth | CWHeight, &rwc);
1412@@ -469,10 +461,8 @@
1413 */
1414 if (centerCheck)
1415 {
1416- if ((cw->serverBorderRect ().width () >
1417- desiredSlot.width ()) ||
1418- cw->serverBorderRect ().width () <
1419- desiredSlot.width ())
1420+ if (cw->serverBorderRect ().width () > desiredSlot.width () ||
1421+ cw->serverBorderRect ().width () < desiredSlot.width ())
1422 {
1423 wc.x = (workarea.width () >> 1) -
1424 ((cw->serverBorderRect ().width () >> 1) -
1425@@ -492,13 +482,13 @@
1426 const GLMatrix &transform,
1427 CompOutput *output)
1428 {
1429- CompRect rect;
1430- GLMatrix sTransform (transform);
1431+ CompRect rect;
1432+ GLMatrix sTransform (transform);
1433 std::vector<Animation>::iterator iter;
1434- GLVertexBuffer *streamingBuffer = GLVertexBuffer::streamingBuffer ();
1435+ GLVertexBuffer *streamingBuffer = GLVertexBuffer::streamingBuffer ();
1436 GLfloat vertexData[12];
1437 GLushort colorData[4];
1438- GLushort *color;
1439+ GLushort *color;
1440 GLboolean isBlendingEnabled;
1441
1442 const float MaxUShortFloat = std::numeric_limits <unsigned short>::max ();
1443@@ -702,10 +692,10 @@
1444 type.push_back (GridTypeMask (GridWindowType::GridTopRight, 9));
1445 type.push_back (GridTypeMask (GridWindowType::GridMaximize, 10));
1446
1447-
1448 for (unsigned int i = 0; i < type.size (); ++i)
1449 {
1450 GridTypeMask &tm = type[i];
1451+
1452 if (tm.type == t)
1453 return tm.mask;
1454 }
1455@@ -721,35 +711,35 @@
1456 switch (edge)
1457 {
1458 case Left:
1459- ret = (int) optionGetLeftEdgeAction ();
1460+ ret = optionGetLeftEdgeAction ();
1461 break;
1462
1463 case Right:
1464- ret = (int) optionGetRightEdgeAction ();
1465+ ret = optionGetRightEdgeAction ();
1466 break;
1467
1468 case Top:
1469- ret = (int) optionGetTopEdgeAction ();
1470+ ret = optionGetTopEdgeAction ();
1471 break;
1472
1473 case Bottom:
1474- ret = (int) optionGetBottomEdgeAction ();
1475+ ret = optionGetBottomEdgeAction ();
1476 break;
1477
1478 case TopLeft:
1479- ret = (int) optionGetTopLeftCornerAction ();
1480+ ret = optionGetTopLeftCornerAction ();
1481 break;
1482
1483 case TopRight:
1484- ret = (int) optionGetTopRightCornerAction ();
1485+ ret = optionGetTopRightCornerAction ();
1486 break;
1487
1488 case BottomLeft:
1489- ret = (int) optionGetBottomLeftCornerAction ();
1490+ ret = optionGetBottomLeftCornerAction ();
1491 break;
1492
1493 case BottomRight:
1494- ret = (int) optionGetBottomRightCornerAction ();
1495+ ret = optionGetBottomRightCornerAction ();
1496 break;
1497
1498 case NoEdge:
1499@@ -862,6 +852,7 @@
1500 if (edge != NoEdge && check)
1501 {
1502 CompWindow *cw = screen->findWindow (screen->activeWindow ());
1503+
1504 if (cw)
1505 {
1506 animations.push_back (Animation ());
1507@@ -894,12 +885,14 @@
1508 {
1509 GRID_WINDOW (w);
1510
1511- if ((gw->pointerBufDx > SNAPOFF_THRESHOLD ||
1512- gw->pointerBufDy > SNAPOFF_THRESHOLD ||
1513- gw->pointerBufDx < -SNAPOFF_THRESHOLD ||
1514- gw->pointerBufDy < -SNAPOFF_THRESHOLD) &&
1515- gw->isGridResized &&
1516- optionGetSnapbackWindows ())
1517+ int snapoffThreshold = optionGetSnapoffThreshold ();
1518+
1519+ /* we just care about snapping of grid-resized windows */
1520+ if ((gw->pointerBufDx > snapoffThreshold ||
1521+ gw->pointerBufDy > snapoffThreshold ||
1522+ gw->pointerBufDx < -snapoffThreshold ||
1523+ gw->pointerBufDy < -snapoffThreshold) &&
1524+ gw->isGridResized)
1525 restoreWindow (0, 0, o);
1526 }
1527 }
1528@@ -938,13 +931,11 @@
1529 pointerBufDx = pointerBufDy = 0;
1530 grabMask = mask;
1531
1532- if (!isGridResized &&
1533- !isGridHorzMaximized &&
1534- !isGridVertMaximized &&
1535- gScreen->optionGetSnapbackWindows ())
1536+ if (!isGridResized &&
1537+ !isGridHorzMaximized &&
1538+ !isGridVertMaximized)
1539 /* Store size not including borders when grabbing with cursor */
1540- originalSize = gScreen->slotToRect(window,
1541- window->serverBorderRect ());
1542+ originalSize = gScreen->slotToRect (window, window->serverBorderRect ());
1543 }
1544 else if (gwHandler.resetResize ())
1545 {
1546@@ -982,9 +973,9 @@
1547 {
1548 window->moveNotify (dx, dy, immediate);
1549
1550- if (isGridResized &&
1551- !isGridHorzMaximized &&
1552- !isGridVertMaximized &&
1553+ if (isGridResized &&
1554+ !isGridHorzMaximized &&
1555+ !isGridVertMaximized &&
1556 !GridScreen::get (screen)->mSwitchingVp)
1557 {
1558 if (window->grabbed () && screen->grabExist ("expo"))
1559@@ -996,6 +987,7 @@
1560 gScreen->restoreWindow (0, 0, gScreen->o);
1561 return;
1562 }
1563+
1564 if (window->grabbed () && (grabMask & CompWindowGrabMoveMask))
1565 {
1566 pointerBufDx += dx;
1567@@ -1036,8 +1028,7 @@
1568 lastTarget = GridMaximize;
1569
1570 if (window->grabbed ())
1571- originalSize = gScreen->slotToRect (window,
1572- window->serverBorderRect ());
1573+ originalSize = gScreen->slotToRect (window, window->serverBorderRect ());
1574 }
1575
1576 window->stateChangeNotify (lastState);
1577@@ -1049,8 +1040,8 @@
1578 CompOption::Vector &option)
1579 {
1580 XWindowChanges xwc;
1581- int xwcm = 0;
1582- CompWindow *cw = screen->findWindow (screen->activeWindow ());
1583+ int xwcm = 0;
1584+ CompWindow *cw = screen->findWindow (screen->activeWindow ());
1585
1586 if (!cw)
1587 return false;
1588@@ -1058,13 +1049,13 @@
1589 GRID_WINDOW (cw);
1590
1591 /* We have nothing to do here */
1592- if (!gw->isGridResized &&
1593- !gw->isGridVertMaximized &&
1594+ if (!gw->isGridResized &&
1595+ !gw->isGridVertMaximized &&
1596 !gw->isGridHorzMaximized)
1597 return false;
1598
1599- else if (!gw->isGridResized &&
1600- gw->isGridHorzMaximized &&
1601+ else if (!gw->isGridResized &&
1602+ gw->isGridHorzMaximized &&
1603 !gw->isGridVertMaximized)
1604 {
1605 /* Window has been horizontally maximized by grid. We only need
1606@@ -1073,8 +1064,8 @@
1607 gw->window->sizeHints ().flags |= gw->sizeHintsFlags;
1608 xwcm |= CWY | CWHeight;
1609 }
1610- else if (!gw->isGridResized &&
1611- !gw->isGridHorzMaximized &&
1612+ else if (!gw->isGridResized &&
1613+ !gw->isGridHorzMaximized &&
1614 gw->isGridVertMaximized)
1615 {
1616 /* Window has been vertically maximized by grid. We only need
1617@@ -1083,8 +1074,8 @@
1618 gw->window->sizeHints ().flags |= gw->sizeHintsFlags;
1619 xwcm |= CWX | CWWidth;
1620 }
1621- else if (gw->isGridResized &&
1622- !gw->isGridHorzMaximized &&
1623+ else if (gw->isGridResized &&
1624+ !gw->isGridHorzMaximized &&
1625 !gw->isGridVertMaximized)
1626 /* Window is just gridded (center, corners).
1627 * We need to handle everything. */
1628@@ -1093,15 +1084,25 @@
1629 {
1630 /* This should never happen. But if it does, just bail out
1631 * gracefully. */
1632- assert (gw->isGridResized &&
1633+ assert (gw->isGridResized &&
1634 (gw->isGridHorzMaximized || gw->isGridVertMaximized));
1635 return false;
1636 }
1637
1638 if (cw == mGrabWindow)
1639 {
1640- xwc.x = pointerX - (gw->originalSize.width () / 2);
1641- xwc.y = pointerY + (cw->border ().top / 2);
1642+ /* The windows x-center is different in this case. */
1643+ if (optionGetSnapbackWindows ())
1644+ {
1645+ xwc.x = pointerX - (gw->originalSize.width () / 2);
1646+ xwc.y = pointerY + (cw->border ().top / 2);
1647+ }
1648+ else /* the user does not want the original size back */
1649+ {
1650+ /* this one is quite tricky to get right */
1651+ xwc.x = pointerX - gw->pointerBufDx - gw->currentSize.width () / 2;
1652+ xwc.y = pointerY - gw->pointerBufDy + cw->border ().top / 2;
1653+ }
1654 }
1655 else if (cw->grabbed () && screen->grabExist ("expo"))
1656 {
1657@@ -1119,19 +1120,32 @@
1658 xwc.y = gw->originalSize.y ();
1659 }
1660
1661- xwc.width = gw->originalSize.width ();
1662- xwc.height = gw->originalSize.height ();
1663+ /* We just need the original size, if
1664+ * this option is enabled or we are not grabbed */
1665+ if (optionGetSnapbackWindows () ||
1666+ !(cw == mGrabWindow))
1667+ {
1668+ xwc.width = gw->originalSize.width ();
1669+ xwc.height = gw->originalSize.height ();
1670+ }
1671+ else
1672+ {
1673+ /* the current size is also our new size */
1674+ xwc.width = gw->currentSize.width ();
1675+ xwc.height = gw->currentSize.height ();
1676+ }
1677
1678 if (cw->mapNum() && xwcm)
1679 cw->sendSyncRequest();
1680
1681 cw->configureXWindow (xwcm, &xwc);
1682- gw->currentSize = CompRect ();
1683- gw->pointerBufDx = 0;
1684- gw->pointerBufDy = 0;
1685+
1686+ gw->currentSize = CompRect ();
1687+ gw->pointerBufDx = 0;
1688+ gw->pointerBufDy = 0;
1689 gw->isGridHorzMaximized = false;
1690 gw->isGridVertMaximized = false;
1691- gw->isGridResized = false;
1692+ gw->isGridResized = false;
1693
1694 if (cw->state () & MAXIMIZE_STATE)
1695 cw->maximize(0);
1696@@ -1143,18 +1157,6 @@
1697 }
1698
1699 void
1700-GridScreen::snapbackOptionChanged (CompOption *option,
1701- Options num)
1702-{
1703- GRID_WINDOW (screen->findWindow
1704- (CompOption::getIntOptionNamed (o, "window")));
1705- gw->isGridResized = false;
1706- gw->isGridHorzMaximized = false;
1707- gw->isGridVertMaximized = false;
1708- gw->resizeCount = 0;
1709-}
1710-
1711-void
1712 GridScreen::preparePaint (int msSinceLastPaint)
1713 {
1714 std::vector<Animation>::iterator iter;
1715@@ -1270,6 +1272,7 @@
1716 edge = lastEdge = lastResizeEdge = NoEdge;
1717 currentWorkarea = lastWorkarea = screen->getWorkareaForOutput
1718 (screen->outputDeviceForPoint (pointerX, pointerY));
1719+
1720 gridProps[GridUnknown] = GridProps (0,1, 1,1);
1721 gridProps[GridBottomLeft] = GridProps (0,1, 2,2);
1722 gridProps[GridBottom] = GridProps (0,1, 1,2);
1723@@ -1301,9 +1304,6 @@
1724
1725 #undef GRIDSET
1726
1727- optionSetSnapbackWindowsNotify (boost::bind (&GridScreen::
1728- snapbackOptionChanged, this, _1, _2));
1729-
1730 optionSetPutRestoreKeyInitiate (boost::bind (&GridScreen::
1731 restoreWindow, this, _1, _2, _3));
1732 }
1733@@ -1380,7 +1380,6 @@
1734 wTransform.translate (translateX / scaleX - window->x (),
1735 translateY / scaleY - window->y (), 0.0f);
1736
1737-
1738 gWindow->glPaint (wAttrib, wTransform, region, wMask);
1739 }
1740 }
1741@@ -1394,8 +1393,15 @@
1742 bool
1743 GridPluginVTable::init ()
1744 {
1745+<<<<<<< TREE
1746 if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION))
1747 return true;
1748+=======
1749+ if (CompPlugin::checkPluginABI ("composite", CORE_ABIVERSION) &&
1750+ CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) &&
1751+ CompPlugin::checkPluginABI ("opengl", CORE_ABIVERSION))
1752+ return true;
1753+>>>>>>> MERGE-SOURCE
1754
1755 return false;
1756 }
1757
1758=== modified file 'plugins/grid/src/grid.h'
1759--- plugins/grid/src/grid.h 2013-04-02 18:22:48 +0000
1760+++ plugins/grid/src/grid.h 2013-05-13 13:29:47 +0000
1761@@ -30,21 +30,19 @@
1762
1763 #include "grid_options.h"
1764
1765-static const unsigned short SNAPOFF_THRESHOLD = 50;
1766-
1767 namespace GridWindowType
1768 {
1769- static const unsigned int GridUnknown = (1 << 0);
1770+ static const unsigned int GridUnknown = (1 << 0);
1771 static const unsigned int GridBottomLeft = (1 << 1);
1772- static const unsigned int GridBottom = (1 << 2);
1773+ static const unsigned int GridBottom = (1 << 2);
1774 static const unsigned int GridBottomRight = (1 << 3);
1775- static const unsigned int GridLeft = (1 << 4);
1776- static const unsigned int GridCenter = (1 << 5);
1777- static const unsigned int GridRight = (1 << 6);
1778- static const unsigned int GridTopLeft = (1 << 7);
1779- static const unsigned int GridTop = (1 << 8);
1780- static const unsigned int GridTopRight = (1 << 9);
1781- static const unsigned int GridMaximize = (1 << 10);
1782+ static const unsigned int GridLeft = (1 << 4);
1783+ static const unsigned int GridCenter = (1 << 5);
1784+ static const unsigned int GridRight = (1 << 6);
1785+ static const unsigned int GridTopLeft = (1 << 7);
1786+ static const unsigned int GridTop = (1 << 8);
1787+ static const unsigned int GridTopRight = (1 << 9);
1788+ static const unsigned int GridMaximize = (1 << 10);
1789 };
1790
1791 typedef unsigned int GridType;
1792@@ -93,16 +91,16 @@
1793
1794 Animation ();
1795
1796- GLfloat progress;
1797+ GLfloat progress;
1798 CompRect fromRect;
1799 CompRect targetRect;
1800 CompRect currentRect;
1801- GLfloat opacity;
1802- GLfloat timer;
1803- Window window;
1804- int duration;
1805- bool complete;
1806- bool fadingOut;
1807+ GLfloat opacity;
1808+ GLfloat timer;
1809+ Window window;
1810+ int duration;
1811+ bool complete;
1812+ bool fadingOut;
1813 };
1814
1815 class GridScreen :
1816@@ -115,56 +113,80 @@
1817 public:
1818
1819 GridScreen (CompScreen *);
1820- CompositeScreen *cScreen;
1821- GLScreen *glScreen;
1822-
1823- CompRect workarea, currentRect, desiredSlot, lastSlot,
1824- desiredRect, lastWorkarea, currentWorkarea;
1825- GridProps props;
1826- Edges edge, lastEdge, lastResizeEdge;
1827+
1828+ CompositeScreen *cScreen;
1829+ GLScreen *glScreen;
1830+
1831+ CompRect workarea;
1832+ CompRect currentRect;
1833+ CompRect desiredSlot;
1834+ CompRect lastSlot;
1835+ CompRect desiredRect;
1836+ CompRect lastWorkarea;
1837+ CompRect currentWorkarea;
1838+
1839+ GridProps props;
1840+
1841+ Edges edge;
1842+ Edges lastEdge;
1843+ Edges lastResizeEdge;
1844+
1845 CompOption::Vector o;
1846- bool centerCheck;
1847- CompWindow *mGrabWindow;
1848- bool animating;
1849- bool mSwitchingVp;
1850+ bool centerCheck;
1851+ CompWindow *mGrabWindow;
1852+ bool animating;
1853+ bool mSwitchingVp;
1854
1855 void getPaintRectangle (CompRect&);
1856 void setCurrentRect (Animation&);
1857
1858- bool initiateCommon (CompAction*, CompAction::State,
1859- CompOption::Vector&, unsigned int, bool, bool);
1860+ bool initiateCommon (CompAction *,
1861+ CompAction::State ,
1862+ CompOption::Vector &,
1863+ unsigned int ,
1864+ bool ,
1865+ bool );
1866
1867- void glPaintRectangle (const GLScreenPaintAttrib&,
1868- const GLMatrix&, CompOutput *);
1869+ void glPaintRectangle (const GLScreenPaintAttrib &,
1870+ const GLMatrix &,
1871+ CompOutput *);
1872
1873 bool glPaintOutput (const GLScreenPaintAttrib &,
1874- const GLMatrix &, const CompRegion &,
1875- CompOutput *, unsigned int);
1876+ const GLMatrix &,
1877+ const CompRegion &,
1878+ CompOutput *,
1879+ unsigned int );
1880
1881 void preparePaint (int msSinceLastPaint);
1882+
1883 void donePaint ();
1884
1885 std::vector <Animation> animations;
1886
1887 int edgeToGridType ();
1888+
1889 unsigned int typeToMask (int);
1890
1891 void handleEvent (XEvent *event);
1892- void handleCompizEvent (const char *plugin, const char *event, CompOption::Vector &options);
1893-
1894- bool restoreWindow (CompAction*,
1895- CompAction::State,
1896- CompOption::Vector&);
1897+
1898+ void handleCompizEvent (const char *plugin,
1899+ const char *event,
1900+ CompOption::Vector &options);
1901+
1902+ bool restoreWindow (CompAction *,
1903+ CompAction::State ,
1904+ CompOption::Vector &);
1905
1906 void
1907 snapbackOptionChanged (CompOption *option,
1908- Options num);
1909+ Options num);
1910
1911 CompRect
1912 slotToRect (CompWindow *w,
1913 const CompRect& slot);
1914+
1915 CompRect
1916- constrainSize (CompWindow *w,
1917+ constrainSize (CompWindow *w,
1918 const CompRect& slot);
1919 };
1920
1921@@ -177,24 +199,30 @@
1922
1923 GridWindow (CompWindow *);
1924 ~GridWindow ();
1925- CompWindow *window;
1926- GLWindow *gWindow;
1927- GridScreen *gScreen;
1928-
1929- bool isGridResized;
1930- bool isGridHorzMaximized;
1931- bool isGridVertMaximized;
1932+
1933+ CompWindow *window;
1934+ GLWindow *gWindow;
1935+ GridScreen *gScreen;
1936+
1937+ bool isGridResized;
1938+ bool isGridHorzMaximized;
1939+ bool isGridVertMaximized;
1940+
1941 unsigned int grabMask;
1942- int pointerBufDx;
1943- int pointerBufDy;
1944- int resizeCount;
1945- CompRect currentSize;
1946- CompRect originalSize;
1947- GridType lastTarget;
1948+
1949+ int pointerBufDx;
1950+ int pointerBufDy;
1951+
1952+ int resizeCount;
1953+ CompRect currentSize;
1954+ CompRect originalSize;
1955+ GridType lastTarget;
1956 unsigned int sizeHintsFlags;
1957
1958- bool glPaint (const GLWindowPaintAttrib&, const GLMatrix&,
1959- const CompRegion&, unsigned int);
1960+ bool glPaint (const GLWindowPaintAttrib &,
1961+ const GLMatrix &,
1962+ const CompRegion &,
1963+ unsigned int );
1964
1965 void grabNotify (int, int, unsigned int, unsigned int);
1966
1967@@ -203,9 +231,10 @@
1968 void moveNotify (int, int, bool);
1969
1970 void stateChangeNotify (unsigned int);
1971- void validateResizeRequest (unsigned int &valueMask,
1972+
1973+ void validateResizeRequest (unsigned int &valueMask,
1974 XWindowChanges *xwc,
1975- unsigned int source);
1976+ unsigned int source);
1977 };
1978
1979 #define GRID_WINDOW(w) \
1980@@ -220,4 +249,3 @@
1981 };
1982
1983 COMPIZ_PLUGIN_20090315 (grid, GridPluginVTable);
1984-
1985
1986=== modified file 'plugins/kdecompat/src/kdecompat.cpp'
1987--- plugins/kdecompat/src/kdecompat.cpp 2013-05-09 13:43:07 +0000
1988+++ plugins/kdecompat/src/kdecompat.cpp 2013-05-13 13:29:47 +0000
1989@@ -288,7 +288,7 @@
1990 }
1991 else
1992 {
1993- icon = gWindow->getIcon (256, 256);
1994+ icon = gWindow->getIcon (512, 512);
1995 if (!icon)
1996 icon = ks->gScreen->defaultIcon ();
1997
1998
1999=== modified file 'plugins/put/put.xml.in'
2000--- plugins/put/put.xml.in 2012-10-15 10:31:51 +0000
2001+++ plugins/put/put.xml.in 2013-05-13 13:29:47 +0000
2002@@ -283,6 +283,14 @@
2003 <_short>Put To Next Output</_short>
2004 <_long>Move window to the next output device</_long>
2005 </option>
2006+ <option name="put_previous_output_key" type="key">
2007+ <_short>Put To Previous Output</_short>
2008+ <_long>Move window to the previous output device</_long>
2009+ </option>
2010+ <option name="put_previous_output_button" type="button">
2011+ <_short>Put To Previous Output</_short>
2012+ <_long>Move window to the previous output device</_long>
2013+ </option>
2014 <option name="put_put" type="action">
2015 <_short>Put</_short>
2016 <_long>Move window arbitrarily by passing x, y and type.</_long>
2017
2018=== modified file 'plugins/put/src/put.cpp'
2019--- plugins/put/src/put.cpp 2013-05-09 13:43:07 +0000
2020+++ plugins/put/src/put.cpp 2013-05-13 13:29:47 +0000
2021@@ -637,6 +637,7 @@
2022 dx = 0;
2023 dy = (s->vp ().y () < s->vpSize ().height ()-1) ? s->height () : 0;
2024 break;
2025+ case PutPreviousOutput:
2026 case PutNextOutput:
2027 {
2028 int outputNum, currentNum;
2029@@ -647,7 +648,11 @@
2030 return result;
2031
2032 currentNum = getOutputForWindow (w);
2033- outputNum = (currentNum + 1) % nOutputDev;
2034+
2035+ outputNum = (currentNum + (type == PutNextOutput ? 1 : -1)) % nOutputDev;
2036+ if (outputNum < 0)
2037+ outputNum += nOutputDev;
2038+
2039 outputNum = CompOption::getIntOptionNamed (option,"output",
2040 outputNum);
2041
2042@@ -1030,7 +1035,7 @@
2043 return false;
2044
2045 /* only allow movement of fullscreen windows to next output */
2046- if (type != PutNextOutput &&
2047+ if ((type != PutNextOutput && type != PutPreviousOutput) &&
2048 (w->type () & CompWindowTypeFullscreenMask))
2049 {
2050 return false;
2051@@ -1111,6 +1116,8 @@
2052 return PutViewportUp;
2053 else if (type == "viewportdown")
2054 return PutViewportDown;
2055+ else if (type == "previousoutput")
2056+ return PutPreviousOutput;
2057 else if (type == "nextoutput")
2058 return PutNextOutput;
2059 else if (type == "restore")
2060@@ -1227,6 +1234,7 @@
2061 setAction (PutRestore, PutRestore);
2062 setAction (PutPointer, PutPointer);
2063 setAction (PutNextOutput, PutNextOutput);
2064+ setAction (PutPreviousOutput, PutPreviousOutput);
2065 setAction (PutCenter, PutCenter);
2066 setAction (PutEmptyCenter, PutEmptyCenter);
2067 setAction (PutLeft, PutLeft);
2068
2069=== modified file 'plugins/put/src/put.h'
2070--- plugins/put/src/put.h 2010-06-11 00:05:35 +0000
2071+++ plugins/put/src/put.h 2013-05-13 13:29:47 +0000
2072@@ -46,14 +46,15 @@
2073 PutViewportDown = 17,
2074 PutRelative = 18,
2075 PutNextOutput = 19,
2076- PutEmptyBottomLeft = 20,
2077- PutEmptyBottom = 21,
2078- PutEmptyBottomRight = 22,
2079- PutEmptyLeft = 23,
2080- PutEmptyCenter = 24,
2081- PutEmptyRight = 25,
2082- PutEmptyTopLeft = 26,
2083- PutEmptyTop = 27,
2084+ PutPreviousOutput = 20,
2085+ PutEmptyBottomLeft = 21,
2086+ PutEmptyBottom = 22,
2087+ PutEmptyBottomRight = 23,
2088+ PutEmptyLeft = 24,
2089+ PutEmptyCenter = 25,
2090+ PutEmptyRight = 26,
2091+ PutEmptyTopLeft = 27,
2092+ PutEmptyTop = 28,
2093 PutEmptyTopRight,
2094 };
2095
2096
2097=== modified file 'plugins/resize/src/logic/src/resize-logic.cpp'
2098--- plugins/resize/src/logic/src/resize-logic.cpp 2013-02-03 18:29:25 +0000
2099+++ plugins/resize/src/logic/src/resize-logic.cpp 2013-05-13 13:29:47 +0000
2100@@ -99,11 +99,13 @@
2101 void
2102 ResizeLogic::handleEvent (XEvent *event)
2103 {
2104- switch (event->type) {
2105+ switch (event->type)
2106+ {
2107 case KeyPress:
2108 if (event->xkey.root == mScreen->root ())
2109 handleKeyEvent (event->xkey.keycode);
2110 break;
2111+
2112 case ButtonRelease:
2113 if (event->xbutton.root == mScreen->root ())
2114 {
2115@@ -120,15 +122,18 @@
2116 }
2117 }
2118 break;
2119+
2120 case MotionNotify:
2121 if (event->xmotion.root == mScreen->root ())
2122 handleMotionEvent (pointerX, pointerY);
2123 break;
2124+
2125 case EnterNotify:
2126 case LeaveNotify:
2127 if (event->xcrossing.root == mScreen->root ())
2128 handleMotionEvent (pointerX, pointerY);
2129 break;
2130+
2131 case ClientMessage:
2132 if (event->xclient.message_type == Atoms::wmMoveResize)
2133 {
2134@@ -165,7 +170,8 @@
2135 /* TODO: not only button 1 */
2136 if (pointerMods & Button1Mask)
2137 {
2138- static unsigned int mask[] = {
2139+ static unsigned int mask[] =
2140+ {
2141 ResizeUpMask | ResizeLeftMask,
2142 ResizeUpMask,
2143 ResizeUpMask | ResizeRightMask,
2144@@ -218,6 +224,7 @@
2145 }
2146 }
2147 break;
2148+
2149 case DestroyNotify:
2150 if (w && w->id () == event->xdestroywindow.window)
2151 {
2152@@ -225,12 +232,15 @@
2153 terminateResize (&options->optionGetInitiateKey (), 0, noOptions ());
2154 }
2155 break;
2156+
2157 case UnmapNotify:
2158 if (w && w->id () == event->xunmap.window)
2159 {
2160 terminateResize (&options->optionGetInitiateButton (), 0, noOptions ());
2161 terminateResize (&options->optionGetInitiateKey (), 0, noOptions ());
2162 }
2163+ break;
2164+
2165 default:
2166 break;
2167 }
2168@@ -342,9 +352,7 @@
2169 centered = true;
2170 }
2171 else
2172- {
2173 centered = false;
2174- }
2175 }
2176 }
2177
2178@@ -369,10 +377,8 @@
2179 {
2180 if (grabIndex && w)
2181 {
2182- int widthInc, heightInc;
2183-
2184- widthInc = w->sizeHints ().width_inc;
2185- heightInc = w->sizeHints ().height_inc;
2186+ int widthInc = w->sizeHints ().width_inc;
2187+ int heightInc = w->sizeHints ().height_inc;
2188
2189 if (widthInc < MIN_KEY_WIDTH_INC)
2190 widthInc = MIN_KEY_WIDTH_INC;
2191@@ -386,24 +392,20 @@
2192 continue;
2193
2194 if (mask & rKeys[i].warpMask)
2195- {
2196 XWarpPointer (mScreen->dpy (), None, None, 0, 0, 0, 0,
2197 rKeys[i].dx * widthInc, rKeys[i].dy * heightInc);
2198- }
2199 else
2200 {
2201- int x, y, left, top, width, height;
2202-
2203 CompWindow::Geometry server = w->serverGeometry ();
2204 const CompWindowExtents &border = w->border ();
2205
2206- left = server.x () - border.left;
2207- top = server.y () - border.top;
2208- width = border.left + server.width () + border.right;
2209- height = border.top + server.height () + border.bottom;
2210+ int left = server.x () - border.left;
2211+ int top = server.y () - border.top;
2212+ int width = border.left + server.width () + border.right;
2213+ int height = border.top + server.height () + border.bottom;
2214
2215- x = left + width * (rKeys[i].dx + 1) / 2;
2216- y = top + height * (rKeys[i].dy + 1) / 2;
2217+ int x = left + width * (rKeys[i].dx + 1) / 2;
2218+ int y = top + height * (rKeys[i].dy + 1) / 2;
2219
2220 mScreen->warpPointer (x - pointerX, y - pointerY);
2221
2222
2223=== modified file 'plugins/resize/src/resize.cpp'
2224--- plugins/resize/src/resize.cpp 2013-05-09 13:43:07 +0000
2225+++ plugins/resize/src/resize.cpp 2013-05-13 13:29:47 +0000
2226@@ -209,15 +209,11 @@
2227 CompOutput *output,
2228 unsigned int mask)
2229 {
2230- bool status;
2231-
2232- if (logic.w)
2233- {
2234- if (logic.mode == ResizeOptions::ModeStretch)
2235- mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
2236- }
2237-
2238- status = gScreen->glPaintOutput (sAttrib, transform, region, output, mask);
2239+ if (logic.w &&
2240+ logic.mode == ResizeOptions::ModeStretch)
2241+ mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
2242+
2243+ bool status = gScreen->glPaintOutput (sAttrib, transform, region, output, mask);
2244
2245 if (status && logic.w)
2246 {
2247@@ -226,12 +222,16 @@
2248 border = optionGetBorderColor ();
2249 fill = optionGetFillColor ();
2250
2251- switch (logic.mode) {
2252+ switch (logic.mode)
2253+ {
2254 case ResizeOptions::ModeOutline:
2255 glPaintRectangle (sAttrib, transform, output, border, NULL);
2256 break;
2257+
2258 case ResizeOptions::ModeRectangle:
2259 glPaintRectangle (sAttrib, transform, output, border, fill);
2260+ break;
2261+
2262 default:
2263 break;
2264 }
2265@@ -253,9 +253,7 @@
2266 {
2267 GLMatrix wTransform (transform);
2268 BoxRec box;
2269- float xOrigin, yOrigin;
2270 float xScale, yScale;
2271- int x, y;
2272
2273 if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK)
2274 return false;
2275@@ -271,11 +269,11 @@
2276 rScreen->logic.getPaintRectangle (&box);
2277 getStretchScale (&box, &xScale, &yScale);
2278
2279- x = window->geometry (). x ();
2280- y = window->geometry (). y ();
2281+ int x = window->geometry (). x ();
2282+ int y = window->geometry (). y ();
2283
2284- xOrigin = x - window->border ().left;
2285- yOrigin = y - window->border ().top;
2286+ float xOrigin = x - window->border ().left;
2287+ float yOrigin = y - window->border ().top;
2288
2289 wTransform.translate (xOrigin, yOrigin, 0.0f);
2290 wTransform.scale (xScale, yScale, 1.0f);
2291@@ -287,9 +285,7 @@
2292 mask | PAINT_WINDOW_TRANSFORMED_MASK);
2293 }
2294 else
2295- {
2296 status = gWindow->glPaint (attrib, transform, region, mask);
2297- }
2298
2299 return status;
2300 }
2301@@ -350,18 +346,22 @@
2302 mask = &logic.outlineMask;
2303 valueMask = optionGetOutlineModifierMask ();
2304 break;
2305+
2306 case ResizeOptions::RectangleModifier:
2307 mask = &logic.rectangleMask;
2308 valueMask = optionGetRectangleModifierMask ();
2309 break;
2310+
2311 case ResizeOptions::StretchModifier:
2312 mask = &logic.stretchMask;
2313 valueMask = optionGetStretchModifierMask ();
2314 break;
2315- case ResizeOptions::CenteredModifier:
2316+
2317+ case ResizeOptions::CenteredModifier:
2318 mask = &logic.centeredMask;
2319 valueMask = optionGetCenteredModifierMask ();
2320 break;
2321+
2322 default:
2323 break;
2324 }
2325
2326=== modified file 'plugins/ring/src/ring.cpp'
2327--- plugins/ring/src/ring.cpp 2013-05-09 13:43:07 +0000
2328+++ plugins/ring/src/ring.cpp 2013-05-13 13:29:47 +0000
2329@@ -33,7 +33,7 @@
2330
2331 const double PI = 3.14159265359f;
2332
2333-const unsigned short ICON_SIZE = 64;
2334+const unsigned short ICON_SIZE = 512;
2335
2336 bool textAvailable;
2337
2338@@ -296,7 +296,7 @@
2339 {
2340 GLTexture *icon;
2341
2342- icon = gWindow->getIcon (256, 256);
2343+ icon = gWindow->getIcon (512, 512);
2344 if (!icon)
2345 icon = rs->gScreen->defaultIcon ();
2346
2347
2348=== modified file 'plugins/scale/src/scale.cpp'
2349--- plugins/scale/src/scale.cpp 2013-05-09 13:43:07 +0000
2350+++ plugins/scale/src/scale.cpp 2013-05-13 13:29:47 +0000
2351@@ -137,7 +137,7 @@
2352 GLWindowPaintAttrib sAttrib (attrib);
2353 GLTexture *icon;
2354
2355- icon = priv->gWindow->getIcon (96, 96);
2356+ icon = priv->gWindow->getIcon (512, 512);
2357 if (!icon)
2358 icon = priv->spScreen->gScreen->defaultIcon ();
2359
2360
2361=== modified file 'plugins/shift/src/shift.cpp'
2362--- plugins/shift/src/shift.cpp 2013-05-09 13:43:07 +0000
2363+++ plugins/shift/src/shift.cpp 2013-05-13 13:29:47 +0000
2364@@ -322,7 +322,11 @@
2365 {
2366 GLTexture *icon;
2367
2368+<<<<<<< TREE
2369 icon = gWindow->getIcon (256, 256);
2370+=======
2371+ icon = gWindow->getIcon (512, 512);
2372+>>>>>>> MERGE-SOURCE
2373
2374 if (!icon)
2375 icon = ss->gScreen->defaultIcon ();
2376
2377=== modified file 'plugins/stackswitch/src/stackswitch.cpp'
2378--- plugins/stackswitch/src/stackswitch.cpp 2013-05-09 13:43:07 +0000
2379+++ plugins/stackswitch/src/stackswitch.cpp 2013-05-13 13:29:47 +0000
2380@@ -212,8 +212,13 @@
2381 glPushMatrix ();
2382 glLoadMatrixf (wTransform.getMatrix ());
2383
2384+<<<<<<< TREE
2385 icon = sw->gWindow->getIcon (96, 96);
2386
2387+=======
2388+ icon = sw->gWindow->getIcon (512, 512);
2389+
2390+>>>>>>> MERGE-SOURCE
2391 if (!icon)
2392 icon = gScreen->defaultIcon ();
2393
2394@@ -352,8 +357,13 @@
2395
2396 if (scaled && !gWindow->textures ().size ())
2397 {
2398+<<<<<<< TREE
2399 GLTexture *icon = gWindow->getIcon (96, 96);
2400
2401+=======
2402+ GLTexture *icon = gWindow->getIcon (512, 512);
2403+
2404+>>>>>>> MERGE-SOURCE
2405 if (!icon)
2406 icon = ss->gScreen->defaultIcon ();
2407
2408
2409=== modified file 'plugins/staticswitcher/src/staticswitcher.cpp'
2410--- plugins/staticswitcher/src/staticswitcher.cpp 2013-05-09 13:43:07 +0000
2411+++ plugins/staticswitcher/src/staticswitcher.cpp 2013-05-13 13:29:47 +0000
2412@@ -27,6 +27,8 @@
2413
2414 COMPIZ_PLUGIN_20090315 (staticswitcher, StaticSwitchPluginVTable)
2415
2416+const unsigned short MAX_ICON_SIZE = 512;
2417+
2418 const unsigned short PREVIEWSIZE = 150;
2419 const unsigned short BORDER = 10;
2420
2421
2422=== modified file 'plugins/staticswitcher/src/staticswitcher.h'
2423--- plugins/staticswitcher/src/staticswitcher.h 2012-09-07 23:56:21 +0000
2424+++ plugins/staticswitcher/src/staticswitcher.h 2013-05-13 13:29:47 +0000
2425@@ -157,7 +157,7 @@
2426 StaticSwitchScreen *sScreen;
2427 };
2428
2429-#define MAX_ICON_SIZE 256
2430+extern const unsigned short MAX_ICON_SIZE;
2431
2432 extern const unsigned short PREVIEWSIZE;
2433 extern const unsigned short BORDER;
2434
2435=== modified file 'plugins/wall/src/wall.cpp'
2436--- plugins/wall/src/wall.cpp 2013-05-11 09:13:17 +0000
2437+++ plugins/wall/src/wall.cpp 2013-05-13 13:29:47 +0000
2438@@ -495,23 +495,19 @@
2439
2440 moveViewport (-dx, -dy, None);
2441 }
2442- if (event->xclient.message_type == Atoms::xdndEnter)
2443- {
2444- toggleEdges (true);
2445- edgeDrag = true;
2446- }
2447- else if (event->xclient.message_type == Atoms::xdndLeave)
2448- edgeDrag = false;
2449
2450 break;
2451
2452 case FocusIn:
2453 case FocusOut:
2454- if (event->xfocus.mode == NotifyGrab)
2455- poller.start ();
2456- else if (event->xfocus.mode == NotifyUngrab)
2457- poller.stop ();
2458- break;
2459+ /* Edges on when grabbed */
2460+ if (!optionGetEdgeflipPointer ())
2461+ {
2462+ if (event->xfocus.mode == NotifyGrab)
2463+ toggleEdges (true);
2464+ else if (event->xfocus.mode == NotifyUngrab)
2465+ toggleEdges (false);
2466+ }
2467
2468 case ConfigureNotify:
2469 break;
2470@@ -523,6 +519,7 @@
2471 screen->handleEvent (event);
2472 }
2473
2474+<<<<<<< TREE
2475 void
2476 WallScreen::positionUpdate (const CompPoint &pos)
2477 {
2478@@ -538,6 +535,36 @@
2479 toggleEdges (true);
2480 }
2481 }
2482+=======
2483+/*
2484+ * When a dnd type window is mapped toggle edge flip dnd windows back on
2485+ * _NET_WM_WINDOW_TYPE_DND windows. This will not detect all dnd windows
2486+ * but it will detect the EWMH-compliant ones without resorting to
2487+ * hacks involving selection stealing.
2488+ */
2489+void
2490+WallWindow::windowNotify (CompWindowNotify n)
2491+{
2492+ WallScreen *ws = WallScreen::get (screen);
2493+ bool toggleOnDnd = ws->optionGetEdgeflipDnd ();
2494+
2495+ switch (n)
2496+ {
2497+ case CompWindowNotifyMap:
2498+ if (window->type () & CompWindowTypeDndMask && toggleOnDnd)
2499+ ws->toggleEdges (true);
2500+ break;
2501+ case CompWindowNotifyUnmap:
2502+ if (window->type () & CompWindowTypeDndMask && toggleOnDnd)
2503+ ws->toggleEdges (false);
2504+ break;
2505+ default:
2506+ break;
2507+ }
2508+
2509+ window->windowNotify (n);
2510+ }
2511+>>>>>>> MERGE-SOURCE
2512
2513 void
2514 WallWindow::activate ()
2515@@ -599,19 +626,19 @@
2516 void
2517 WallWindow::grabNotify (int x,
2518 int y,
2519- unsigned int width,
2520- unsigned int height)
2521+ unsigned int state,
2522+ unsigned int mask)
2523 {
2524- WallScreen::get (screen)->toggleEdges (true);
2525- WallScreen::get (screen)->edgeDrag = true;
2526+ if (mask & (CompWindowGrabMoveMask | CompWindowGrabButtonMask))
2527+ WallScreen::get (screen)->windowIsDragMoved = true;
2528
2529- window->grabNotify (x, y, width, height);
2530+ window->grabNotify (x, y, state, mask);
2531 }
2532
2533 void
2534 WallWindow::ungrabNotify ()
2535 {
2536- WallScreen::get (screen)->edgeDrag = false;
2537+ WallScreen::get (screen)->windowIsDragMoved = false;
2538
2539 window->ungrabNotify ();
2540 }
2541@@ -760,6 +787,7 @@
2542 int dx, dy;
2543 int amountX, amountY;
2544
2545+<<<<<<< TREE
2546 if (screen->otherGrabExist ("wall", "move", "group-drag", NULL))
2547 return false;
2548
2549@@ -787,6 +815,21 @@
2550
2551 switch (direction)
2552 {
2553+=======
2554+ const bool allowFlipDnd = (state & CompAction::StateInitEdgeDnd) &&
2555+ optionGetEdgeflipDnd ();
2556+ const bool allowFlipMove = (windowIsDragMoved &&
2557+ optionGetEdgeflipMove ());
2558+ const bool allowFlipPointer = optionGetEdgeflipPointer ();
2559+
2560+ if (!allowFlipDnd &&
2561+ !allowFlipMove &&
2562+ !allowFlipPointer)
2563+ return false;
2564+
2565+ switch (direction)
2566+ {
2567+>>>>>>> MERGE-SOURCE
2568 case Left:
2569 dx = -1;
2570 dy = 0;
2571@@ -1573,6 +1616,9 @@
2572 ww->isSliding = !optionGetNoSlideMatch ().evaluate (w);
2573 }
2574 break;
2575+ case WallOptions::EdgeflipPointer:
2576+ toggleEdges (optionGetEdgeflipPointer ());
2577+ break;
2578
2579 default:
2580 break;
2581@@ -1633,7 +1679,7 @@
2582 moveWindow (None),
2583 focusDefault (true),
2584 transform (NoTransformation),
2585- edgeDrag (false)
2586+ windowIsDragMoved (false)
2587 {
2588 ScreenInterface::setHandler (screen);
2589 CompositeScreenInterface::setHandler (cScreen);
2590@@ -1700,9 +1746,12 @@
2591 setNotify (ArrowShadowColor);
2592 setNotify (NoSlideMatch);
2593 setNotify (EdgeflipPointer);
2594+<<<<<<< TREE
2595
2596 poller.setCallback (boost::bind (&WallScreen::positionUpdate, this,
2597 _1));
2598+=======
2599+>>>>>>> MERGE-SOURCE
2600 }
2601
2602 WallScreen::~WallScreen ()
2603@@ -1729,11 +1778,18 @@
2604 bool
2605 WallPluginVTable::init ()
2606 {
2607+<<<<<<< TREE
2608 if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) &&
2609 CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) &&
2610 CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) &&
2611 CompPlugin::checkPluginABI ("mousepoll", COMPIZ_MOUSEPOLL_ABI))
2612 return true;
2613+=======
2614+ if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) &&
2615+ CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) &&
2616+ CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI))
2617+ return true;
2618+>>>>>>> MERGE-SOURCE
2619
2620 return false;
2621 }
2622
2623=== modified file 'plugins/wall/src/wall.h'
2624--- plugins/wall/src/wall.h 2013-04-26 13:15:57 +0000
2625+++ plugins/wall/src/wall.h 2013-05-13 13:29:47 +0000
2626@@ -167,10 +167,7 @@
2627 WallCairoContext highlightContext;
2628 WallCairoContext arrowContext;
2629
2630- MousePoller poller;
2631- bool edgeDrag;
2632- CompRegion edgeRegion;
2633- CompRegion noEdgeRegion;
2634+ bool windowIsDragMoved;
2635 };
2636
2637 class WallWindow :
2638@@ -184,6 +181,7 @@
2639 virtual void activate ();
2640 void grabNotify (int, int, unsigned int, unsigned int);
2641 void ungrabNotify ();
2642+ void windowNotify (CompWindowNotify);
2643 bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,
2644 const CompRegion &, unsigned int);
2645
2646
2647=== modified file 'plugins/wall/wall.xml.in'
2648--- plugins/wall/wall.xml.in 2012-10-15 10:31:51 +0000
2649+++ plugins/wall/wall.xml.in 2013-05-13 13:29:47 +0000
2650@@ -17,7 +17,6 @@
2651 </relation>
2652 <requirement>
2653 <plugin>opengl</plugin>
2654- <plugin>mousepoll</plugin>
2655 </requirement>
2656 </deps>
2657 <options>
2658@@ -290,6 +289,7 @@
2659 <edge name="Left"/>
2660 </default>
2661 <allowed edgednd="true"/>
2662+ <passive_grab>false</passive_grab>
2663 </option>
2664 <option name="flip_right_edge" type="edge">
2665 <_short>Flip Right</_short>
2666@@ -299,6 +299,7 @@
2667 <edge name="Right"/>
2668 </default>
2669 <allowed edgednd="true"/>
2670+ <passive_grab>false</passive_grab>
2671 </option>
2672 <option name="flip_up_edge" type="edge">
2673 <_short>Flip Up</_short>
2674@@ -308,6 +309,7 @@
2675 <edge name="Top"/>
2676 </default>
2677 <allowed edgednd="true"/>
2678+ <passive_grab>false</passive_grab>
2679 </option>
2680 <option name="flip_down_edge" type="edge">
2681 <_short>Flip Down</_short>
2682@@ -317,6 +319,7 @@
2683 <edge name="Bottom"/>
2684 </default>
2685 <allowed edgednd="true"/>
2686+ <passive_grab>false</passive_grab>
2687 </option>
2688 </subgroup>
2689 </group>
2690
2691=== modified file 'plugins/wobbly/src/wobbly.cpp'
2692--- plugins/wobbly/src/wobbly.cpp 2013-05-09 13:43:07 +0000
2693+++ plugins/wobbly/src/wobbly.cpp 2013-05-13 13:29:47 +0000
2694@@ -49,6 +49,7 @@
2695 int output = ::screen->outputDeviceForPoint (x, object->position.y);
2696 const CompRect &workArea =
2697 ::screen->outputDevs ()[(unsigned) output].workArea ();
2698+
2699 int workAreaEdge = workArea.x1 ();
2700
2701 if (x >= workAreaEdge)
2702@@ -75,9 +76,7 @@
2703 window->output ().bottom;
2704 }
2705 else
2706- {
2707 continue;
2708- }
2709
2710 if (s > object->position.y)
2711 {
2712@@ -108,18 +107,13 @@
2713 if (v > v1)
2714 v1 = v;
2715 }
2716- else
2717- {
2718- if (v < v2)
2719- v2 = v;
2720- }
2721+ else if (v < v2)
2722+ v2 = v;
2723 }
2724 }
2725 }
2726 else
2727- {
2728 v2 = workAreaEdge;
2729- }
2730
2731 v1 = v1 - window->output ().left + window->border ().left;
2732 v2 = v2 - window->output ().left + window->border ().left;
2733@@ -150,7 +144,7 @@
2734
2735 int output = ::screen->outputDeviceForPoint (x, object->position.y);
2736 const CompRect &workArea =
2737- ::screen->outputDevs ()[(unsigned) output].workArea ();
2738+ ::screen->outputDevs ()[(unsigned) output].workArea ();
2739 int workAreaEdge = workArea.x2 ();
2740
2741 if (x <= workAreaEdge)
2742@@ -177,9 +171,7 @@
2743 window->output ().bottom;
2744 }
2745 else
2746- {
2747 continue;
2748- }
2749
2750 if (s > object->position.y)
2751 {
2752@@ -209,18 +201,13 @@
2753 if (v < v1)
2754 v1 = v;
2755 }
2756- else
2757- {
2758- if (v > v2)
2759- v2 = v;
2760- }
2761+ else if (v > v2)
2762+ v2 = v;
2763 }
2764 }
2765 }
2766 else
2767- {
2768 v2 = workAreaEdge;
2769- }
2770
2771 v1 = v1 + window->output ().right - window->border ().right;
2772 v2 = v2 + window->output ().right - window->border ().right;
2773@@ -278,9 +265,7 @@
2774 window->output ().right;
2775 }
2776 else
2777- {
2778 continue;
2779- }
2780
2781 if (s > object->position.x)
2782 {
2783@@ -310,18 +295,13 @@
2784 if (v > v1)
2785 v1 = v;
2786 }
2787- else
2788- {
2789- if (v < v2)
2790- v2 = v;
2791- }
2792+ else if (v < v2)
2793+ v2 = v;
2794 }
2795 }
2796 }
2797 else
2798- {
2799 v2 = workAreaEdge;
2800- }
2801
2802 v1 = v1 - window->output ().top + window->border ().top;
2803 v2 = v2 - window->output ().top + window->border ().top;
2804@@ -379,9 +359,7 @@
2805 window->output ().right;
2806 }
2807 else
2808- {
2809 continue;
2810- }
2811
2812 if (s > object->position.x)
2813 {
2814@@ -411,18 +389,13 @@
2815 if (v < v1)
2816 v1 = v;
2817 }
2818- else
2819- {
2820- if (v > v2)
2821- v2 = v;
2822- }
2823+ else if (v > v2)
2824+ v2 = v;
2825 }
2826 }
2827 }
2828 else
2829- {
2830 v2 = workAreaEdge;
2831- }
2832
2833 v1 = v1 + window->output ().bottom - window->border ().bottom;
2834 v2 = v2 + window->output ().bottom - window->border ().bottom;
2835@@ -488,7 +461,8 @@
2836 bottomRight.y = MINSHORT;
2837
2838 Object *object = objects;
2839- for (int i = 0; i < numObjects; i++, object++)
2840+
2841+ for (int i = 0; i < numObjects; ++i, ++object)
2842 {
2843 if (topLeft.x > object->position.x)
2844 topLeft.x = object->position.x;
2845@@ -511,7 +485,7 @@
2846 Spring *spring;
2847
2848 spring = &springs[numSprings];
2849- numSprings++;
2850+ ++numSprings;
2851
2852 spring->init (a, b, offsetX, offsetY);
2853 }
2854@@ -522,10 +496,8 @@
2855 int width,
2856 int height)
2857 {
2858- float gx, gy;
2859-
2860- gx = ((GRID_WIDTH - 1) / 2 * width) / (float) (GRID_WIDTH - 1);
2861- gy = ((GRID_HEIGHT - 1) / 2 * height) / (float) (GRID_HEIGHT - 1);
2862+ float gx = ((GRID_WIDTH - 1) / 2 * width) / (float) (GRID_WIDTH - 1);
2863+ float gy = ((GRID_HEIGHT - 1) / 2 * height) / (float) (GRID_HEIGHT - 1);
2864
2865 if (anchorObject)
2866 anchorObject->immobile = false;
2867@@ -543,9 +515,7 @@
2868 int y,
2869 int width)
2870 {
2871- float gx;
2872-
2873- gx = ((GRID_WIDTH - 1) / 2 * width) / (float) (GRID_WIDTH - 1);
2874+ float gx = ((GRID_WIDTH - 1) / 2 * width) / (float) (GRID_WIDTH - 1);
2875
2876 if (anchorObject)
2877 anchorObject->immobile = false;
2878@@ -600,24 +570,28 @@
2879 o = &objects[0];
2880 o->position.x = x;
2881 o->position.y = y;
2882+
2883 if (o != anchorObject)
2884 o->immobile = false;
2885
2886 o = &objects[GRID_WIDTH - 1];
2887 o->position.x = x + width;
2888 o->position.y = y;
2889+
2890 if (o != anchorObject)
2891 o->immobile = false;
2892
2893 o = &objects[GRID_WIDTH * (GRID_HEIGHT - 1)];
2894 o->position.x = x;
2895 o->position.y = y + height;
2896+
2897 if (o != anchorObject)
2898 o->immobile = false;
2899
2900 o = &objects[numObjects - 1];
2901 o->position.x = x + width;
2902 o->position.y = y + height;
2903+
2904 if (o != anchorObject)
2905 o->immobile = false;
2906 }
2907@@ -630,13 +604,14 @@
2908 int height)
2909 {
2910 Object *o;
2911- int gridX, gridY, i = 0;
2912+ int i = 0;
2913
2914- for (gridY = 0; gridY < GRID_HEIGHT; gridY++)
2915+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
2916 {
2917- for (gridX = 0; gridX < GRID_WIDTH; gridX++, i++)
2918+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++i)
2919 {
2920 o = &objects[i];
2921+
2922 if (o == object)
2923 {
2924 o->position.x = x + (gridX * width) / (GRID_WIDTH - 1);
2925@@ -654,15 +629,14 @@
2926 int width,
2927 int height)
2928 {
2929- float gw, gh;
2930-
2931- gw = GRID_WIDTH - 1;
2932- gh = GRID_HEIGHT - 1;
2933+ float gw = GRID_WIDTH - 1;
2934+ float gh = GRID_HEIGHT - 1;
2935
2936 Object *object = objects;
2937- for (int gridY = 0; gridY < GRID_HEIGHT; gridY++)
2938+
2939+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
2940 {
2941- for (int gridX = 0; gridX < GRID_WIDTH; gridX++, object++)
2942+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++object)
2943 {
2944 object->init (x + (gridX * width) / gw,
2945 y + (gridY * height) / gh,
2946@@ -676,9 +650,9 @@
2947 void
2948 WobblyWindow::updateModelSnapping ()
2949 {
2950- unsigned int edgeMask, gridMask, mask;
2951+ unsigned int gridMask, mask;
2952
2953- edgeMask = model->edgeMask;
2954+ unsigned int edgeMask = model->edgeMask;
2955
2956 if (model->snapCnt[North])
2957 edgeMask &= ~SouthEdgeMask;
2958@@ -691,7 +665,8 @@
2959 edgeMask &= ~WestEdgeMask;
2960
2961 Object *object = model->objects;
2962- for (int gridY = 0; gridY < GRID_HEIGHT; gridY++)
2963+
2964+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
2965 {
2966 if (gridY == 0)
2967 gridMask = edgeMask & NorthEdgeMask;
2968@@ -700,7 +675,7 @@
2969 else
2970 gridMask = 0;
2971
2972- for (int gridX = 0; gridX < GRID_WIDTH; gridX++, object++)
2973+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++object)
2974 {
2975 mask = gridMask;
2976
2977@@ -747,9 +722,10 @@
2978 Model::reduceEdgeEscapeVelocity ()
2979 {
2980 Object *object = objects;
2981- for (int gridY = 0; gridY < GRID_HEIGHT; gridY++)
2982+
2983+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
2984 {
2985- for (int gridX = 0; gridX < GRID_WIDTH; gridX++, object++)
2986+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++object)
2987 {
2988 if (object->vertEdge.snapped)
2989 object->vertEdge.velocity *= drand48 () * 0.25f;
2990@@ -766,9 +742,10 @@
2991 bool snapped = false;
2992
2993 Object *object = objects;
2994- for (int gridY = 0; gridY < GRID_HEIGHT; gridY++)
2995+
2996+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
2997 {
2998- for (int gridX = 0; gridX < GRID_WIDTH; gridX++, object++)
2999+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++object)
3000 {
3001 if (object->vertEdge.snapped ||
3002 object->horzEdge.snapped)
3003@@ -793,16 +770,16 @@
3004 int height)
3005 {
3006 float vX, vY;
3007- float w, h;
3008 float scale;
3009
3010- w = width;
3011- h = height;
3012+ float w = width;
3013+ float h = height;
3014
3015 Object *object = objects;
3016- for (int gridY = 0; gridY < GRID_HEIGHT; gridY++)
3017+
3018+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
3019 {
3020- for (int gridX = 0; gridX < GRID_WIDTH; gridX++, object++)
3021+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++object)
3022 {
3023 if (!object->immobile)
3024 {
3025@@ -828,16 +805,15 @@
3026 int height)
3027 {
3028 int i = 0;
3029- float hpad, vpad;
3030
3031 numSprings = 0;
3032
3033- hpad = ((float) width) / (GRID_WIDTH - 1);
3034- vpad = ((float) height) / (GRID_HEIGHT - 1);
3035+ float hpad = ((float) width) / (GRID_WIDTH - 1);
3036+ float vpad = ((float) height) / (GRID_HEIGHT - 1);
3037
3038- for (int gridY = 0; gridY < GRID_HEIGHT; gridY++)
3039+ for (int gridY = 0; gridY < GRID_HEIGHT; ++gridY)
3040 {
3041- for (int gridX = 0; gridX < GRID_WIDTH; gridX++, i++)
3042+ for (int gridX = 0; gridX < GRID_WIDTH; ++gridX, ++i)
3043 {
3044 if (gridX > 0)
3045 addSpring (&objects[i - 1],
3046@@ -857,7 +833,7 @@
3047 float ty)
3048 {
3049 Object *object = objects;
3050- for (int i = 0; i < numObjects; i++, object++)
3051+ for (int i = 0; i < numObjects; ++i, ++object)
3052 {
3053 object->position.x += tx;
3054 object->position.y += ty;
3055@@ -918,7 +894,7 @@
3056 {
3057 object->position.x += object->velocity.x * 2.0f;
3058
3059- model->snapCnt[dir]--;
3060+ --model->snapCnt[dir];
3061
3062 object->vertEdge.snapped = false;
3063 object->edgeMask = 0;
3064@@ -941,7 +917,7 @@
3065 {
3066 object->position.y += object->velocity.y * 2.0f;
3067
3068- model->snapCnt[dir]--;
3069+ --model->snapCnt[dir];
3070
3071 object->horzEdge.snapped = false;
3072 object->edgeMask = 0;
3073@@ -1005,7 +981,7 @@
3074 object->position.x = object->vertEdge.next;
3075 object->velocity.x = 0.0f;
3076
3077- model->snapCnt[West]++;
3078+ ++model->snapCnt[West];
3079
3080 updateModelSnapping ();
3081 }
3082@@ -1040,7 +1016,7 @@
3083 object->position.x = object->vertEdge.next;
3084 object->velocity.x = 0.0f;
3085
3086- model->snapCnt[East]++;
3087+ ++model->snapCnt[East];
3088
3089 updateModelSnapping ();
3090 }
3091@@ -1078,7 +1054,7 @@
3092 object->position.y = object->horzEdge.next;
3093 object->velocity.y = 0.0f;
3094
3095- model->snapCnt[North]++;
3096+ ++model->snapCnt[North];
3097
3098 updateModelSnapping ();
3099 }
3100@@ -1113,7 +1089,7 @@
3101 object->position.y = object->horzEdge.next;
3102 object->velocity.y = 0.0f;
3103
3104- model->snapCnt[South]++;
3105+ ++model->snapCnt[South];
3106
3107 updateModelSnapping ();
3108 }
3109@@ -1152,23 +1128,22 @@
3110 float time)
3111 {
3112 unsigned int wobbly = 0;
3113- int steps;
3114 float velocitySum = 0.0f;
3115 float force, forceSum = 0.0f;
3116
3117 model->steps += time / 15.0f;
3118- steps = floor (model->steps);
3119+ int steps = floor (model->steps);
3120 model->steps -= steps;
3121
3122 if (!steps)
3123 return WobblyInitialMask;
3124
3125- for (int j = 0; j < steps; j++)
3126+ for (int j = 0; j < steps; ++j)
3127 {
3128- for (int i = 0; i < model->numSprings; i++)
3129+ for (int i = 0; i < model->numSprings; ++i)
3130 model->springs[i].exertForces (k);
3131
3132- for (int i = 0; i < model->numObjects; i++)
3133+ for (int i = 0; i < model->numObjects; ++i)
3134 {
3135 velocitySum += modelStepObject (&model->objects[i],
3136 friction,
3137@@ -1195,7 +1170,6 @@
3138 float *patchY)
3139 {
3140 float coeffsU[4], coeffsV[4];
3141- float x, y;
3142
3143 coeffsU[0] = (1 - u) * (1 - u) * (1 - u);
3144 coeffsU[1] = 3 * u * (1 - u) * (1 - u);
3145@@ -1207,11 +1181,12 @@
3146 coeffsV[2] = 3 * v * v * (1 - v);
3147 coeffsV[3] = v * v * v;
3148
3149- x = y = 0.0f;
3150+ float x = 0.0f;
3151+ float y = 0.0f;
3152
3153- for (int i = 0; i < 4; i++)
3154+ for (int i = 0; i < 4; ++i)
3155 {
3156- for (int j = 0; j < 4; j++)
3157+ for (int j = 0; j < 4; ++j)
3158 {
3159 x += coeffsU[i] * coeffsV[j] *
3160 objects[j * GRID_WIDTH + i].position.x;
3161@@ -1266,7 +1241,7 @@
3162 Object *object = &objects[0];
3163 float distance, minDistance = 0.0;
3164
3165- for (int i = 0; i < numObjects; i++)
3166+ for (int i = 0; i < numObjects; ++i)
3167 {
3168 distance = objects[i].distanceToPoint (x, y);
3169 if (i == 0 || distance < minDistance)
3170@@ -1351,10 +1326,8 @@
3171 {
3172 float topmostYPos = MAXSHORT;
3173 float bottommostYPos = MINSHORT;
3174- int decorTop;
3175- int decorTitleBottom;
3176
3177- for (int i = 0; i < GRID_WIDTH; i++)
3178+ for (int i = 0; i < GRID_WIDTH; ++i)
3179 {
3180 int modelY = model->objects[i].position.y;
3181
3182@@ -1365,9 +1338,9 @@
3183 topmostYPos = MIN (modelY, topmostYPos);
3184 }
3185
3186- decorTop = bottommostYPos +
3187- w->output ().top - w->border ().top;
3188- decorTitleBottom = topmostYPos + w->output ().top;
3189+ int decorTop = bottommostYPos +
3190+ w->output ().top - w->border ().top;
3191+ int decorTitleBottom = topmostYPos + w->output ().top;
3192
3193 if (constraintBox->y () > decorTop)
3194 {
3195@@ -1448,10 +1421,8 @@
3196 }
3197 }
3198 if (!ww->wobblingMask)
3199- {
3200 // Wobbling just finished for this window
3201 ww->enableWobbling (false);
3202- }
3203
3204 wobblingWindowsMask |= ww->wobblingMask;
3205 }
3206@@ -1487,19 +1458,20 @@
3207 unsigned int maxGridWidth,
3208 unsigned int maxGridHeight)
3209 {
3210- int wx, wy, width, height, gridW, gridH;
3211-
3212 CompRect outRect (window->outputRect ());
3213- wx = outRect.x ();
3214- wy = outRect.y ();
3215- width = outRect.width ();
3216- height = outRect.height ();
3217-
3218- gridW = width / wScreen->optionGetGridResolution ();
3219+
3220+ int wx = outRect.x ();
3221+ int wy = outRect.y ();
3222+ int width = outRect.width ();
3223+ int height = outRect.height ();
3224+
3225+ int gridW = width / wScreen->optionGetGridResolution ();
3226+
3227 if (gridW < wScreen->optionGetMinGridSize ())
3228 gridW = wScreen->optionGetMinGridSize ();
3229
3230- gridH = height / wScreen->optionGetGridResolution ();
3231+ int gridH = height / wScreen->optionGetGridResolution ();
3232+
3233 if (gridH < wScreen->optionGetMinGridSize ())
3234 gridH = wScreen->optionGetMinGridSize ();
3235
3236@@ -1525,7 +1497,7 @@
3237 GLfloat normalizedX = (v[0] - wx) / width;
3238 GLfloat normalizedY = (v[1] - wy) / height;
3239 model->bezierPatchEvaluate (normalizedX, normalizedY,
3240- &deformedX, &deformedY);
3241+ &deformedX, &deformedY);
3242 v[0] = deformedX;
3243 v[1] = deformedY;
3244 }
3245@@ -1569,13 +1541,9 @@
3246 {
3247 WobblyWindow *ww = WobblyWindow::get (w);
3248
3249- if (ww->grabbed && ww->model)
3250- {
3251- if (ww->model->disableSnapping ())
3252- {
3253- startWobbling (ww);
3254- }
3255- }
3256+ if (ww->grabbed && ww->model &&
3257+ ww->model->disableSnapping ())
3258+ startWobbling (ww);
3259 }
3260
3261 snapping = false;
3262@@ -1618,6 +1586,7 @@
3263 if (model && isWobblyWin ())
3264 initiateMapEffect ();
3265 break;
3266+
3267 default:
3268 break;
3269 }
3270@@ -1639,11 +1608,10 @@
3271 {
3272 XkbStateNotifyEvent *stateEvent = (XkbStateNotifyEvent *) event;
3273 CompAction *action;
3274- bool inverted;
3275 unsigned int mods = 0xffffffff;
3276
3277- action = &optionGetSnapKey ();
3278- inverted = optionGetSnapInverted ();
3279+ action = &optionGetSnapKey ();
3280+ bool inverted = optionGetSnapInverted ();
3281
3282 if (action->type () & CompAction::BindingTypeKey)
3283 mods = action->key ().modifiers ();
3284@@ -1700,6 +1668,8 @@
3285 }
3286 }
3287 }
3288+ break;
3289+
3290 default:
3291 break;
3292 }
3293@@ -1714,16 +1684,15 @@
3294
3295 if (ww->isWobblyWin ())
3296 {
3297- int focusEffect;
3298-
3299- focusEffect = optionGetFocusEffect ();
3300+ int focusEffect = optionGetFocusEffect ();
3301
3302 if ((focusEffect != WobblyOptions::FocusEffectNone) &&
3303 optionGetFocusWindowMatch ().evaluate (w) &&
3304 ww->ensureModel ())
3305 {
3306- switch (focusEffect) {
3307- case WobblyOptions::FocusEffectShiver:
3308+ switch (focusEffect)
3309+ {
3310+ case WobblyOptions::FocusEffectShiver:
3311 {
3312 CompRect outRect (w->serverOutputRect ());
3313
3314@@ -1732,8 +1701,10 @@
3315 outRect.width (),
3316 outRect.height ());
3317 }
3318- default:
3319- break;
3320+ break;
3321+
3322+ default:
3323+ break;
3324 }
3325
3326 startWobbling (ww);
3327@@ -1762,6 +1733,7 @@
3328 cScreen->donePaintSetEnabled (this, true);
3329 gScreen->glPaintOutputSetEnabled (this, true);
3330 }
3331+
3332 ww->wobblingMask |= WobblyInitialMask;
3333 wobblingWindowsMask |= ww->wobblingMask;
3334
3335@@ -1773,7 +1745,6 @@
3336 const CompRect &rect)
3337 {
3338 if (!initial)
3339- {
3340 if (wobblingMask == WobblyForceMask)
3341 {
3342 int x1 = model->topLeft.x;
3343@@ -1786,7 +1757,6 @@
3344
3345 return true;
3346 }
3347- }
3348
3349 return cWindow->damageRect (initial, rect);
3350 }
3351@@ -1815,6 +1785,7 @@
3352 outRect.width (),
3353 outRect.height ());
3354 break;
3355+
3356 default:
3357 break;
3358 }
3359@@ -1871,17 +1842,13 @@
3360 }
3361 else if (model)
3362 {
3363- if (wobblingMask)
3364- {
3365- if (!(state & MAXIMIZE_STATE))
3366- model->setTopAnchor (outRect.x (), outRect.y (),
3367- outRect.width ());
3368- }
3369+ if (wobblingMask &&
3370+ !(state & MAXIMIZE_STATE))
3371+ model->setTopAnchor (outRect.x (), outRect.y (),
3372+ outRect.width ());
3373 else
3374- {
3375 model->initObjects (outRect.x (), outRect.y (),
3376 outRect.width (), outRect.height ());
3377- }
3378
3379 model->initSprings (outRect.x (), outRect.y (),
3380 outRect.width (), outRect.height ());
3381@@ -1917,7 +1884,8 @@
3382 if (state & MAXIMIZE_STATE)
3383 {
3384 Object *object = model->objects;
3385- for (int i = 0; i < model->numObjects; i++, object++)
3386+
3387+ for (int i = 0; i < model->numObjects; ++i, ++object)
3388 {
3389 if (object->immobile)
3390 {
3391@@ -1952,11 +1920,12 @@
3392 wScreen->grabMask = mask;
3393 wScreen->grabWindow = window;
3394 }
3395+
3396 wScreen->moveWindow = false;
3397
3398- if (mask & (CompWindowGrabButtonMask) &&
3399- mask & (CompWindowGrabMoveMask) &&
3400- wScreen->optionGetMoveWindowMatch ().evaluate (window) &&
3401+ if (mask & (CompWindowGrabButtonMask) &&
3402+ mask & (CompWindowGrabMoveMask) &&
3403+ wScreen->optionGetMoveWindowMatch ().evaluate (window) &&
3404 isWobblyWin ())
3405 {
3406 wScreen->moveWindow = true;
3407@@ -1970,10 +1939,8 @@
3408 CompRect outRect (window->outputRect ());
3409
3410 if (window->state () & MAXIMIZE_STATE)
3411- {
3412 model->addEdgeAnchors (outRect.x (), outRect.y (),
3413 outRect.width (), outRect.height ());
3414- }
3415 else
3416 {
3417 model->removeEdgeAnchors (outRect.x (), outRect.y (),
3418@@ -1983,11 +1950,8 @@
3419 model->anchorObject->immobile = false;
3420 }
3421 }
3422- else
3423- {
3424- if (model->anchorObject)
3425- model->anchorObject->immobile = false;
3426- }
3427+ else if (model->anchorObject)
3428+ model->anchorObject->immobile = false;
3429
3430 model->anchorObject = model->findNearestObject (x, y);
3431 model->anchorObject->immobile = true;
3432@@ -2029,7 +1993,7 @@
3433
3434 if (wScreen->optionGetGrabWindowMatch ().evaluate (window))
3435 {
3436- for (int i = 0; i < model->numSprings; i++)
3437+ for (int i = 0; i < model->numSprings; ++i)
3438 {
3439 s = &model->springs[i];
3440
3441@@ -2161,12 +2125,10 @@
3442 grabbed (false),
3443 state (w->state ())
3444 {
3445- if ((w->mapNum () && wScreen->optionGetMaximizeEffect ()) ||
3446- wScreen->optionGetMapEffect () != WobblyOptions::MapEffectNone)
3447- {
3448- if (isWobblyWin ())
3449- ensureModel ();
3450- }
3451+ if (((w->mapNum () && wScreen->optionGetMaximizeEffect ()) ||
3452+ wScreen->optionGetMapEffect () != WobblyOptions::MapEffectNone) &&
3453+ isWobblyWin ())
3454+ ensureModel ();
3455
3456 WindowInterface::setHandler (window);
3457 CompositeWindowInterface::setHandler (cWindow, false);
3458
3459=== modified file 'src/privatescreen.h'
3460--- src/privatescreen.h 2013-02-27 03:24:45 +0000
3461+++ src/privatescreen.h 2013-05-13 13:29:47 +0000
3462@@ -744,6 +744,7 @@
3463
3464 Window wmSnSelectionWindow;
3465
3466+ int clientPointerDeviceId;
3467 Cursor normalCursor;
3468 Cursor busyCursor;
3469 Cursor invisibleCursor;
3470
3471=== modified file 'src/screen.cpp'
3472--- src/screen.cpp 2013-02-03 17:58:29 +0000
3473+++ src/screen.cpp 2013-05-13 13:29:47 +0000
3474@@ -52,6 +52,7 @@
3475 #include <X11/extensions/Xrandr.h>
3476 #include <X11/extensions/shape.h>
3477 #include <X11/cursorfont.h>
3478+#include <X11/extensions/XInput2.h>
3479
3480 #include <core/global.h>
3481 #include <core/screen.h>
3482@@ -2082,9 +2083,9 @@
3483 if (priv->initialized)
3484 {
3485 if (!emptySequence())
3486- XDefineCursor (priv->dpy, priv->rootWindow(), priv->busyCursor);
3487+ XIDefineCursor (priv->dpy, priv->clientPointerDeviceId, priv->rootWindow(), priv->busyCursor);
3488 else
3489- XDefineCursor (priv->dpy, priv->rootWindow(), priv->normalCursor);
3490+ XIDefineCursor (priv->dpy, priv->clientPointerDeviceId, priv->rootWindow(), priv->normalCursor);
3491 }
3492 }
3493
3494@@ -3486,7 +3487,8 @@
3495 void
3496 CompScreenImpl::removeAction (CompAction *action)
3497 {
3498- if (!(privateScreen.initialized || action->active ()))
3499+ if (!privateScreen.initialized ||
3500+ !action->active ())
3501 return;
3502
3503 grabManager.setCurrentState(action->state());
3504@@ -3902,6 +3904,11 @@
3505 SubstructureRedirectMask | SubstructureNotifyMask, &xev);
3506 }
3507
3508+/* These functions do not guard against negative decrements
3509+ * as they are unable to determine the source of the reference
3510+ * and as such they should only be called by functions that
3511+ * actually determine the source of what was referencing the
3512+ * edge and can guard against multiple-references-per-owner */
3513 void
3514 PrivateScreen::enableEdge (int edge)
3515 {
3516@@ -5002,10 +5009,12 @@
3517 eventManager.setSupportingWmCheck (dpy, rootWindow());
3518 screen->updateSupportedWmHints ();
3519
3520+ XIGetClientPointer (dpy, None, &clientPointerDeviceId);
3521+
3522 normalCursor = XCreateFontCursor (dpy, XC_left_ptr);
3523 busyCursor = XCreateFontCursor (dpy, XC_watch);
3524
3525- XDefineCursor (dpy, rootWindow(), normalCursor);
3526+ XIDefineCursor (dpy, clientPointerDeviceId, rootWindow(), normalCursor);
3527
3528 /* Attempt to gain SubstructureRedirectMask */
3529 CompScreenImpl::checkForError (dpy);
3530@@ -5180,6 +5189,7 @@
3531 nDesktop (1),
3532 currentDesktop (0),
3533 wmSnSelectionWindow (None),
3534+ clientPointerDeviceId (None),
3535 normalCursor (None),
3536 busyCursor (None),
3537 invisibleCursor (None),
3538
3539=== modified file 'tests/acceptance-tests/xorg-gtest/tests/CMakeLists.txt'
3540--- tests/acceptance-tests/xorg-gtest/tests/CMakeLists.txt 2013-04-22 14:30:55 +0000
3541+++ tests/acceptance-tests/xorg-gtest/tests/CMakeLists.txt 2013-05-13 13:29:47 +0000
3542@@ -7,7 +7,7 @@
3543 set (COMPIZ_XORG_ACCEPTANCE_TEST_LIBRARIES
3544 compiz_xorg_gtest_system_test
3545 xorg_gtest_all
3546- xorg_gtest_main
3547+ compiz_xorg_gtest_main
3548 ${GTEST_BOTH_LIBRARIES}
3549 ${XORG_SERVER_LIBRARIES}
3550 ${X11_XI_LIBRARIES})
3551
3552=== added directory 'tests/manual/plugins'
3553=== added file 'tests/manual/plugins/wall.txt'
3554--- tests/manual/plugins/wall.txt 1970-01-01 00:00:00 +0000
3555+++ tests/manual/plugins/wall.txt 2013-05-13 13:29:47 +0000
3556@@ -0,0 +1,49 @@
3557+COMPIZ WALL PLUGIN MANUAL TESTS
3558+===============================
3559+Sam Spilsbury <smspillaz@gmail.com>
3560+
3561+Edge Flip Pointer
3562+-----------------
3563+Setup:
3564+#. Enable "Edge Flip Pointer" in the wall plugin
3565+ and set up screen edges as appropriate
3566+
3567+Actions:
3568+#. Move cursor to relevant screen edge
3569+#. Viewport will change to the next one
3570+ over
3571+#. Viewport will not change if that
3572+ viewport is the last one in the row
3573+ or column
3574+
3575+Edge Flip Move
3576+--------------
3577+Setup:
3578+#. Disable "Edge Flip Pointer" in the wall plugin,
3579+ enable "Edge Flip Move" in the wall plugin,
3580+ and set up screen edges as appropriate
3581+
3582+Actions:
3583+#. Grab window by titlebar
3584+#. Move cursor to relevant screen edge
3585+#. Viewport will change to the next one
3586+ over while window is grabbed
3587+#. Viewport will not change if that
3588+ viewport is the last one in the row
3589+ or colum
3590+
3591+Edge Flip Dnd
3592+-------------
3593+Setup:
3594+#. Disable "Edge Flip Pointer" in the wall plugin,
3595+ enable "Edge Flip Dnd" in the wall plugin,
3596+ and set up screen edges as appropriate
3597+
3598+Actions:
3599+#. Grab a desktop icon
3600+#. Move cursor to relevant screen edge
3601+#. Viewport will change to the next one
3602+ over while icon is grabbed
3603+#. Viewport will not change if that
3604+ viewport is the last one in the row
3605+ or colum
3606
3607=== modified file 'tests/system/xorg-gtest/tests/CMakeLists.txt'
3608--- tests/system/xorg-gtest/tests/CMakeLists.txt 2013-04-22 14:30:55 +0000
3609+++ tests/system/xorg-gtest/tests/CMakeLists.txt 2013-05-13 13:29:47 +0000
3610@@ -31,7 +31,7 @@
3611 set (COMPIZ_XORG_GTEST_LIBRARIES
3612 compiz_xorg_gtest_system_test
3613 xorg_gtest_all
3614- xorg_gtest_main
3615+ compiz_xorg_gtest_main
3616 ${GTEST_BOTH_LIBRARIES}
3617 ${XORG_SERVER_LIBRARIES}
3618 ${X11_XI_LIBRARIES})
3619
3620=== modified file 'tests/xorg-gtest/CMakeLists.txt'
3621--- tests/xorg-gtest/CMakeLists.txt 2013-04-22 14:30:55 +0000
3622+++ tests/xorg-gtest/CMakeLists.txt 2013-05-13 13:29:47 +0000
3623@@ -24,14 +24,11 @@
3624 set (_xorg_gtest_all_srcs
3625 ${XORG_SERVER_GTEST_SRC}/src/xorg-gtest-all.cpp)
3626
3627-set (_xorg_gtest_main_srcs
3628- ${XORG_SERVER_GTEST_SRC}/src/xorg-gtest_main.cpp)
3629-
3630 add_library (xorg_gtest_all STATIC
3631 ${_xorg_gtest_all_srcs})
3632
3633-add_library (xorg_gtest_main STATIC
3634- ${_xorg_gtest_main_srcs})
3635+add_library (compiz_xorg_gtest_main STATIC
3636+ ${CMAKE_CURRENT_SOURCE_DIR}/src/compiz_xorg_gtest_main.cpp)
3637
3638 add_library (compiz_xorg_gtest_system_test STATIC
3639 ${CMAKE_CURRENT_SOURCE_DIR}/src/compiz-xorg-gtest.cpp)
3640@@ -43,13 +40,13 @@
3641 ${GTEST_BOTH_LIBRARIES}
3642 ${XORG_SERVER_GTEST_LIBRARIES})
3643
3644-target_link_libraries (xorg_gtest_main
3645+target_link_libraries (compiz_xorg_gtest_main
3646 ${GTEST_BOTH_LIBRARIES}
3647 ${XORG_SERVER_GTEST_LIBRARIES})
3648
3649 target_link_libraries (compiz_xorg_gtest_system_test
3650 xorg_gtest_all
3651- xorg_gtest_main
3652+ compiz_xorg_gtest_main
3653 ${GTEST_BOTH_LIBRARIES}
3654 ${XORG_SERVER_LIBRARIES}
3655 ${COMPIZ_XORG_GTEST_COMMUNICATOR_LIBRARY}
3656
3657=== added file 'tests/xorg-gtest/src/compiz_xorg_gtest_main.cpp'
3658--- tests/xorg-gtest/src/compiz_xorg_gtest_main.cpp 1970-01-01 00:00:00 +0000
3659+++ tests/xorg-gtest/src/compiz_xorg_gtest_main.cpp 2013-05-13 13:29:47 +0000
3660@@ -0,0 +1,154 @@
3661+/*
3662+ * Compiz XOrg GTest Decoration Pixmap Protocol Integration Tests
3663+ *
3664+ * Copyright (C) 2013 Sam Spilsbury.
3665+ *
3666+ * This library is free software; you can redistribute it and/or
3667+ * modify it under the terms of the GNU Lesser General Public
3668+ * License as published by the Free Software Foundation; either
3669+ * version 2.1 of the License, or (at your option) any later version.
3670+
3671+ * This library is distributed in the hope that it will be useful,
3672+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3673+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3674+ * Lesser General Public License for more details.
3675+
3676+ * You should have received a copy of the GNU Lesser General Public
3677+ * License along with this library; if not, write to the Free Software
3678+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
3679+ *
3680+ * Authored By:
3681+ * Sam Spilsbury <smspillaz@gmail.com>
3682+ */
3683+
3684+#include <csignal>
3685+
3686+#include <sstream>
3687+#include <stdexcept>
3688+
3689+#include <gtest/gtest.h>
3690+#include "xorg/gtest/xorg-gtest-environment.h"
3691+
3692+#include <X11/Xlib.h>
3693+
3694+namespace compiz
3695+{
3696+namespace testing
3697+{
3698+class XorgEnvironment :
3699+ public xorg::testing::Environment
3700+{
3701+ public:
3702+
3703+ virtual void SetUp ()
3704+ {
3705+ /* Another hack - if the server fails
3706+ * to start then just set another display
3707+ * number until it does */
3708+ const int MaxConnections = 255;
3709+ int displayNumber = 0;
3710+ bool serverRunningOnDisplay = true;
3711+
3712+ while (serverRunningOnDisplay &&
3713+ displayNumber < MaxConnections)
3714+ {
3715+ std::stringstream ss;
3716+ ss << ":" << displayNumber;
3717+ Display *check = XOpenDisplay (ss.str ().c_str ());
3718+
3719+ if (!check)
3720+ serverRunningOnDisplay = false;
3721+ else
3722+ {
3723+ XCloseDisplay (check);
3724+ ++displayNumber;
3725+ }
3726+ }
3727+
3728+ if (displayNumber == MaxConnections)
3729+ throw std::runtime_error ("couldn't find a socket "
3730+ "to launch on");
3731+
3732+ std::stringstream logFile;
3733+ logFile << "/tmp/Compiz.Xorg.GTest." << displayNumber << ".log";
3734+
3735+ SetDisplayNumber (displayNumber);
3736+ SetLogFile (logFile.str ());
3737+ xorg::testing::Environment::SetUp ();
3738+ }
3739+};
3740+}
3741+}
3742+
3743+/* X testing environment - Google Test environment feat. dummy x server
3744+ * Copyright (C) 2011, 2012 Canonical Ltd.
3745+ */
3746+compiz::testing::XorgEnvironment *environment = NULL;
3747+
3748+namespace
3749+{
3750+
3751+void SignalHandler (int signum)
3752+{
3753+ if (environment)
3754+ environment->Kill ();
3755+
3756+ /* This will call the default handler because we used SA_RESETHAND */
3757+ raise (signum);
3758+}
3759+
3760+void SetupSignalHandlers ()
3761+{
3762+ static const int signals[] =
3763+ {
3764+ SIGHUP,
3765+ SIGTERM,
3766+ SIGQUIT,
3767+ SIGILL,
3768+ SIGABRT,
3769+ SIGFPE,
3770+ SIGSEGV,
3771+ SIGPIPE,
3772+ SIGALRM,
3773+ SIGTERM,
3774+ SIGUSR1,
3775+ SIGUSR2,
3776+ SIGBUS,
3777+ SIGPOLL,
3778+ SIGPROF,
3779+ SIGSYS,
3780+ SIGTRAP,
3781+ SIGVTALRM,
3782+ SIGXCPU,
3783+ SIGXFSZ,
3784+ SIGIOT,
3785+ SIGSTKFLT,
3786+ SIGIO,
3787+ SIGPWR,
3788+ SIGUNUSED,
3789+ };
3790+
3791+ struct sigaction action;
3792+ action.sa_handler = SignalHandler;
3793+ sigemptyset(&action.sa_mask);
3794+ action.sa_flags = SA_RESETHAND;
3795+
3796+ for (unsigned i = 0; i < sizeof(signals) / sizeof(signals[0]); ++i)
3797+ if (sigaction(signals[i], &action, NULL))
3798+ std::cerr << "Warning: Failed to set signal handler for signal "
3799+ << signals[i] << "\n";
3800+}
3801+}
3802+
3803+int main (int argc, char **argv)
3804+{
3805+ ::testing::InitGoogleTest (&argc, argv);
3806+
3807+ SetupSignalHandlers ();
3808+
3809+ environment = new compiz::testing::XorgEnvironment ();
3810+ ::testing::AddGlobalTestEnvironment (environment);
3811+
3812+ return RUN_ALL_TESTS ();
3813+}
3814+

Subscribers

People subscribed via source and target branches

to all changes: