diff --git a/client.c b/client.c index 4f2b64f2..1b3e3904 100644 --- a/client.c +++ b/client.c @@ -284,13 +284,24 @@ client_raise(client_t *c) layer_t layer; statusbar_t *sb; int screen; - - config_win_vals[0] = XCB_NONE; - config_win_vals[1] = XCB_STACK_MODE_BELOW; + xembed_window_t *emwin; /* Push c on top of the stack. */ stack_client_push(c); + config_win_vals[0] = XCB_NONE; + + for(emwin = globalconf.embedded; emwin; emwin = emwin->next) + { + xcb_configure_window(globalconf.connection, + emwin->win, + XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, + config_win_vals); + config_win_vals[0] = emwin->win; + } + + config_win_vals[1] = XCB_STACK_MODE_BELOW; + for(screen = 0; screen < globalconf.screens_info->nscreen; screen++) for(sb = globalconf.screens[screen].statusbar; sb; sb = sb->next) if(sb->sw) diff --git a/widgets/systray.c b/widgets/systray.c index 5c37908d..cb0af42c 100644 --- a/widgets/systray.c +++ b/widgets/systray.c @@ -36,7 +36,7 @@ systray_draw(draw_context_t *ctx, { int i = 0, phys_screen; xembed_window_t *em; - uint32_t config_win_vals[6]; + uint32_t config_win_vals[4]; /* p is always a statusbar, titlebars are forbidden */ statusbar_t *sb = (statusbar_t *) p; @@ -61,10 +61,6 @@ systray_draw(draw_context_t *ctx, config_win_vals[2] = w->area.height; /* height */ config_win_vals[3] = w->area.height; - /* sibling */ - config_win_vals[4] = sb->sw->window; - /* stack mode */ - config_win_vals[5] = XCB_STACK_MODE_ABOVE; switch(sb->position) { @@ -82,9 +78,7 @@ systray_draw(draw_context_t *ctx, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH - | XCB_CONFIG_WINDOW_HEIGHT - | XCB_CONFIG_WINDOW_SIBLING - | XCB_CONFIG_WINDOW_STACK_MODE, + | XCB_CONFIG_WINDOW_HEIGHT, config_win_vals); config_win_vals[1] -= config_win_vals[3]; } @@ -105,9 +99,7 @@ systray_draw(draw_context_t *ctx, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH - | XCB_CONFIG_WINDOW_HEIGHT - | XCB_CONFIG_WINDOW_SIBLING - | XCB_CONFIG_WINDOW_STACK_MODE, + | XCB_CONFIG_WINDOW_HEIGHT, config_win_vals); config_win_vals[1] += config_win_vals[3]; } @@ -132,9 +124,7 @@ systray_draw(draw_context_t *ctx, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH - | XCB_CONFIG_WINDOW_HEIGHT - | XCB_CONFIG_WINDOW_SIBLING - | XCB_CONFIG_WINDOW_STACK_MODE, + | XCB_CONFIG_WINDOW_HEIGHT, config_win_vals); config_win_vals[0] += config_win_vals[2]; }