mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
If a client sets hints, honor them for kb resize requests, just like we
do for mouse based resize requests. Based on a patch from Vadim Vygonets.
This commit is contained in:
parent
9a48836ceb
commit
4aca2b8764
2
client.c
2
client.c
@ -839,6 +839,8 @@ client_getsizehints(struct client_ctx *cc)
|
||||
}
|
||||
cc->hint.incw = MAX(1, cc->hint.incw);
|
||||
cc->hint.inch = MAX(1, cc->hint.inch);
|
||||
cc->hint.minw = MAX(1, cc->hint.minw);
|
||||
cc->hint.minh = MAX(1, cc->hint.minh);
|
||||
|
||||
if (size.flags & PAspect) {
|
||||
if (size.min_aspect.x > 0)
|
||||
|
8
kbfunc.c
8
kbfunc.c
@ -143,10 +143,10 @@ kbfunc_client_resize(struct client_ctx *cc, union arg *arg)
|
||||
|
||||
kbfunc_amount(arg->i, &mx, &my);
|
||||
|
||||
if ((cc->geom.w += mx) < 1)
|
||||
cc->geom.w = 1;
|
||||
if ((cc->geom.h += my) < 1)
|
||||
cc->geom.h = 1;
|
||||
if ((cc->geom.w += mx * cc->hint.incw) < cc->hint.minw)
|
||||
cc->geom.w = cc->hint.minw;
|
||||
if ((cc->geom.h += my * cc->hint.inch) < cc->hint.minh)
|
||||
cc->geom.h = cc->hint.minh;
|
||||
client_resize(cc, 1);
|
||||
|
||||
/* Make sure the pointer stays within the window. */
|
||||
|
Loading…
Reference in New Issue
Block a user