mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
systray: handle window that are on phys_screen only
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f418cb0c2e
commit
72957f999a
1 changed files with 51 additions and 41 deletions
|
@ -43,6 +43,7 @@ systray_draw(draw_context_t *ctx,
|
|||
phys_screen = screen_virttophys(screen);
|
||||
|
||||
for(em = globalconf.embedded; em; em = em->next)
|
||||
if(em->phys_screen == phys_screen)
|
||||
i++;
|
||||
|
||||
if(ctx->width - used > 0)
|
||||
|
@ -72,6 +73,8 @@ systray_draw(draw_context_t *ctx,
|
|||
config_win_vals[1] = sb->sw->geometry.y + sb->sw->geometry.height
|
||||
- w->area.x - config_win_vals[3];
|
||||
for(em = globalconf.embedded; em; em = em->next)
|
||||
if(em->phys_screen == phys_screen)
|
||||
{
|
||||
if(config_win_vals[1] - config_win_vals[2] >= (uint32_t) sb->sw->geometry.y)
|
||||
{
|
||||
xcb_map_window(globalconf.connection, em->win);
|
||||
|
@ -87,11 +90,14 @@ systray_draw(draw_context_t *ctx,
|
|||
}
|
||||
else
|
||||
xcb_unmap_window(globalconf.connection, em->win);
|
||||
}
|
||||
break;
|
||||
case Right:
|
||||
config_win_vals[0] = sb->sw->geometry.x - w->area.y;
|
||||
config_win_vals[1] = sb->sw->geometry.y + w->area.x;
|
||||
for(em = globalconf.embedded; em; em = em->next)
|
||||
if(em->phys_screen == phys_screen)
|
||||
{
|
||||
if(config_win_vals[1] + config_win_vals[3] <= (uint32_t) sb->sw->geometry.y + ctx->width)
|
||||
{
|
||||
xcb_map_window(globalconf.connection, em->win);
|
||||
|
@ -107,6 +113,7 @@ systray_draw(draw_context_t *ctx,
|
|||
}
|
||||
else
|
||||
xcb_unmap_window(globalconf.connection, em->win);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* x */
|
||||
|
@ -115,6 +122,8 @@ systray_draw(draw_context_t *ctx,
|
|||
config_win_vals[1] = sb->sw->geometry.y + w->area.y;
|
||||
|
||||
for(em = globalconf.embedded; em; em = em->next)
|
||||
if(em->phys_screen == phys_screen)
|
||||
{
|
||||
/* if(x + width < systray.x + systray.width) */
|
||||
if(config_win_vals[0] + config_win_vals[2] <= (uint32_t) AREA_RIGHT(w->area) + sb->sw->geometry.x)
|
||||
{
|
||||
|
@ -131,6 +140,7 @@ systray_draw(draw_context_t *ctx,
|
|||
}
|
||||
else
|
||||
xcb_unmap_window(globalconf.connection, em->win);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue