X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fstacking.c;h=6ff01721061fbc63c3aa7e513d5f2ad049822619;hb=142c14fcc89ae2c056d7aed8b662754b245e97e3;hp=b7e0fd9085f43e859bc857dbc450bed05eb8b3de;hpb=eb5f930ae7d9bf94cbc8a24381f0efa2b376ef3c;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index b7e0fd90..6ff01721 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -8,6 +8,24 @@ GList *stacking_list = NULL; +static Window top_window = None; + +void stacking_startup() +{ + XSetWindowAttributes attrib; + attrib.override_redirect = TRUE; + top_window = XCreateWindow(ob_display, ob_root, + -100, -100, 1, 1, 0, + CopyFromParent, InputOutput, CopyFromParent, + CWOverrideRedirect, &attrib); + XMapWindow(ob_display, top_window); +} + +void stacking_shutdown() +{ + XDestroyWindow(ob_display, top_window); +} + void stacking_set_list() { Window *windows, *win_it; @@ -30,7 +48,8 @@ void stacking_set_list() } else windows = NULL; - PROP_SET32A(ob_root, net_client_list_stacking, window, windows, size); + PROP_SETA32(ob_root, net_client_list_stacking, window, + (guint32*)windows, size); if (windows) g_free(windows); @@ -183,3 +202,12 @@ void stacking_lower(Client *client) stacking_set_list(); } +void stacking_raise_internal(Window win) +{ + Window wins[2]; /* only ever restack 2 windows. */ + + wins[0] = top_window; + wins[1] = win; + + XRestackWindows(ob_display, wins, 2); +}