summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 134a8e7..befaf64 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -156,6 +156,10 @@ kbfunc_client_resize(void *ctx, union arg *arg, enum xev xev)
 		cc->geom.w = cc->hint.minw;
 	if ((cc->geom.h += my * cc->hint.inch) < cc->hint.minh)
 		cc->geom.h = cc->hint.minh;
+	if (cc->geom.x + cc->geom.w < 0)
+		cc->geom.x = -cc->geom.w;
+	if (cc->geom.y + cc->geom.h < 0)
+		cc->geom.y = -cc->geom.h;
 	client_resize(cc, 1);
 
 	/* Make sure the pointer stays within the window. */