diff options
| author | bakkeby <[email protected]> | 2019-11-04 08:17:00 +0100 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2019-11-04 15:17:19 +0100 |
| commit | 42b66d4b29082f237e5b368dfa97e18801a203fd (patch) | |
| tree | 3c96a868b2cf48e81f0b690a127bc76a5bacd3ce /patch/maximize.c | |
| parent | 2112ea927f15525a541553ca680677664e73ffe1 (diff) | |
| download | dwm-flexipatch-42b66d4b29082f237e5b368dfa97e18801a203fd.tar.gz dwm-flexipatch-42b66d4b29082f237e5b368dfa97e18801a203fd.zip | |
Addressed some conflicts between CMDCUSTOMIZE and NODMENU patches as well as between EXRESIZE and MAXIMIZE patches
Diffstat (limited to 'patch/maximize.c')
| -rw-r--r-- | patch/maximize.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/patch/maximize.c b/patch/maximize.c index 6f89538..77775f3 100644 --- a/patch/maximize.c +++ b/patch/maximize.c @@ -1,12 +1,13 @@ void -maximize(int x, int y, int w, int h) { +maximize(int x, int y, int w, int h) +{ XEvent ev; - if(!selmon->sel || selmon->sel->isfixed) + if (!selmon->sel || selmon->sel->isfixed) return; XRaiseWindow(dpy, selmon->sel->win); - if(!selmon->sel->ismax) { - if(!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating) + if (!selmon->sel->ismax) { + if (!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating) selmon->sel->wasfloating = True; else { togglefloating(NULL); @@ -21,25 +22,28 @@ maximize(int x, int y, int w, int h) { } else { resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, True); - if(!selmon->sel->wasfloating) + if (!selmon->sel->wasfloating) togglefloating(NULL); selmon->sel->ismax = False; } drawbar(selmon); - while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); + while (XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void -togglemaximize(const Arg *arg) { +togglemax(const Arg *arg) +{ maximize(selmon->wx, selmon->wy, selmon->ww - 2 * borderpx, selmon->wh - 2 * borderpx); } void -toggleverticalmax(const Arg *arg) { +toggleverticalmax(const Arg *arg) +{ maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * borderpx); } void -togglehorizontalmax(const Arg *arg) { +togglehorizontalmax(const Arg *arg) +{ maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * borderpx, selmon->sel->h); }
\ No newline at end of file |
