- if (*dh != trydh) { /* got resisted */
- /* resize the width based on the height */
- if (moveresize_client->min_ratio) {
- if (nh * moveresize_client->min_ratio > nw)
- nw = (gint)(nh * moveresize_client->min_ratio);
- }
- if (moveresize_client->max_ratio) {
- if (nh * moveresize_client->max_ratio < nw)
- nw = (gint)(nh * moveresize_client->max_ratio);
- }
- }
- if (*dw != trydw) { /* got resisted */
- /* resize the height based on the width */
- if (moveresize_client->min_ratio) {
- if (nh * moveresize_client->min_ratio > nw)
- nh = (gint)(nw / moveresize_client->min_ratio);
+ if (!keyboard &&
+ (moveresize_client->max_ratio || moveresize_client->min_ratio))
+ {
+ if (*dh != trydh) { /* got resisted */
+ /* resize the width based on the height */
+ if (moveresize_client->min_ratio) {
+ if (nh * moveresize_client->min_ratio > nw)
+ nw = (gint)(nh * moveresize_client->min_ratio);
+ }
+ if (moveresize_client->max_ratio) {
+ if (nh * moveresize_client->max_ratio < nw)
+ nw = (gint)(nh * moveresize_client->max_ratio);
+ }