summaryrefslogtreecommitdiff
path: root/openbox/window.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-16 18:10:10 +0000
committerDana Jansens <danakj@orodu.net>2003-05-16 18:10:10 +0000
commitb77e40e1c7710323aa59a778338d8e18b591f718 (patch)
tree48ae520439b10bffa5c63f3cc5a7230ccab06331 /openbox/window.c
parent6e42b65bda1706887f3b2a7f9d79ba20f7611a06 (diff)
rename "Slit" to "Dock".
add config options to the rc3 for the dock. create a window_map, add DockApps to the ObWindow types, use the window_map for translating windows into objects for event handling (only one lookup now) and remove the old maps (client_map, menu_map).
Diffstat (limited to 'openbox/window.c')
-rw-r--r--openbox/window.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/openbox/window.c b/openbox/window.c
index 11f5e46b..ed139b64 100644
--- a/openbox/window.c
+++ b/openbox/window.c
@@ -1,16 +1,33 @@
#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;
case Window_Internal:
@@ -25,8 +42,12 @@ 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;
case Window_Internal: