]> Dogcows Code - chaz/openbox/blobdiff - openbox/window.c
prefix and capitalize ObMenu ObMenuEntry and ObMenuEntryRenderType
[chaz/openbox] / openbox / window.c
index 11f5e46b56e9b1e81cb94f405bdf1bd9047fcdad..521d9e2d4cd1908cb9bca909a07f5a1f7b0cdf2a 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;
+        return ((ObMenu*)self)->frame;
+    case Window_Dock:
+        return ((ObDock*)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;
     }
@@ -24,13 +41,17 @@ Window window_layer(ObWindow *self)
 {
     switch (self->type) {
     case Window_Menu:
-        return Layer_Internal;
-    case Window_Slit:
-        return ((Slit*)self)->layer;
+        return OB_STACKING_LAYER_INTERNAL;
+    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;
+        return OB_STACKING_LAYER_INTERNAL;
     }
     g_assert_not_reached();
     return None;
This page took 0.024923 seconds and 4 git commands to generate.