mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
* refs/heads/master: Ensure client stays inbound on key-based resize; based on logic existing in key-based client move; from Vadim Vygonets. When a window has a user or program specified position, ensure the edge of the final position is at least viewable and warp'able by the difference of bwidth; prevents mapping windows completely off the virtual screen.
This commit is contained in:
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. */
|
||||
|
Reference in New Issue
Block a user