]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
give the dock a strut and use it
[chaz/openbox] / openbox / screen.c
index b43be922f88132264e990f6610f6280be21c3f4c..fd6244665cc99cc8827a90a3ff1745386dec543d 100644 (file)
@@ -1,5 +1,5 @@
 #include "openbox.h"
-#include "slit.h"
+#include "dock.h"
 #include "prop.h"
 #include "startup.h"
 #include "config.h"
@@ -219,7 +219,7 @@ void screen_resize(int w, int h)
     if (ob_state == State_Starting)
        return;
 
-    slit_configure_all();
+    dock_configure();
     screen_update_struts();
 
     for (it = client_list; it; it = it->next)
@@ -296,16 +296,20 @@ void screen_set_desktop(guint num)
 
     /* show windows from top to bottom */
     for (it = stacking_list; it != NULL; it = it->next) {
-        Client *c = it->data;
-       if (!c->frame->visible && client_should_show(c))
-            frame_show(c->frame);
+        if (WINDOW_IS_CLIENT(it->data)) {
+            Client *c = it->data;
+            if (!c->frame->visible && client_should_show(c))
+                frame_show(c->frame);
+        }
     }
 
     /* hide windows from bottom to top */
     for (it = g_list_last(stacking_list); it != NULL; it = it->prev) {
-        Client *c = it->data;
-       if (c->frame->visible && !client_should_show(c))
-            frame_hide(c->frame);
+        if (WINDOW_IS_CLIENT(it->data)) {
+            Client *c = it->data;
+            if (c->frame->visible && !client_should_show(c))
+                frame_hide(c->frame);
+        }
     }
 
     /* focus the last focused window on the desktop, and ignore enter events
@@ -418,16 +422,20 @@ void screen_show_desktop(gboolean show)
     if (show) {
        /* bottom to top */
        for (it = g_list_last(stacking_list); it != NULL; it = it->prev) {
-           Client *client = it->data;
-           if (client->frame->visible && !client_should_show(client))
-                frame_hide(client->frame);
+            if (WINDOW_IS_CLIENT(it->data)) {
+                Client *client = it->data;
+                if (client->frame->visible && !client_should_show(client))
+                    frame_hide(client->frame);
+            }
        }
     } else {
         /* top to bottom */
        for (it = stacking_list; it != NULL; it = it->next) {
-           Client *client = it->data;
-           if (!client->frame->visible && client_should_show(client))
-                frame_show(client->frame);
+            if (WINDOW_IS_CLIENT(it->data)) {
+                Client *client = it->data;
+                if (!client->frame->visible && client_should_show(client))
+                    frame_show(client->frame);
+            }
        }
     }
 
@@ -489,6 +497,10 @@ void screen_update_struts()
        /* apply to the 'all desktops' strut */
        STRUT_ADD(strut[screen_num_desktops], c->strut);
     }
+
+    for (i = 0; i < screen_num_desktops; ++i)
+        STRUT_ADD(strut[i], dock_strut);
+
     screen_update_area();
 }
 
This page took 0.021733 seconds and 4 git commands to generate.