[compiz] First attempt to submit a patch...

Quinn Storm livinglatexkali at gmail.com
Wed Apr 4 06:57:20 PDT 2007


I'm a bit new to git and having trouble figuring out just how to get the git 
format-patch into kmail properly, so I'm going to attach the text to this 
message.  If there is a better way, please let me know.
-------------- next part --------------
From 222d30906a8ac2a73ce8afea1f7899e092831edd Mon Sep 17 00:00:00 2001
From: Quinn <quinn at beryl-project.org>
Date: Wed, 4 Apr 2007 09:45:17 -0400
Subject: [PATCH] Fix reaction to set of DemandsAttention
Without this patch, on setting of demands-attention, a non-topmost window would get raised, which is not desired behaviour.
---
 src/event.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/event.c b/src/event.c
index eccab6d..a719b0f 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1643,7 +1643,10 @@ handleEvent (CompDisplay *d,
 
 		wState = constrainWindowState (wState, w->actions);
 
-		if (wState != w->state)
+		//must ignore DemandsAttention state here otherwise
+		//it will do the wrong thing and raise but not activate
+		if ((wState & ~CompWindowStateDemandsAttentionMask)
+			   	!= (w->state & ~CompWindowStateDemandsAttentionMask))
 		{
 		    w->state = wState;
 
@@ -1654,6 +1657,10 @@ handleEvent (CompDisplay *d,
 
 		    updateWindowAttributes (w, FALSE);
 		}
+		else
+		{
+			changeWindowState (w, w->state);
+		}
 	    }
 	}
 	else if (event->xclient.message_type == d->wmProtocolsAtom)
-- 
1.4.4.2



More information about the compiz mailing list