From efb6c1a65769430b6aa8f83507742544a2e57eb6 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Fri, 8 Nov 2002 10:43:54 +0000
Subject: [PATCH] Take into account implementation note on EWMH 1.2 regarding
 NET_STATE_HIDDEN

(Old svn revision: 10696)
---
 src/client.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/client.c b/src/client.c
index 2ff8162ec..8aabb40dc 100644
--- a/src/client.c
+++ b/src/client.c
@@ -151,7 +151,7 @@ void clientSetNetState(Client * c)
         DBG("clientSetNetState : fullscreen\n");
         data[i++] = net_wm_state_fullscreen;
     }
-    if((c->shaded) || (c->hidden))
+    if(c->hidden)
     {
         DBG("clientSetNetState : hidden\n");
         data[i++] = net_wm_state_hidden;
@@ -268,6 +268,14 @@ void clientUpdateNetState(Client * c, XClientMessageEvent * ev)
         }
     }
 
+#if 0
+    /* 
+     * EWMH V 1.2 Implementation note 
+     * if an Application asks to toggle _NET_WM_STATE_HIDDEN the Window Manager
+     * should probably just ignore the request, since _NET_WM_STATE_HIDDEN is a 
+     * function of some other aspect of the window such as minimization, rather 
+     * than an independent state.
+     */
     if((first == net_wm_state_hidden) || (second == net_wm_state_hidden))
     {
         if(((action == NET_WM_STATE_ADD) && !(c->hidden)) || ((action == NET_WM_STATE_REMOVE) && (c->hidden)) || (action == NET_WM_STATE_TOGGLE))
@@ -275,6 +283,7 @@ void clientUpdateNetState(Client * c, XClientMessageEvent * ev)
             clientHide(c, True);
         }
     }
+#endif
 
     if((first == net_wm_state_sticky) || (second == net_wm_state_sticky))
     {
-- 
GitLab