sites

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

commit bea2a7c55a04e719807b89cf7983158855f34ccf
parent 3e98231745aa6ed42e29c160c0f60e9504da102c
Author: Jan Christoph Ebersbach <jceb@e-jc.de>
Date:   Tue, 14 Feb 2012 21:22:05 +0100

update save floats patch to dwm 6.0
Diffstat:
Adwm.suckless.org/patches/dwm-6.0-save_floats.diff | 46++++++++++++++++++++++++++++++++++++++++++++++
Ddwm.suckless.org/patches/historical/save_floats.md | 23-----------------------
Adwm.suckless.org/patches/save_floats.md | 24++++++++++++++++++++++++
3 files changed, 70 insertions(+), 23 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-6.0-save_floats.diff b/dwm.suckless.org/patches/dwm-6.0-save_floats.diff @@ -0,0 +1,46 @@ +URL: http://dwm.suckless.org/patches/historical/save_floats +This patch saves size and position of every floating window before it is forced +into tiled mode. If the window is made floating again, the old dimensions will +be restored. + +diff -r 6f54bd1ef439 dwm.c +--- a/dwm.c Wed Jan 04 13:30:12 2012 +0100 ++++ b/dwm.c Sun Feb 12 09:32:23 2012 +0100 +@@ -86,6 +86,7 @@ + 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; +@@ -1149,6 +1150,10 @@ + 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, False); + if(!c->isfloating) +@@ -1741,8 +1746,16 @@ + 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, False); ++ /*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/historical/save_floats.md b/dwm.suckless.org/patches/historical/save_floats.md @@ -1,23 +0,0 @@ -# SAVE FLOATS PATCH # - -## Description ## - -This patch saves size and position of every floating window before it is forced -into tiled mode. If the window is made floating again, the old dimensions will -be restored. - -## Download ## - * [dwm-5.0-save_floats.diff][4] - * [dwm-4.6-save_floats.diff][3] - * [dwm-4.5-save_floats.diff][2] - * [dwm-4.4-save_floats.diff][1] - -## Author ## - * http://nymu.net/patches - * Updated by Jan Christoph Ebersbach - <jceb@e-jc.de> - -[1]: http://www.e-jc.de/dwm/dwm-4.4-save_floats.diff -[2]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-save_floats.diff -[3]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-save_floats.diff -[4]: http://www.e-jc.de/dwm/5.0/fb1833284e4b/dwm-5.0-save_floats.diff - diff --git a/dwm.suckless.org/patches/save_floats.md b/dwm.suckless.org/patches/save_floats.md @@ -0,0 +1,24 @@ +# SAVE FLOATS PATCH # + +## Description ## + +This patch saves size and position of every floating window before it is forced +into tiled mode. If the window is made floating again, the old dimensions will +be restored. + +## Download ## + * [dwm-6.0-save_floats.diff][5] + * [dwm-5.0-save_floats.diff][4] + * [dwm-4.6-save_floats.diff][3] + * [dwm-4.5-save_floats.diff][2] + * [dwm-4.4-save_floats.diff][1] + +## Author ## + * http://nymu.net/patches + * Updated by Jan Christoph Ebersbach - <jceb@e-jc.de> + +[1]: http://www.e-jc.de/dwm/dwm-4.4-save_floats.diff +[2]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-save_floats.diff +[3]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-save_floats.diff +[4]: http://www.e-jc.de/dwm/5.0/fb1833284e4b/dwm-5.0-save_floats.diff +[5]: dwm-6.0-save_floats.diff