simplify restack()

This commit is contained in:
Julien Danjou 2008-01-20 16:31:04 +01:00
parent 47a5eac10c
commit 7d21336048
1 changed files with 3 additions and 6 deletions

View File

@ -138,7 +138,7 @@ restack(int screen)
{ {
Client *c, *sel = globalconf.focus->client; Client *c, *sel = globalconf.focus->client;
XWindowChanges wc; XWindowChanges wc;
Tag **curtags; Layout *curlay = get_current_layout(screen);
if(!sel) if(!sel)
return; return;
@ -147,11 +147,9 @@ restack(int screen)
XRaiseWindow(globalconf.display, sel->win); XRaiseWindow(globalconf.display, sel->win);
else else
{ {
curtags = get_current_tags(screen); if(sel->isfloating || curlay->arrange == layout_floating)
if(sel->isfloating ||
curtags[0]->layout->arrange == layout_floating)
XRaiseWindow(globalconf.display, sel->win); XRaiseWindow(globalconf.display, sel->win);
if(!(curtags[0]->layout->arrange == layout_floating)) if(curlay->arrange != layout_floating)
{ {
wc.stack_mode = Below; wc.stack_mode = Below;
if(!sel->isfloating) if(!sel->isfloating)
@ -163,7 +161,6 @@ restack(int screen)
XConfigureWindow(globalconf.display, c->win, CWStackMode, &wc); XConfigureWindow(globalconf.display, c->win, CWStackMode, &wc);
} }
} }
p_delete(&curtags);
} }
if(globalconf.screens[screen].focus_move_pointer) if(globalconf.screens[screen].focus_move_pointer)
XWarpPointer(globalconf.display, None, sel->win, 0, 0, 0, 0, XWarpPointer(globalconf.display, None, sel->win, 0, 0, 0, 0,