summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-08-08 15:45:37 +0200
committerDennis kasprzyk <onestone@opencompositing.org>2008-08-08 15:49:59 +0200
commit00534fe6b228ef522f8144e575dca61433ffbc6b (patch)
tree410536eec8300f1cfb2d03491c93330b2928f968 /src
parentc916c15253e74c3989fa5412e845146227d7cd32 (diff)
downloadzcomp-00534fe6b228ef522f8144e575dca61433ffbc6b.tar.gz
zcomp-00534fe6b228ef522f8144e575dca61433ffbc6b.tar.bz2
Re-sync to master.
Diffstat (limited to 'src')
-rw-r--r--src/event.cpp14
-rw-r--r--src/option.cpp3
-rw-r--r--src/screen.cpp18
3 files changed, 25 insertions, 10 deletions
diff --git a/src/event.cpp b/src/event.cpp
index f23edf5..ca6f656 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -2012,15 +2012,17 @@ CompDisplay::handleEvent (XEvent *event)
sa = (XSyncAlarmNotifyEvent *) event;
- w = NULL;
-
for (s = priv->screens; s; s = s->next)
+ {
for (w = s->windows (); w; w = w->next)
+ {
if (w->syncAlarm () == sa->alarm)
- break;
-
- if (w)
- w->handleSyncAlarm ();
+ {
+ w->handleSyncAlarm ();
+ return;
+ }
+ }
+ }
}
break;
}
diff --git a/src/option.cpp b/src/option.cpp
index c976b70..e7b46ef 100644
--- a/src/option.cpp
+++ b/src/option.cpp
@@ -234,10 +234,11 @@ compSetActionOption (CompOption *option,
CompAction *action = &option->value.action;
CompOptionValue v = *value;
- /* initiate, terminate and state should never be changed */
+ /* initiate, terminate, priv and state should never be changed */
v.action.initiate = action->initiate;
v.action.terminate = action->terminate;
v.action.state = action->state;
+ v.action.priv = action->priv;
if (action->type == v.action.type)
{
diff --git a/src/screen.cpp b/src/screen.cpp
index 80c61e4..51730a8 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -3080,12 +3080,20 @@ CompScreen::updateWorkarea ()
{
XRectangle workArea;
BoxRec box;
+ bool workAreaChanged = false;
for (unsigned int i = 0; i < priv->outputDevs.size (); i++)
{
+ XRectangle oldWorkArea = priv->outputDevs[i].workArea ();
+
priv->computeWorkareaForBox (&priv->outputDevs[i].region ()->extents,
&workArea);
- priv->outputDevs[i].setWorkArea (workArea);
+
+ if (memcmp (&workArea, &oldWorkArea, sizeof (XRectangle)))
+ {
+ workAreaChanged = true;
+ priv->outputDevs[i].setWorkArea (workArea);
+ }
}
box.x1 = 0;
@@ -3097,11 +3105,15 @@ CompScreen::updateWorkarea ()
if (memcmp (&workArea, &priv->workArea, sizeof (XRectangle)))
{
- CompWindow *w;
-
+ workAreaChanged = true;
priv->workArea = workArea;
priv->setDesktopHints ();
+ }
+
+ if (workAreaChanged)
+ {
+ CompWindow *w;
/* as work area changed, update all maximized windows on this
screen to snap to the new work area */