]> Dogcows Code - chaz/openbox/blobdiff - openbox/window.c
prefix and capitalize some more constants/enums in client.h (Function -> ObFunctions...
[chaz/openbox] / openbox / window.c
index 11f5e46b56e9b1e81cb94f405bdf1bd9047fcdad..15cebcd746e430e3721e2f546af50d2a0aeed86d 100644 (file)
@@ -1,18 +1,35 @@
 #include "window.h"
 #include "menu.h"
-#include "slit.h"
+#include "config.h"
+#include "dock.h"
 #include "client.h"
 #include "frame.h"
 
+GHashTable *window_map;
+
+void window_startup()
+{
+    window_map = g_hash_table_new(g_int_hash, g_int_equal);
+}
+
+void window_shutdown()
+{
+    g_hash_table_destroy(window_map);
+}
+
 Window window_top(ObWindow *self)
 {
     switch (self->type) {
     case Window_Menu:
         return ((Menu*)self)->frame;
-    case Window_Slit:
-        return ((Slit*)self)->frame;
+    case Window_Dock:
+        return ((Dock*)self)->frame;
+    case Window_DockApp:
+        /* not to be used for stacking */
+        g_assert_not_reached();
+        break;
     case Window_Client:
-        return ((Client*)self)->frame->window;
+        return ((ObClient*)self)->frame->window;
     case Window_Internal:
         return ((InternalWindow*)self)->win;
     }
@@ -25,10 +42,14 @@ Window window_layer(ObWindow *self)
     switch (self->type) {
     case Window_Menu:
         return Layer_Internal;
-    case Window_Slit:
-        return ((Slit*)self)->layer;
+    case Window_Dock:
+        return config_dock_layer;
+    case Window_DockApp:
+        /* not to be used for stacking */
+        g_assert_not_reached();
+        break;
     case Window_Client:
-        return ((Client*)self)->layer;
+        return ((ObClient*)self)->layer;
     case Window_Internal:
         return Layer_Internal;
     }
This page took 0.026719 seconds and 4 git commands to generate.