Fix errors with windows without titlebar

This commit is contained in:
Julien Danjou 2008-03-14 18:20:00 +01:00
parent 6818a692d2
commit b51e352ed8
2 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ client_ban(Client *c)
client_unfocus(c); client_unfocus(c);
XUnmapWindow(globalconf.display, c->win); XUnmapWindow(globalconf.display, c->win);
window_setstate(c->win, IconicState); window_setstate(c->win, IconicState);
if(c->titlebar.position) if(c->titlebar.sw)
XUnmapWindow(globalconf.display, c->titlebar.sw->window); XUnmapWindow(globalconf.display, c->titlebar.sw->window);
} }
@ -692,7 +692,7 @@ client_unban(Client *c)
{ {
XMapWindow(globalconf.display, c->win); XMapWindow(globalconf.display, c->win);
window_setstate(c->win, NormalState); window_setstate(c->win, NormalState);
if(c->titlebar.position) if(c->titlebar.sw && c->titlebar.position != Off)
XMapWindow(globalconf.display, c->titlebar.sw->window); XMapWindow(globalconf.display, c->titlebar.sw->window);
} }

View File

@ -308,7 +308,7 @@ event_handle_expose(XEvent *e)
} }
for(c = globalconf.clients; c; c = c->next) for(c = globalconf.clients; c; c = c->next)
if(c->titlebar.position && c->titlebar.sw->window == ev->window) if(c->titlebar.sw && c->titlebar.sw->window == ev->window)
{ {
simplewindow_refresh_drawable(c->titlebar.sw, get_phys_screen(c->screen)); simplewindow_refresh_drawable(c->titlebar.sw, get_phys_screen(c->screen));
return; return;