diff options
author | Joe <bousset.rudy@gmail.com> | 2022-08-12 12:40:18 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-08-12 12:40:18 +0200 |
commit | bc0b589fcc3592ab1d7b420a4a47f5a10fa9464c (patch) | |
tree | bdff1d887754aa975cc0bcc98787d129234038c8 /applied/dwm-savefloats-20181212-b69c870.diff | |
parent | gaps update (diff) | |
download | dwm-bc0b589fcc3592ab1d7b420a4a47f5a10fa9464c.tar.gz dwm-bc0b589fcc3592ab1d7b420a4a47f5a10fa9464c.tar.bz2 dwm-bc0b589fcc3592ab1d7b420a4a47f5a10fa9464c.tar.xz dwm-bc0b589fcc3592ab1d7b420a4a47f5a10fa9464c.tar.zst dwm-bc0b589fcc3592ab1d7b420a4a47f5a10fa9464c.zip |
update
Diffstat (limited to 'applied/dwm-savefloats-20181212-b69c870.diff')
-rw-r--r-- | applied/dwm-savefloats-20181212-b69c870.diff | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/applied/dwm-savefloats-20181212-b69c870.diff b/applied/dwm-savefloats-20181212-b69c870.diff new file mode 100644 index 0000000..f5d8ed8 --- /dev/null +++ b/applied/dwm-savefloats-20181212-b69c870.diff @@ -0,0 +1,42 @@ +diff --git i/dwm.c w/dwm.c +index 4465af1..96b0b26 100644 +--- i/dwm.c ++++ w/dwm.c +@@ -88,6 +88,7 @@ struct Client { + char name[256]; + float mina, maxa; + int x, y, w, h; ++ int sfx, sfy, sfw, sfh; /* stored float geometry, used on mode revert */ + int oldx, oldy, oldw, oldh; + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; +@@ -1056,6 +1057,10 @@ manage(Window w, XWindowAttributes *wa) + updatewindowtype(c); + updatesizehints(c); + updatewmhints(c); ++ c->sfx = c->x; ++ c->sfy = c->y; ++ c->sfw = c->w; ++ c->sfh = c->h; + XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); + grabbuttons(c, 0); + if (!c->isfloating) +@@ -1714,8 +1719,16 @@ togglefloating(const Arg *arg) + return; + selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; + if (selmon->sel->isfloating) +- resize(selmon->sel, selmon->sel->x, selmon->sel->y, +- selmon->sel->w, selmon->sel->h, 0); ++ /* restore last known float dimensions */ ++ resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy, ++ selmon->sel->sfw, selmon->sel->sfh, False); ++ else { ++ /* save last known float dimensions */ ++ selmon->sel->sfx = selmon->sel->x; ++ selmon->sel->sfy = selmon->sel->y; ++ selmon->sel->sfw = selmon->sel->w; ++ selmon->sel->sfh = selmon->sel->h; ++ } + arrange(selmon); + } + |