summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfig.h2
-rwxr-xr-xdwm.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/config.h b/config.h
index 7ca7785..e1817e7 100755
--- a/config.h
+++ b/config.h
@@ -6,7 +6,7 @@
/* appearance */
static const unsigned int borderpx = 3; /* border pixel of windows */
-static const unsigned int snap = 8; /* snap pixel */
+static const unsigned int snap = 12; /* snap pixel */
static const int swallowfloating = 1; /* 1 means swallow floating windows by default */
static const char col_gray1[] = "#000000";
static const char col_gray2[] = "#000000";
diff --git a/dwm.c b/dwm.c
index 31da669..c0efdfa 100755
--- a/dwm.c
+++ b/dwm.c
@@ -1258,6 +1258,14 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw;
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
+ && !c->isfullscreen && !c->isfloating
+ && NULL != c->mon->lt[c->mon->sellt]->arrange) {
+ c->w = wc.width += c->bw * 2;
+ c->h = wc.height += c->bw * 2;
+ wc.border_width = 0;
+ }
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);