summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/rotate.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-22 10:18:33 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-22 10:18:33 +0000
commitb5beade41bfec407f63741ca0418289115b74851 (patch)
treed58b4cb8cdcef870afcd0c12dec873ca60c32b41 /beryl-plugins/src/rotate.c
parent71aee6cf04b02d6ea0251b13ea518feb05ffe83b (diff)
downloadmarex-dev-b5beade41bfec407f63741ca0418289115b74851.tar.gz
marex-dev-b5beade41bfec407f63741ca0418289115b74851.tar.bz2
rotate plugin: only keep track of the first grabbed window, not the last one
git-svn-id: file:///beryl/trunk@2943 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/rotate.c')
-rw-r--r--beryl-plugins/src/rotate.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/beryl-plugins/src/rotate.c b/beryl-plugins/src/rotate.c
index d6f581c..565b9de 100644
--- a/beryl-plugins/src/rotate.c
+++ b/beryl-plugins/src/rotate.c
@@ -2158,8 +2158,10 @@ rotateWindowGrabNotify(CompWindow * w,
{
ROTATE_SCREEN(w->screen);
- rs->grabMask = mask;
- rs->grabWindow = w;
+ if (!rs->grabWindow) {
+ rs->grabMask = mask;
+ rs->grabWindow = w;
+ }
UNWRAP(rs, w->screen, windowGrabNotify);
(*w->screen->windowGrabNotify) (w, x, y, state, mask);
@@ -2170,8 +2172,10 @@ static void rotateWindowUngrabNotify(CompWindow * w)
{
ROTATE_SCREEN(w->screen);
- rs->grabMask = 0;
- rs->grabWindow = NULL;
+ if (w == rs->grabWindow) {
+ rs->grabMask = 0;
+ rs->grabWindow = NULL;
+ }
UNWRAP(rs, w->screen, windowUngrabNotify);
(*w->screen->windowUngrabNotify) (w);