Commits

Jan Christoph Ebersbach  committed 3f58fd6

updated patches to dwm 6.1

  • Participants
  • Parent commits cc88093

Comments (0)

Files changed (2)

File save_floats.patch

 into tiled mode. If the window is made floating again, the old dimensions will
 be restored.
 
-diff -r c4609f2ad4ad dwm.c
---- a/dwm.c	Mon Apr 02 20:31:13 2012 +0200
-+++ b/dwm.c	Mon Apr 02 20:32:48 2012 +0200
-@@ -86,6 +86,7 @@
+diff -r 52d4ed1e47fc dwm.c
+--- a/dwm.c	Sun Jul 15 20:16:28 2012 +0200
++++ b/dwm.c	Sun Jul 15 20:17:55 2012 +0200
+@@ -87,6 +87,7 @@
  	char name[256];
  	float mina, maxa;
  	int x, y, w, h;
  	int oldx, oldy, oldw, oldh;
  	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
  	int bw, oldbw;
-@@ -1153,6 +1154,10 @@
+@@ -1156,6 +1157,10 @@
  	updatewindowtype(c);
  	updatesizehints(c);
  	updatewmhints(c);
  	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
  	grabbuttons(c, False);
  	if(!c->isfloating)
-@@ -1760,10 +1765,18 @@
+@@ -1763,8 +1768,16 @@
  		return;
  	selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
  	if(selmon->sel->isfloating)
 +		/*restore last known float dimensions*/
 +		resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy,
 +		       selmon->sel->sfw, selmon->sel->sfh, False);
- 	else if(selmon->sel->isfullscreen)
- 		setfullscreen(selmon->sel, False);
 +	else {
 +		/*save last known float dimensions*/
 +		selmon->sel->sfx = selmon->sel->x;

File single_window_no_border.patch

 This patch removes the border when there is just one window visible in tiled or
 monocle layout.
 
-diff -r 8cd9025c596d dwm.c
---- a/dwm.c	Mon Apr 02 20:35:18 2012 +0200
-+++ b/dwm.c	Mon Apr 02 20:36:28 2012 +0200
-@@ -1239,7 +1239,7 @@
+diff -r 3816633b50c6 dwm.c
+--- a/dwm.c	Sun Jul 15 20:18:02 2012 +0200
++++ b/dwm.c	Sun Jul 15 20:19:31 2012 +0200
+@@ -1242,7 +1242,7 @@
  
  void
  monocle(Monitor *m) {
  	Client *c;
  
  	for(c = m->clients; c; c = c->next)
-@@ -1247,8 +1247,17 @@
+@@ -1250,8 +1250,17 @@
  			n++;
  	if(n > 0) /* override layout symbol */
  		snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
  }
  
  void
-@@ -1769,7 +1778,7 @@
+@@ -1770,7 +1779,7 @@
  
  void
  tile(Monitor *m) {
  	Client *c;
  
  	for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-@@ -1780,17 +1789,36 @@
+@@ -1781,17 +1790,36 @@
  		mw = m->nmaster ? m->ww * m->mfact : 0;
  	else
  		mw = m->ww;
  }
  
  void
-@@ -1810,10 +1838,16 @@
+@@ -1813,10 +1841,16 @@
  		XSetWindowBorder(dpy, selmon->sel->win, dc.sel[ColBorderFloat]);
  	else
  		XSetWindowBorder(dpy, selmon->sel->win, dc.sel[ColBorder]);
 -	if(selmon->sel->isfloating)
+-		/*restore last known float dimensions*/
+-		resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy,
+-		       selmon->sel->sfw, selmon->sel->sfh, False);
 +	if(selmon->sel->isfloating) {
 +		/* restore border when moving window into floating mode */
 +		if(!selmon->sel->bw && selmon->sel->oldbw) {
 +			selmon->sel->bw = selmon->sel->oldbw;
 +			selmon->sel->oldbw = 0;
 +		}
- 		/*restore last known float dimensions*/
- 		resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy,
- 		       selmon->sel->sfw, selmon->sel->sfh, False);
++ 		/*restore last known float dimensions*/
++ 		resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy,
++ 		       selmon->sel->sfw, selmon->sel->sfh, False);
 +	}
- 	else if(selmon->sel->isfullscreen)
- 		setfullscreen(selmon->sel, False);
  	else {
+ 		/*save last known float dimensions*/
+ 		selmon->sel->sfx = selmon->sel->x;