mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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:
parent
613d11434a
commit
96918a06e6
4
kbfunc.c
4
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user