[fusion-commits] Compiz mirror: Changes to 'master' (0dea3f7f5f145d8a1251b76dd44b171972d1fc8b)

compiz at server.opencompositing.org compiz at server.opencompositing.org
Mon Mar 17 18:13:04 CET 2008


New commits:
commit 0dea3f7f5f145d8a1251b76dd44b171972d1fc8b
Author: Danny Baumann <dannybaumann at web.de>
Date:   Mon Mar 17 18:11:36 2008 +0100

    Recalculate window type before updating window state.
    When not doing that, certain plugins that rely on w->type being correct in the state change notification may behave incorrectly.


 src/event.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


Modified: compiz/src/event.c
===================================================================
--- compiz/src/event.c
+++ compiz/src/event.c
@@ -1747,11 +1747,18 @@ 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);
 
-		    recalcWindowType (w);
 		    recalcWindowActions (w);
-
 		    updateWindowAttributes (w, stackingUpdateMode);
 		}
 	    }


More information about the commits mailing list