diff options
-rw-r--r-- | sway/input/cursor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index e5631f5b..a24a7de8 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -238,9 +238,9 @@ static void handle_resize_motion(struct sway_seat *seat, | |||
238 | if (seat->op_resize_preserve_ratio) { | 238 | if (seat->op_resize_preserve_ratio) { |
239 | double x_multiplier = grow_width / seat->op_ref_width; | 239 | double x_multiplier = grow_width / seat->op_ref_width; |
240 | double y_multiplier = grow_height / seat->op_ref_height; | 240 | double y_multiplier = grow_height / seat->op_ref_height; |
241 | double avg_multiplier = (x_multiplier + y_multiplier) / 2; | 241 | double max_multiplier = fmax(x_multiplier, y_multiplier); |
242 | grow_width = seat->op_ref_width * avg_multiplier; | 242 | grow_width = seat->op_ref_width * max_multiplier; |
243 | grow_height = seat->op_ref_height * avg_multiplier; | 243 | grow_height = seat->op_ref_height * max_multiplier; |
244 | } | 244 | } |
245 | 245 | ||
246 | // Determine new width/height, and accommodate for min/max values | 246 | // Determine new width/height, and accommodate for min/max values |