diff --git a/client.c b/client.c index 5cf38d1f..6b13be65 100644 --- a/client.c +++ b/client.c @@ -216,7 +216,7 @@ client_focus(Client *c, int screen, Bool raise) if(c->isfloating || curlay->arrange == layout_floating) { XRaiseWindow(globalconf.display, c->win); - if(c->titlebar.position) + if(c->titlebar.position && c->titlebar.sw) XRaiseWindow(globalconf.display, c->titlebar.sw->window); } else @@ -227,7 +227,7 @@ client_focus(Client *c, int screen, Bool raise) for(client = globalconf.clients; client; client = client->next) if(client != c && client_isvisible(client, c->screen) && client->isfloating) { - if(client->titlebar.position) + if(client->titlebar.position && client->titlebar.sw) { XConfigureWindow(globalconf.display, client->titlebar.sw->window, CWSibling | CWStackMode, &wc); @@ -236,7 +236,7 @@ client_focus(Client *c, int screen, Bool raise) XConfigureWindow(globalconf.display, client->win, CWSibling | CWStackMode, &wc); wc.sibling = client->win; } - if(c->titlebar.position) + if(c->titlebar.position && c->titlebar.sw) { XConfigureWindow(globalconf.display, c->titlebar.sw->window, CWSibling | CWStackMode, &wc); @@ -247,7 +247,7 @@ client_focus(Client *c, int screen, Bool raise) for(client = globalconf.clients; client; client = client->next) if(client != c && IS_TILED(client, c->screen)) { - if(client->titlebar.position) + if(client->titlebar.position && client->titlebar.sw) { XConfigureWindow(globalconf.display, client->titlebar.sw->window, CWSibling | CWStackMode, &wc);