[fusion-commits] Compiz mirror: Changes to 'master' (679f828dd76ed1e4ee499b6a0ba6431240649261)
compiz at server.opencompositing.org
compiz at server.opencompositing.org
Mon Mar 17 20:14:04 CET 2008
New commits:
commit 679f828dd76ed1e4ee499b6a0ba6431240649261
Author: Danny Baumann <dannybaumann at web.de>
Date: Mon Mar 17 20:12:54 2008 +0100
Always recalculate window type and actions when changing window state.
src/event.c | 10 ----------
src/window.c | 26 +++++++++++++-------------
2 files changed, 13 insertions(+), 23 deletions(-)
Modified: compiz/src/event.c
===================================================================
--- compiz/src/event.c
+++ compiz/src/event.c
@@ -1747,18 +1747,8 @@ handleEvent (CompDisplay *d,
CompWindowStateMaximizedVertMask))
stackingUpdateMode = CompStackingUpdateModeNormal;
- /* plugins that wrap into the state change notification
- probably are interested in an updated window type as
- well, so temporarily switch to the new window state for
- recalcWindowType and switch back afterwards so that
- changeWindowState picks up the correct old state */
- w->state = wState;
- recalcWindowType (w);
- w->state = wState ^ dState;
-
changeWindowState (w, wState);
- recalcWindowActions (w);
updateWindowAttributes (w, stackingUpdateMode);
}
}
Modified: compiz/src/window.c
===================================================================
--- compiz/src/window.c
+++ compiz/src/window.c
@@ -636,18 +636,22 @@ void
changeWindowState (CompWindow *w,
unsigned int newState)
{
- if (w->state != newState)
- {
- CompDisplay *d = w->screen->display;
- unsigned int oldState = w->state;
+ CompDisplay *d = w->screen->display;
+ unsigned int oldState;
- w->state = newState;
+ if (w->state == newState)
+ return;
- setWindowState (d, w->state, w->id);
+ oldState = w->state;
+ w->state = newState;
- (*w->screen->windowStateChangeNotify) (w, oldState);
- (*d->matchPropertyChanged) (d, w);
- }
+ recalcWindowType (w);
+ recalcWindowActions (w);
+
+ setWindowState (d, w->state, w->id);
+
+ (*w->screen->windowStateChangeNotify) (w, oldState);
+ (*d->matchPropertyChanged) (d, w);
}
static void
@@ -4643,11 +4647,7 @@ maximizeWindow (CompWindow *w,
state |= (w->state & ~MAXIMIZE_STATE);
- recalcWindowType (w);
- recalcWindowActions (w);
-
changeWindowState (w, state);
-
updateWindowAttributes (w, CompStackingUpdateModeNone);
}
More information about the commits
mailing list