From 037d4121a105c0d1e69956ff6804b7cfdbd9bc8b Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 20 Oct 2020 03:30:19 +0300 Subject: [PATCH] On Wayland, fix 'with_min_inner_size' disabling resize Building window with 'set_min_inner_size' was setting 'max_inner_size' under the hood, thus completely disabling window resize, since the window isn't resizeable on Wayland when its minimum size is equal to its maximum size. --- CHANGELOG.md | 1 + src/platform_impl/linux/wayland/window/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 104031ef..7d224047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - On Windows, fix alt-tab behaviour by removing borderless fullscreen "always on top" flag. - On Windows, fix bug preventing windows with transparency enabled from having fully-opaque regions. - **Breaking:** On Windows, include prefix byte in scancodes. +- On Wayland, fix window not being resizeable when using `with_min_inner_size` in `WindowBuilder`. # 0.23.0 (2020-10-02) diff --git a/src/platform_impl/linux/wayland/window/mod.rs b/src/platform_impl/linux/wayland/window/mod.rs index 271e8058..d51f47a7 100644 --- a/src/platform_impl/linux/wayland/window/mod.rs +++ b/src/platform_impl/linux/wayland/window/mod.rs @@ -145,7 +145,7 @@ impl Window { // Max dimensions. let max_size = attributes - .min_inner_size + .max_inner_size .map(|size| size.to_logical::(scale_factor as f64).into()); window.set_max_size(max_size);