client: set fullscreen/modal windows on top of statusbars

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-25 13:41:25 +02:00
parent 46aa0b55ac
commit 3e6dbd64ee
2 changed files with 25 additions and 2 deletions

View File

@ -287,6 +287,28 @@ client_raise(client_t *c)
config_win_vals[0] = XCB_NONE;
config_win_vals[1] = XCB_STACK_MODE_BELOW;
/* first stack fullscreen and modal windows */
for(layer = LAYER_OUTOFSPACE - 1; layer >= LAYER_FULLSCREEN; layer--)
for(node = globalconf.stack; node; node = node->next)
if(node->client->layer == layer)
{
if(node->client->titlebar
&& node->client->titlebar->sw
&& node->client->titlebar->position)
{
xcb_configure_window(globalconf.connection,
node->client->titlebar->sw->window,
XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE,
config_win_vals);
config_win_vals[0] = node->client->titlebar->sw->window;
}
xcb_configure_window(globalconf.connection, node->client->win,
XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE,
config_win_vals);
config_win_vals[0] = node->client->win;
}
/* then stack systray windows */
for(emwin = globalconf.embedded; emwin; emwin = emwin->next)
{
xcb_configure_window(globalconf.connection,
@ -296,6 +318,7 @@ client_raise(client_t *c)
config_win_vals[0] = emwin->win;
}
/* then stack statusbar window */
for(screen = 0; screen < globalconf.screens_info->nscreen; screen++)
for(sb = globalconf.screens[screen].statusbar; sb; sb = sb->next)
if(sb->sw)
@ -307,7 +330,8 @@ client_raise(client_t *c)
config_win_vals[0] = sb->sw->window;
}
for(layer = LAYER_OUTOFSPACE - 1; layer >= LAYER_DESKTOP; layer--)
/* finally stack everything else */
for(layer = LAYER_FULLSCREEN - 1; layer >= LAYER_DESKTOP; layer--)
for(node = globalconf.stack; node; node = node->next)
if(node->client->layer == layer)
{

1
ewmh.c
View File

@ -414,7 +414,6 @@ ewmh_process_state_atom(client_t *c, xcb_atom_t state, int set)
}
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
client_resize(c, geometry, false);
xcb_configure_window(globalconf.connection, c->win, XCB_CONFIG_WINDOW_STACK_MODE, &raise_window_val);
}
else if(state == net_wm_state_above)
{