sites

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

commit c17a5041fcc6f8aa98de9739d9947f0203bddafa
parent 59a865f19a655db927432c0e0360a90904dd1448
Author: Martin Tournoij <martin@arp242.net>
Date:   Wed, 12 Dec 2018 20:41:43 +1300

dwm: add cleanly applying version of savefloats patch

Also rename the existing patches to follow the guidelines in "hacking",
and remove the link to dwm-clean-patches, as it hasn't been updated in
ages.

Diffstat:
Rdwm.suckless.org/patches/save_floats/dwm-10e232f9ace7-save_floats.diff -> dwm.suckless.org/patches/save_floats/dwm-savefloats-20120406-10e232f.diff | 0
Adwm.suckless.org/patches/save_floats/dwm-savefloats-20181212-b69c870.diff | 42++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/save_floats/dwm-save_floats-6.0.diff -> dwm.suckless.org/patches/save_floats/dwm-savefloats-6.0.diff | 0
Rdwm.suckless.org/patches/save_floats/dwm-6.1-save_floats.diff -> dwm.suckless.org/patches/save_floats/dwm-savefloats-6.1.diff | 0
Mdwm.suckless.org/patches/save_floats/index.md | 11+++++------
5 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/dwm.suckless.org/patches/save_floats/dwm-10e232f9ace7-save_floats.diff b/dwm.suckless.org/patches/save_floats/dwm-savefloats-20120406-10e232f.diff diff --git a/dwm.suckless.org/patches/save_floats/dwm-savefloats-20181212-b69c870.diff b/dwm.suckless.org/patches/save_floats/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); + } + diff --git a/dwm.suckless.org/patches/save_floats/dwm-save_floats-6.0.diff b/dwm.suckless.org/patches/save_floats/dwm-savefloats-6.0.diff diff --git a/dwm.suckless.org/patches/save_floats/dwm-6.1-save_floats.diff b/dwm.suckless.org/patches/save_floats/dwm-savefloats-6.1.diff diff --git a/dwm.suckless.org/patches/save_floats/index.md b/dwm.suckless.org/patches/save_floats/index.md @@ -6,13 +6,12 @@ into tiled mode. If the window is made floating again, the old dimensions will be restored. ## Download -Patches against different versions of dwm are available at -[dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). -* [dwm-savefloats-20160723-56a31dc.diff](dwm-savefloats-20160723-56a31dc.diff) (1452b) -* [dwm-6.1-save_floats.diff](dwm-6.1-save_floats.diff) (1605b) (20140209) -* [dwm-10e232f9ace7-save_floats.diff](dwm-10e232f9ace7-save_floats.diff) (1604b) (20120406) -* [dwm-save_floats-6.0.diff](dwm-save_floats-6.0.diff) (1528b) (20120406) +* [dwm-savefloats-20181212-b69c870.diff](dwm-savefloats-20181212-b69c870.diff) +* [dwm-savefloats-20160723-56a31dc.diff](dwm-savefloats-20160723-56a31dc.diff) +* [dwm-savefloats-20120406-10e232f.diff](dwm-savefloats-20120406-10e232f.diff) +* [dwm-savefloats-6.1.diff](dwm-savefloats-6.1.diff) +* [dwm-savefloats-6.0.diff](dwm-savefloats-6.0.diff) ## Author * http://nymu.net/patches