From 95b307fcb00170e61640995e0172d27858e24ba3 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Fri, 17 May 2002 13:11:44 +0000
Subject: [PATCH] Improve focus switching in case of unmap/destroy notify

(Old svn revision: 10320)
---
 src/client.c | 10 +++++++++-
 src/client.h |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/client.c b/src/client.c
index 2b18c7bb1..d9816e715 100644
--- a/src/client.c
+++ b/src/client.c
@@ -2604,7 +2604,15 @@ Client *clientGetNext(Client * c, int mask)
             {
 	        okay = False;
             }
-	    if((getWMState(dpy, c2->window) == IconicState) && !(mask & INCLUDE_HIDDEN))
+	    if((c2->hidden) && !(mask & INCLUDE_HIDDEN))
+            {
+                okay = False;
+            }
+	    if((c2->skip_pager) && !(mask & INCLUDE_SKIP_PAGER))
+            {
+                okay = False;
+            }
+	    if((c2->skip_taskbar) && !(mask & INCLUDE_SKIP_TASKBAR))
             {
                 okay = False;
             }
diff --git a/src/client.h b/src/client.h
index 040ca6fe2..8da93dd91 100644
--- a/src/client.h
+++ b/src/client.h
@@ -56,6 +56,8 @@
 #define INCLUDE_HIDDEN			(1<<0)
 #define INCLUDE_SKIP_FOCUS		(1<<1)
 #define INCLUDE_ALL_WORKSPACES		(1<<2)
+#define INCLUDE_SKIP_PAGER		(1<<3)
+#define INCLUDE_SKIP_TASKBAR		(1<<4)
 
 #define ACTIVE				0
 #define INACTIVE			1
-- 
GitLab