Ensure client stays inbound on key-based resize; based on logic existing in

key-based client move; from Vadim Vygonets.
This commit is contained in:
okan 2017-01-05 21:18:20 +00:00
parent 613d11434a
commit 96918a06e6

View File

@ -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. */