summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/addhelper.c
diff options
context:
space:
mode:
authorkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-11 17:06:46 +0000
committerkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-11 17:06:46 +0000
commit4b0d394ce874f72c0136867db12748be56c945e0 (patch)
tree0a764cb21aeacf6170b4bf5be49695b39b569990 /beryl-plugins/src/addhelper.c
parent25c651b7bc41edae16d634927545e5d193d95805 (diff)
downloadmarex-dev-4b0d394ce874f72c0136867db12748be56c945e0.tar.gz
marex-dev-4b0d394ce874f72c0136867db12748be56c945e0.tar.bz2
addhelper: Only update when the active window actually changes.
rotate: Add option to rotate all screens. The option itself works fine, but screengrabs are a bit dangerous atm, so use with care. WIK. git-svn-id: file:///beryl/trunk@3961 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/addhelper.c')
-rw-r--r--beryl-plugins/src/addhelper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/beryl-plugins/src/addhelper.c b/beryl-plugins/src/addhelper.c
index 2a0e735..5af2e50 100644
--- a/beryl-plugins/src/addhelper.c
+++ b/beryl-plugins/src/addhelper.c
@@ -73,6 +73,7 @@ typedef struct _AddHelperDisplay
GLushort saturation;
int wmMask;
Bool toggle;
+ Window lastActive;
AhFocusBehavior behavior;
HandleEventProc handleEvent;
@@ -152,9 +153,12 @@ static void addhelperHandleEvent(CompDisplay * d, XEvent * event)
if (!ad->toggle)
return;
- if (event->type == ConfigureNotify || event->type == PropertyNotify)
+ if (event->type == PropertyNotify && ad->lastActive != d->activeWindow)
+ {
for (s = d->screens; s; s = s->next)
walk_windows(s, False);
+ ad->lastActive = d->activeWindow;
+ }
}