[hackers] [dwm] applied restack patch of anydot, with slight changes

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Wed Jun 06 11:45:08 2007

changeset: 918:7c556b28f1f6
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Wed Jun 06 11:43:14 2007 +0200
summary: applied restack patch of anydot, with slight changes

diff -r 434e10a35d3c -r 7c556b28f1f6 layout.c
--- a/layout.c Wed Jun 06 11:17:56 2007 +0200
+++ b/layout.c Wed Jun 06 11:43:14 2007 +0200
@@ -164,6 +164,7 @@ restack(void) {
 restack(void) {
         Client *c;
         XEvent ev;
+ XWindowChanges wc;
 
         drawstatus();
         if(!sel)
@@ -171,12 +172,17 @@ restack(void) {
         if(sel->isfloating || lt->arrange == floating)
                 XRaiseWindow(dpy, sel->win);
         if(lt->arrange != floating) {
- if(!sel->isfloating)
- XLowerWindow(dpy, sel->win);
+ wc.stack_mode = Below;
+ wc.sibling = barwin;
+ if(!sel->isfloating) {
+ XConfigureWindow(dpy, sel->win, CWSibling | CWStackMode, &wc);
+ wc.sibling = sel->win;
+ }
                 for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
                         if(c == sel)
                                 continue;
- XLowerWindow(dpy, c->win);
+ XConfigureWindow(dpy, c->win, CWSibling | CWStackMode, &wc);
+ wc.sibling = c->win;
                 }
         }
         XSync(dpy, False);
Received on Wed Jun 06 2007 - 11:45:08 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:17 UTC