]> Dogcows Code - chaz/openbox/blobdiff - openbox/stacking.c
replace the focus_backup with the screen_support_win, we dont need 2 offscreen windows.
[chaz/openbox] / openbox / stacking.c
index 6316049ab46f30bcf9083449534d474a3a5ba61c..c9dcb0b738a75dced08456ea6e368ab8e31dfed8 100644 (file)
@@ -1,5 +1,6 @@
 #include "openbox.h"
 #include "prop.h"
+#include "screen.h"
 #include "focus.h"
 #include "client.h"
 #include "group.h"
@@ -18,7 +19,7 @@ void stacking_set_list()
     /* on shutdown, don't update the properties, so that we can read it back
        in on startup and re-stack the windows as they were before we shut down
     */
-    if (ob_state == State_Exiting) return;
+    if (ob_state == OB_STATE_EXITING) return;
 
     /* create an array of the window ids (from bottom to top,
        reverse order!) */
@@ -53,7 +54,7 @@ static void do_restack(GList *wins, GList *before)
     win = g_new(Window, g_list_length(wins) + 1);
 
     if (before == stacking_list)
-        win[0] = focus_backup;
+        win[0] = screen_support_win;
     else if (!before)
         win[0] = window_top(g_list_last(stacking_list)->data);
     else
@@ -82,22 +83,22 @@ static void do_restack(GList *wins, GList *before)
 static void do_raise(GList *wins)
 {
     GList *it;
-    GList *layer[NUM_STACKLAYER] = {NULL};
+    GList *layer[OB_NUM_STACKING_LAYERS] = {NULL};
     int i;
 
     for (it = wins; it; it = g_list_next(it)) {
-        StackLayer l;
+        ObStackingLayer l;
 
         l = window_layer(it->data);
         layer[l] = g_list_append(layer[l], it->data);
     }
 
     it = stacking_list;
-    for (i = NUM_STACKLAYER - 1; i >= 0; --i) {
+    for (i = OB_NUM_STACKING_LAYERS - 1; i >= 0; --i) {
         if (layer[i]) {
             for (; it; it = g_list_next(it)) {
                 /* look for the top of the layer */
-                if (window_layer(it->data) <= (StackLayer) i)
+                if (window_layer(it->data) <= (ObStackingLayer) i)
                     break;
             }
             do_restack(layer[i], it);
@@ -109,22 +110,22 @@ static void do_raise(GList *wins)
 static void do_lower(GList *wins)
 {
     GList *it;
-    GList *layer[NUM_STACKLAYER] = {NULL};
+    GList *layer[OB_NUM_STACKING_LAYERS] = {NULL};
     int i;
 
     for (it = wins; it; it = g_list_next(it)) {
-        StackLayer l;
+        ObStackingLayer l;
 
         l = window_layer(it->data);
         layer[l] = g_list_append(layer[l], it->data);
     }
 
     it = stacking_list;
-    for (i = NUM_STACKLAYER - 1; i >= 0; --i) {
+    for (i = OB_NUM_STACKING_LAYERS - 1; i >= 0; --i) {
         if (layer[i]) {
             for (; it; it = g_list_next(it)) {
                 /* look for the top of the next layer down */
-                if (window_layer(it->data) < (StackLayer) i)
+                if (window_layer(it->data) < (ObStackingLayer) i)
                     break;
             }
             do_restack(layer[i], it);
@@ -133,7 +134,7 @@ static void do_lower(GList *wins)
     }
 }
 
-static GList *pick_windows(Client *top, Client *selected, gboolean raise)
+static GList *pick_windows(ObClient *top, ObClient *selected, gboolean raise)
 {
     GList *ret = NULL;
     GList *it, *next, *prev;
@@ -154,7 +155,7 @@ static GList *pick_windows(Client *top, Client *selected, gboolean raise)
         next = g_list_next(it);
 
         if ((sit = g_slist_find(top->transients, it->data))) {
-            Client *c = sit->data;
+            ObClient *c = sit->data;
 
             ++i;
 
@@ -196,7 +197,7 @@ static GList *pick_windows(Client *top, Client *selected, gboolean raise)
     return ret;
 }
 
-static GList *pick_group_windows(Client *top, Client *selected, gboolean raise)
+static GList *pick_group_windows(ObClient *top, ObClient *selected, gboolean raise)
 {
     GList *ret = NULL;
     GList *it, *next, *prev;
@@ -229,8 +230,8 @@ void stacking_raise(ObWindow *window)
     GList *wins;
 
     if (WINDOW_IS_CLIENT(window)) {
-        Client *c;
-        Client *selected;
+        ObClient *c;
+        ObClient *selected;
         selected = WINDOW_AS_CLIENT(window);
         c = client_search_top_transient(selected);
         wins = pick_windows(c, selected, TRUE);
@@ -248,8 +249,8 @@ void stacking_lower(ObWindow *window)
     GList *wins;
 
     if (WINDOW_IS_CLIENT(window)) {
-        Client *c;
-        Client *selected;
+        ObClient *c;
+        ObClient *selected;
         selected = WINDOW_AS_CLIENT(window);
         c = client_search_top_transient(selected);
         wins = pick_windows(c, selected, FALSE);
@@ -264,10 +265,10 @@ void stacking_lower(ObWindow *window)
 
 void stacking_add(ObWindow *win)
 {
-    StackLayer l;
+    ObStackingLayer l;
     GList *wins;
 
-    g_assert(focus_backup != None); /* make sure I dont break this in the
+    g_assert(screen_support_win != None); /* make sure I dont break this in the
                                        future */
 
     l = window_layer(win);
@@ -279,8 +280,8 @@ void stacking_add(ObWindow *win)
 
 void stacking_add_nonintrusive(ObWindow *win)
 {
-    Client *client;
-    Client *parent = NULL;
+    ObClient *client;
+    ObClient *parent = NULL;
     GList *it_before = NULL;
 
     if (!WINDOW_IS_CLIENT(win)) {
@@ -292,7 +293,7 @@ void stacking_add_nonintrusive(ObWindow *win)
 
     /* insert above its highest parent */
     if (client->transient_for) {
-        if (client->transient_for != TRAN_GROUP) {
+        if (client->transient_for != OB_TRAN_GROUP) {
             parent = client->transient_for;
         } else {
             GSList *sit;
@@ -303,7 +304,7 @@ void stacking_add_nonintrusive(ObWindow *win)
                     if ((sit = g_slist_find(client->group->members, it->data)))
                 for (sit = client->group->members; !parent && sit;
                      sit = sit->next) {
-                    Client *c = sit->data;
+                    ObClient *c = sit->data;
                     /* checking transient_for prevents infinate loops! */
                     if (sit->data == it->data && !c->transient_for)
                         parent = it->data;
This page took 0.025288 seconds and 4 git commands to generate.