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/slit.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/slit.c')
| -rw-r--r-- | openbox/slit.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/openbox/slit.c b/openbox/slit.c index 3956e0ec..311cd6ac 100644 --- a/openbox/slit.c +++ b/openbox/slit.c @@ -1,38 +1,13 @@ #include "slit.h" #include "screen.h" #include "grab.h" -#include "timer.h" #include "openbox.h" #include "render/theme.h" -#include "render/render.h" #define SLIT_EVENT_MASK (ButtonPressMask | ButtonReleaseMask | \ EnterWindowMask | LeaveWindowMask) #define SLITAPP_EVENT_MASK (StructureNotifyMask) -struct Slit { - Window frame; - - /* user-requested position stuff */ - SlitPosition pos; - int gravity; - int user_x, user_y; - - /* actual position (when not auto-hidden) */ - int x, y; - int w, h; - - gboolean horz; - gboolean hide; - gboolean hidden; - - Appearance *a_frame; - - Timer *hide_timer; - - GList *slit_apps; -}; - GHashTable *slit_map = NULL; GHashTable *slit_app_map = NULL; @@ -53,12 +28,14 @@ void slit_startup() nslits = 1; slit = g_new0(struct Slit, nslits); + slit->obwin.type = Window_Slit; for (i = 0; i < nslits; ++i) { slit[i].horz = FALSE; slit[i].hide = FALSE; slit[i].hidden = TRUE; slit[i].pos = SlitPos_TopRight; + slit[i].layer = Layer_Top; attrib.event_mask = SLIT_EVENT_MASK; attrib.override_redirect = True; @@ -71,6 +48,8 @@ void slit_startup() XSetWindowBorderWidth(ob_display, slit[i].frame, theme_bwidth); g_hash_table_insert(slit_map, &slit[i].frame, &slit[i]); + stacking_add(&slit[i]); + stacking_raise(SLIT_AS_WINDOW(&slit[i])); } } @@ -82,6 +61,7 @@ void slit_shutdown() XDestroyWindow(ob_display, slit[i].frame); appearance_free(slit[i].a_frame); g_hash_table_remove(slit_map, &slit[i].frame); + stacking_remove(&slit[i]); } g_hash_table_destroy(slit_app_map); g_hash_table_destroy(slit_map); |
