Check for sw also before restacking titlebars

This commit is contained in:
Julien Danjou 2008-03-16 11:18:11 +01:00
parent c99bc4dc1d
commit dbe2052320
1 changed files with 4 additions and 4 deletions

View File

@ -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);