diff --git a/statusbar.c b/statusbar.c index ccc70801..4f184139 100644 --- a/statusbar.c +++ b/statusbar.c @@ -86,7 +86,8 @@ statusbar_draw(statusbar_t *statusbar) for(em = globalconf.embedded; em; em = em->next) if(em->phys_screen == statusbar->phys_screen) { - if(config_win_vals[1] - config_win_vals[2] >= (uint32_t) statusbar->sw->geometry.y) + if(em->info.flags & XEMBED_MAPPED + && config_win_vals[1] - config_win_vals[2] >= (uint32_t) statusbar->sw->geometry.y) { xcb_map_window(globalconf.connection, em->win); xcb_configure_window(globalconf.connection, em->win, @@ -113,7 +114,8 @@ statusbar_draw(statusbar_t *statusbar) for(em = globalconf.embedded; em; em = em->next) if(em->phys_screen == statusbar->phys_screen) { - if(config_win_vals[1] + config_win_vals[3] <= (uint32_t) statusbar->sw->geometry.y + statusbar->ctx->width) + if(em->info.flags & XEMBED_MAPPED + && config_win_vals[1] + config_win_vals[3] <= (uint32_t) statusbar->sw->geometry.y + statusbar->ctx->width) { xcb_map_window(globalconf.connection, em->win); xcb_configure_window(globalconf.connection, em->win, @@ -142,7 +144,8 @@ statusbar_draw(statusbar_t *statusbar) if(em->phys_screen == statusbar->phys_screen) { /* if(x + width < systray.x + systray.width) */ - if(config_win_vals[0] + config_win_vals[2] <= (uint32_t) AREA_RIGHT(systray->area) + statusbar->sw->geometry.x) + if(em->info.flags & XEMBED_MAPPED + && config_win_vals[0] + config_win_vals[2] <= (uint32_t) AREA_RIGHT(systray->area) + statusbar->sw->geometry.x) { xcb_map_window(globalconf.connection, em->win); xcb_configure_window(globalconf.connection, em->win, diff --git a/structs.h b/structs.h index 1f110808..56556142 100644 --- a/structs.h +++ b/structs.h @@ -370,7 +370,6 @@ typedef struct struct { xcb_window_t window; - bool has_systray_widget; } systray; /** Focused client */ client_t *client_focus; diff --git a/systray.c b/systray.c index fd205a6f..834e55b5 100644 --- a/systray.c +++ b/systray.c @@ -120,19 +120,6 @@ systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i globalconf.screens[phys_screen].systray.window, MIN(XEMBED_VERSION, em->info.version)); - if(globalconf.screens[phys_screen].systray.has_systray_widget - && em->info.flags & XEMBED_MAPPED) - { - static const uint32_t config_win_vals[] = { XCB_STACK_MODE_ABOVE }; - xcb_map_window(globalconf.connection, em->win); - xcb_configure_window(globalconf.connection, - em->win, - XCB_CONFIG_WINDOW_STACK_MODE, - config_win_vals); - } - else - xcb_unmap_window(globalconf.connection, em->win); - for(i = 0; i < globalconf.screens_info->nscreen; i++) widget_invalidate_cache(i, WIDGET_CACHE_EMBEDDED); diff --git a/widgets/systray.c b/widgets/systray.c index 994f5402..f1ee169d 100644 --- a/widgets/systray.c +++ b/widgets/systray.c @@ -67,9 +67,6 @@ systray_draw(draw_context_t *ctx, w->widget->align); w->area.y = 0; - /* inform that there's a widget */ - globalconf.screens[sb->phys_screen].systray.has_systray_widget = true; - switch(sb->position) { case Right: