diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-05-11 19:44:33 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-05-11 19:44:33 +0000 |
| commit | 58cfbb7f8419e084af6b6b8b00c88ed270c29e88 (patch) | |
| tree | 6d786e87e1fb369d94522a69d0b3f2c694a8ed4e /openbox/window.c | |
| parent | 506122a110035f810c7d25225661973845a59c62 (diff) | |
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.
Diffstat (limited to 'openbox/window.c')
| -rw-r--r-- | openbox/window.c | 33 |
1 files changed, 33 insertions, 0 deletions
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; +} |
