sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 309ba909d07c581fe8f6f7ff36c56fc0d727a0c9
parent 3a38e21348d48e66f6ff36424f6c0c9502fb2685
Author: Unia <jthidskes@live.nl>
Date:   Thu, 21 Mar 2013 01:09:17 +0100

floating clients dont get hidden behind tiled clients anymore

Diffstat:
Mdwm.suckless.org/patches/dwm-6.0-singularborders.diff | 38+++++++++++++++++++++++++++++++++-----
Mdwm.suckless.org/patches/dwm-6.0-singularborders_bstack.diff | 40++++++++++++++++++++++++++++++++++------
Mdwm.suckless.org/patches/singularborders.md | 1-
3 files changed, 67 insertions(+), 12 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-6.0-singularborders.diff b/dwm.suckless.org/patches/dwm-6.0-singularborders.diff @@ -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 -@@ -856,6 +856,7 @@ +--- dwm.c 2011-12-19 16:02:46.000000000 +0100 ++++ dwm.c 2013-03-21 01:02:01.376581432 +0100 +@@ -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); +@@ -856,6 +857,8 @@ attachstack(c); grabbuttons(c, True); XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); + XRaiseWindow(dpy, c->win); ++ raisefloating(); setfocus(c); } else -@@ -1200,7 +1201,7 @@ +@@ -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)) @@ -17,7 +26,26 @@ } void -@@ -1717,13 +1718,13 @@ +@@ -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; +@@ -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 @@ -1,6 +1,14 @@ ---- dwm.c 2013-03-13 14:24:49.507860173 +0100 -+++ dwm.c 2013-03-13 14:24:18.417860695 +0100 -@@ -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 +@@ -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); +@@ -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); @@ -18,15 +26,16 @@ } } -@@ -883,6 +883,7 @@ +@@ -883,6 +884,8 @@ attachstack(c); grabbuttons(c, True); XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); + XRaiseWindow(dpy, c->win); ++ raisefloating(); setfocus(c); } else -@@ -1227,7 +1228,7 @@ +@@ -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)) @@ -35,7 +44,26 @@ } void -@@ -1744,13 +1745,13 @@ +@@ -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; +@@ -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 @@ -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 --------