[wiki] [sites] floating clients dont get hidden behind tiled clients anymore || Unia

From: <git_AT_suckless.org>
Date: Thu, 21 Mar 2013 01:09:05 +0100

commit 309ba909d07c581fe8f6f7ff36c56fc0d727a0c9
Author: Unia <jthidskes_AT_live.nl>
Date: Thu Mar 21 01:09:17 2013 +0100

    floating clients dont get hidden behind tiled clients anymore

diff --git a/dwm.suckless.org/patches/dwm-6.0-singularborders.diff b/dwm.suckless.org/patches/dwm-6.0-singularborders.diff
index 9a2a617..f73458f 100644
--- a/dwm.suckless.org/patches/dwm-6.0-singularborders.diff
+++ b/dwm.suckless.org/patches/dwm-6.0-singularborders.diff
_AT_@ -1,14 +1,23 @@
---- dwm.c.orig 2013-03-13 14:25:25.094526242 +0100
-+++ dwm.c 2013-03-13 14:25:13.681193099 +0100
-_AT_@ -856,6 +856,7 @@
+--- dwm.c 2011-12-19 16:02:46.000000000 +0100
++++ dwm.c 2013-03-21 01:02:01.376581432 +0100
+_AT_@ -206,6 +206,7 @@
+ static void pop(Client *);
+ static void propertynotify(XEvent *e);
+ static void quit(const Arg *arg);
++static void raisefloating(void);
+ static Monitor *recttomon(int x, int y, int w, int h);
+ static void resize(Client *c, int x, int y, int w, int h, Bool interact);
+ static void resizeclient(Client *c, int x, int y, int w, int h);
+_AT_@ -856,6 +857,8 @@
                  attachstack(c);
                  grabbuttons(c, True);
                  XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
 + XRaiseWindow(dpy, c->win);
++ raisefloating();
                  setfocus(c);
          }
          else
-_AT_@ -1200,7 +1201,7 @@
+_AT_@ -1200,7 +1203,7 @@
          if(n > 0) /* override layout symbol */
                  snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
          for(c = nexttiled(m->clients); c; c = nexttiled(c->next))
_AT_@ -17,7 +26,26 @@
  }
  
  void
-_AT_@ -1717,13 +1718,13 @@
+_AT_@ -1328,6 +1331,18 @@
+ running = False;
+ }
+
++void
++raisefloating(void) {
++ Client *c;
++ XEvent ev;
++
++ for(c = selmon->clients; c; c = c->next)
++ if(c->isfloating)
++ XRaiseWindow(dpy, c->win);
++ XSync(dpy, False);
++ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
++}
++
+ Monitor *
+ recttomon(int x, int y, int w, int h) {
+ Monitor *m, *r = selmon;
+_AT_@ -1717,13 +1732,13 @@
          for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
                  if(i < m->nmaster) {
                          h = (m->wh - my) / (MIN(n, m->nmaster) - i);
diff --git a/dwm.suckless.org/patches/dwm-6.0-singularborders_bstack.diff b/dwm.suckless.org/patches/dwm-6.0-singularborders_bstack.diff
index 42d25c7..76dc6f8 100644
--- a/dwm.suckless.org/patches/dwm-6.0-singularborders_bstack.diff
+++ b/dwm.suckless.org/patches/dwm-6.0-singularborders_bstack.diff
_AT_@ -1,6 +1,14 @@
---- dwm.c 2013-03-13 14:24:49.507860173 +0100
-+++ dwm.c 2013-03-13 14:24:18.417860695 +0100
-_AT_@ -440,13 +440,13 @@
+--- dwm.c.orig 2013-03-21 01:06:21.813243737 +0100
++++ dwm.c 2013-03-21 01:07:31.473242547 +0100
+_AT_@ -207,6 +207,7 @@
+ static void pop(Client *);
+ static void propertynotify(XEvent *e);
+ static void quit(const Arg *arg);
++static void raisefloating(void);
+ static Monitor *recttomon(int x, int y, int w, int h);
+ static void resize(Client *c, int x, int y, int w, int h, Bool interact);
+ static void resizeclient(Client *c, int x, int y, int w, int h);
+_AT_@ -440,13 +441,13 @@
          for(i = mx = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
                  if(i < m->nmasters[m->curtag]) {
                          w = (m->ww - mx) / (MIN(n, m->nmasters[m->curtag]) - i);
_AT_@ -18,15 +26,16 @@
                  }
  }
  
-_AT_@ -883,6 +883,7 @@
+_AT_@ -883,6 +884,8 @@
                  attachstack(c);
                  grabbuttons(c, True);
                  XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
 + XRaiseWindow(dpy, c->win);
++ raisefloating();
                  setfocus(c);
          }
          else
-_AT_@ -1227,7 +1228,7 @@
+_AT_@ -1227,7 +1230,7 @@
          if(n > 0) /* override layout symbol */
                  snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
          for(c = nexttiled(m->clients); c; c = nexttiled(c->next))
_AT_@ -35,7 +44,26 @@
  }
  
  void
-_AT_@ -1744,13 +1745,13 @@
+_AT_@ -1355,6 +1358,18 @@
+ running = False;
+ }
+
++void
++raisefloating(void) {
++ Client *c;
++ XEvent ev;
++
++ for(c = selmon->clients; c; c = c->next)
++ if(c->isfloating)
++ XRaiseWindow(dpy, c->win);
++ XSync(dpy, False);
++ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
++}
++
+ Monitor *
+ recttomon(int x, int y, int w, int h) {
+ Monitor *m, *r = selmon;
+_AT_@ -1744,13 +1759,13 @@
          for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
                  if(i < m->nmaster) {
                          h = (m->wh - my) / (MIN(n, m->nmaster) - i);
diff --git a/dwm.suckless.org/patches/singularborders.md b/dwm.suckless.org/patches/singularborders.md
index 5ce916f..41a7ec4 100644
--- a/dwm.suckless.org/patches/singularborders.md
+++ b/dwm.suckless.org/patches/singularborders.md
_AT_@ -32,7 +32,6 @@ Description
 Issues
 ------
 * In a multi-monitor setup, you will see monitor one's borders on monitor two and vice-versa. This is because the borders on screen edges are simply placed off-screen.
-* Floating clients will be hidden behind tiled clients when one changes focus from a floating client to a tiled client.
 
 Download
 --------
Received on Thu Mar 21 2013 - 01:09:05 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 21 2013 - 01:12:06 CET