Menu: Fix screen limits (bug with multi-head)
This commit is contained in:
parent
c5c307deea
commit
b4c326ebaf
@ -127,8 +127,7 @@ infobar_init(void)
|
||||
barwin_refresh(infobar[sc].bar);
|
||||
|
||||
/* Default statustext is set here */
|
||||
for(i = 0; i < s; ++i)
|
||||
infobar[i].statustext = _strdup(WMFS_VERSION);
|
||||
infobar[sc].statustext = _strdup(WMFS_VERSION);
|
||||
|
||||
infobar_draw(sc);
|
||||
}
|
||||
@ -264,6 +263,7 @@ infobar_destroy(void)
|
||||
|
||||
barwin_delete_subwin(infobar[sc].tags_board);
|
||||
barwin_delete(infobar[sc].tags_board);
|
||||
barwin_delete(infobar[sc].selbar);
|
||||
barwin_delete_subwin(infobar[sc].bar);
|
||||
barwin_delete(infobar[sc].bar);
|
||||
}
|
||||
|
||||
@ -74,8 +74,10 @@ menu_draw(Menu menu, int x, int y)
|
||||
/* Frame barwin */
|
||||
screen_get_sel();
|
||||
|
||||
if((out = x + width - spgeo[selscreen].width) > 0) x -= out;
|
||||
if((out = y + height - spgeo[selscreen].height) > 0) y -= out;
|
||||
if((out = x + width - MAXW) > 0)
|
||||
x -= out;
|
||||
if((out = y + height - MAXH) > 0)
|
||||
y -= out;
|
||||
|
||||
frame = barwin_create(ROOT, x, y, width + SHADH, height + SHADH * 2,
|
||||
menu.colors.normal.bg, menu.colors.normal.fg, False, False, True);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user