don't move status bar offscreen (fails on Xinerama): unmap it instead

This commit is contained in:
Julien Danjou 2007-11-11 22:47:56 +01:00
parent 651dcc5c9e
commit 58391a84fa

View file

@ -247,6 +247,7 @@ updatebarpos(Display *disp, Statusbar statusbar)
XEvent ev; XEvent ev;
ScreenInfo *si = get_screen_info(disp, statusbar.screen, NULL); ScreenInfo *si = get_screen_info(disp, statusbar.screen, NULL);
XMapRaised(disp, statusbar.window);
switch (statusbar.position) switch (statusbar.position)
{ {
default: default:
@ -259,7 +260,7 @@ updatebarpos(Display *disp, Statusbar statusbar)
XMoveWindow(disp, statusbar.window, si[statusbar.screen].x_org, si[statusbar.screen].height - statusbar.height); XMoveWindow(disp, statusbar.window, si[statusbar.screen].x_org, si[statusbar.screen].height - statusbar.height);
break; break;
case BarOff: case BarOff:
XMoveWindow(disp, statusbar.window, si[statusbar.screen].x_org, si[statusbar.screen].y_org - statusbar.height); XUnmapWindow(disp, statusbar.window);
break; break;
} }
p_delete(&si); p_delete(&si);