From 58cfbb7f8419e084af6b6b8b00c88ed270c29e88 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 11 May 2003 19:44:33 +0000 Subject: Clients Menus and Slits are all 'ObWindow's now. Stacking is done with ObWindows. Slits add themselves to the stacking order, as do clients of course. Added some macros for adding/removing to the stacking order. --- openbox/window.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 openbox/window.c (limited to 'openbox/window.c') diff --git a/openbox/window.c b/openbox/window.c new file mode 100644 index 00000000..90de822f --- /dev/null +++ b/openbox/window.c @@ -0,0 +1,33 @@ +#include "window.h" +#include "menu.h" +#include "slit.h" +#include "client.h" +#include "frame.h" + +Window window_top(ObWindow *self) +{ + switch (self->type) { + case Window_Menu: + return ((Menu*)self)->frame; + case Window_Slit: + return ((Slit*)self)->frame; + case Window_Client: + return ((Client*)self)->frame->window; + } + g_assert_not_reached(); + return None; +} + +Window window_layer(ObWindow *self) +{ + switch (self->type) { + case Window_Menu: + return Layer_Internal; + case Window_Slit: + return ((Slit*)self)->layer; + case Window_Client: + return ((Client*)self)->layer; + } + g_assert_not_reached(); + return None; +} -- cgit v1.2.3