diff --git a/dwm-6.1-maximize_vert_horz.diff b/./dwm-git-maximize_vert_horz.diff index 5da0b61..6010626 100644 --- a/dwm-6.1-maximize_vert_horz.diff +++ b/./dwm-git-maximize_vert_horz.diff @@ -7,29 +7,29 @@ Index: dwm/dwm.c =================================================================== --- dwm/dwm.c.orig 2014-02-09 15:24:12.552116979 +0100 +++ dwm/dwm.c 2014-02-09 15:24:12.548116979 +0100 -@@ -91,7 +91,7 @@ +@@ -92,7 +92,7 @@ int basew, baseh, incw, inch, maxw, maxh, minw, minh; int bw, oldbw; unsigned int tags; -- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; -+ Bool ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; Client *next; Client *snext; Monitor *mon; -@@ -1047,6 +1047,8 @@ +@@ -1072,6 +1072,8 @@ updatewmhints(c); XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); - grabbuttons(c, False); -+ c->wasfloating = False; -+ c->ismax = False; - if(!c->isfloating) + grabbuttons(c, 0); ++ c->wasfloating = 0; ++ c->ismax = 0; + if (!c->isfloating) c->isfloating = c->oldstate = trans != None || c->isfixed; - if(c->isfloating) + if (c->isfloating) Index: dwm/maximize.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ dwm/maximize.c 2014-02-09 15:24:12.548116979 +0100 -@@ -0,0 +1,45 @@ +@@ -0,0 +1,41 @@ +void +maximize(int x, int y, int w, int h) { + XEvent ev; @@ -39,23 +39,19 @@ Index: dwm/maximize.c + XRaiseWindow(dpy, selmon->sel->win); + if(!selmon->sel->ismax) { + if(!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating) -+ selmon->sel->wasfloating = True; ++ selmon->sel->wasfloating = 1; + else { + togglefloating(NULL); -+ selmon->sel->wasfloating = False; ++ selmon->sel->wasfloating = 0; + } -+ selmon->sel->oldx = selmon->sel->x; -+ selmon->sel->oldy = selmon->sel->y; -+ selmon->sel->oldw = selmon->sel->w; -+ selmon->sel->oldh = selmon->sel->h; -+ resize(selmon->sel, x, y, w, h, True); -+ selmon->sel->ismax = True; ++ resize(selmon->sel, x, y, w, h, 1); ++ selmon->sel->ismax = 1; + } + else { -+ resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, True); ++ resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, 1); + if(!selmon->sel->wasfloating) + togglefloating(NULL); -+ selmon->sel->ismax = False; ++ selmon->sel->ismax = 0; + } + drawbar(selmon); + while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));