---
 client.c              |   36 ++++++++++++++++++++++++++++++++++++
 common/tokenize.gperf |    2 ++
 2 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/client.c b/client.c
index 92c64d5..51bebd9 100644
--- a/client.c
+++ b/client.c
@@ -792,6 +792,10 @@ client_setfullscreen(client_t *c, bool s)
             /* remove any max state */
             client_setmaxhoriz(c, false);
             client_setmaxvert(c, false);
+            /* You can only be part of one of the special layers. */
+            client_setbelow(c, false);
+            client_setabove(c, false);
+            client_setontop(c, false);
 
             geometry = screen_area_get(c->screen, NULL, NULL, false);
             c->geometries.fullscreen = c->geometry;
@@ -904,6 +908,12 @@ client_setabove(client_t *c, bool s)
 {
     if(c->isabove != s)
     {
+        /* You can only be part of one of the special layers. */
+        if(s) {
+            client_setbelow(c, false);
+            client_setontop(c, false);
+            client_setfullscreen(c, false);
+        }
         c->isabove = s;
         client_stack();
         ewmh_client_update_hints(c);
@@ -921,6 +931,12 @@ client_setbelow(client_t *c, bool s)
 {
     if(c->isbelow != s)
     {
+        /* You can only be part of one of the special layers. */
+        if(s) {
+            client_setabove(c, false);
+            client_setontop(c, false);
+            client_setfullscreen(c, false);
+        }
         c->isbelow = s;
         client_stack();
         ewmh_client_update_hints(c);
@@ -955,6 +971,12 @@ client_setontop(client_t *c, bool s)
 {
     if(c->isontop != s)
     {
+        /* You can only be part of one of the special layers. */
+        if(s) {
+            client_setabove(c, false);
+            client_setbelow(c, false);
+            client_setfullscreen(c, false);
+        }
         c->isontop = s;
         client_stack();
         /* execute hook */
@@ -1537,6 +1559,12 @@ luaA_client_newindex(lua_State *L)
       case A_TK_ONTOP:
         client_setontop(*c, luaA_checkboolean(L, 3));
         break;
+      case A_TK_ABOVE:
+        client_setabove(*c, luaA_checkboolean(L, 3));
+        break;
+      case A_TK_BELOW:
+        client_setbelow(*c, luaA_checkboolean(L, 3));
+        break;
       case A_TK_BORDER_COLOR:
         if((buf = luaL_checklstring(L, 3, &len))
            && xcolor_init_reply(xcolor_init_unchecked(&(*c)->border_color, 
buf, len)))
@@ -1587,6 +1615,8 @@ luaA_client_newindex(lua_State *L)
  * \lfield focus The focused client.
  * \lfield opacity The client opacity between 0 and 1.
  * \lfield ontop The client is on top of every other windows.
+ * \lfield above The client is above normal windows.
+ * \lfield below The client is below normal windows.
  * \lfield fullscreen The client is fullscreen or not.
  * \lfield maximized_horizontal The client is maximized horizontally or not.
  * \lfield maximized_vertical The client is maximized vertically or not.
@@ -1752,6 +1782,12 @@ luaA_client_index(lua_State *L)
       case A_TK_ONTOP:
         lua_pushboolean(L, (*c)->isontop);
         break;
+      case A_TK_ABOVE:
+        lua_pushboolean(L, (*c)->isabove);
+        break;
+      case A_TK_BELOW:
+        lua_pushboolean(L, (*c)->isbelow);
+        break;
       case A_TK_STICKY:
         lua_pushboolean(L, (*c)->issticky);
         break;
diff --git a/common/tokenize.gperf b/common/tokenize.gperf
index 6dfcc4b..bd843cd 100644
--- a/common/tokenize.gperf
+++ b/common/tokenize.gperf
@@ -1,7 +1,9 @@
+above
 align
 alpha
 bar_data_add
 bar_properties_set
+below
 bg
 bg_align
 bg_image
-- 
1.6.1.2


-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to