Signed-off-by: Julien Danjou <[email protected]>
---
 layout.c   |    9 ++++-----
 titlebar.h |   13 +++++++++++++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/layout.c b/layout.c
index 4ba1650..7bbfe5f 100644
--- a/layout.c
+++ b/layout.c
@@ -47,16 +47,15 @@ arrange(int screen)
                                      select_input_val);
 
         if(client_isvisible(c, screen))
-        {
             client_unban(c);
-            titlebar_unban(c->titlebar);
-        }
         /* we don't touch other screens windows */
         else if(c->screen == screen)
-        {
             client_ban(c);
+
+        if(titlebar_isvisible(c, screen))
+            titlebar_unban(c->titlebar);
+        else if(c->screen == screen)
             titlebar_ban(c->titlebar);
-        }
     }
 
     /* Reset status before calling arrange hook.
diff --git a/titlebar.h b/titlebar.h
index 488e573..dde2083 100644
--- a/titlebar.h
+++ b/titlebar.h
@@ -23,6 +23,7 @@
 #define AWESOME_TITLEBAR_H
 
 #include "wibox.h"
+#include "client.h"
 
 client_t * client_getbytitlebar(wibox_t *);
 client_t * client_getbytitlebarwin(xcb_window_t);
@@ -36,6 +37,18 @@ void titlebar_unban(wibox_t *);
 
 int luaA_titlebar_newindex(lua_State *, wibox_t *, awesome_token_t);
 
+static inline bool
+titlebar_isvisible(client_t *c, int screen)
+{
+    if(client_isvisible(c, screen))
+    {
+        if(c->isfullscreen)
+            return false;
+        return true;
+    }
+    return false;
+}
+
 /** Add the titlebar geometry and border to a geometry.
  * \param t The titlebar
  * \param border The client border size.
-- 
1.6.2.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to