From b51e352ed8ef26653312f1c0369f29e2e0b904d4 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 14 Mar 2008 18:20:00 +0100 Subject: [PATCH] Fix errors with windows without titlebar --- client.c | 4 ++-- event.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client.c b/client.c index c47c7203..26f406ad 100644 --- a/client.c +++ b/client.c @@ -203,7 +203,7 @@ client_ban(Client *c) client_unfocus(c); XUnmapWindow(globalconf.display, c->win); window_setstate(c->win, IconicState); - if(c->titlebar.position) + if(c->titlebar.sw) XUnmapWindow(globalconf.display, c->titlebar.sw->window); } @@ -692,7 +692,7 @@ client_unban(Client *c) { XMapWindow(globalconf.display, c->win); window_setstate(c->win, NormalState); - if(c->titlebar.position) + if(c->titlebar.sw && c->titlebar.position != Off) XMapWindow(globalconf.display, c->titlebar.sw->window); } diff --git a/event.c b/event.c index 748ab309..36ad379f 100644 --- a/event.c +++ b/event.c @@ -308,7 +308,7 @@ event_handle_expose(XEvent *e) } 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)); return;