systray: remove has_systray

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-05 17:03:14 +02:00
parent 254a39b6d3
commit 189157843a
4 changed files with 6 additions and 20 deletions

View File

@ -86,7 +86,8 @@ statusbar_draw(statusbar_t *statusbar)
for(em = globalconf.embedded; em; em = em->next) for(em = globalconf.embedded; em; em = em->next)
if(em->phys_screen == statusbar->phys_screen) 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_map_window(globalconf.connection, em->win);
xcb_configure_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) for(em = globalconf.embedded; em; em = em->next)
if(em->phys_screen == statusbar->phys_screen) 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_map_window(globalconf.connection, em->win);
xcb_configure_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(em->phys_screen == statusbar->phys_screen)
{ {
/* if(x + width < systray.x + systray.width) */ /* 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_map_window(globalconf.connection, em->win);
xcb_configure_window(globalconf.connection, em->win, xcb_configure_window(globalconf.connection, em->win,

View File

@ -370,7 +370,6 @@ typedef struct
struct struct
{ {
xcb_window_t window; xcb_window_t window;
bool has_systray_widget;
} systray; } systray;
/** Focused client */ /** Focused client */
client_t *client_focus; client_t *client_focus;

View File

@ -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, globalconf.screens[phys_screen].systray.window,
MIN(XEMBED_VERSION, em->info.version)); 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++) for(i = 0; i < globalconf.screens_info->nscreen; i++)
widget_invalidate_cache(i, WIDGET_CACHE_EMBEDDED); widget_invalidate_cache(i, WIDGET_CACHE_EMBEDDED);

View File

@ -67,9 +67,6 @@ systray_draw(draw_context_t *ctx,
w->widget->align); w->widget->align);
w->area.y = 0; w->area.y = 0;
/* inform that there's a widget */
globalconf.screens[sb->phys_screen].systray.has_systray_widget = true;
switch(sb->position) switch(sb->position)
{ {
case Right: case Right: