From cf0a53346105503205c59188f30cd6cd42922e51 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 3 Jan 2024 21:49:11 +0400 Subject: [PATCH] Issue resize due to scale change on Wayland This is a regression from 8f6de4ef. Links: https://github.com/alacritty/alacritty/issues/7559 --- CHANGELOG.md | 1 + src/platform_impl/linux/wayland/event_loop/mod.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbdb2c0d3..0220a44fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Unreleased` header. # Unreleased +- On Wayland, fix resize not issued when scale changes - On X11 and Wayland, fix arrow up on keypad reported as `ArrowLeft`. # 0.29.8 diff --git a/src/platform_impl/linux/wayland/event_loop/mod.rs b/src/platform_impl/linux/wayland/event_loop/mod.rs index b9fbf2c09..3585e3266 100644 --- a/src/platform_impl/linux/wayland/event_loop/mod.rs +++ b/src/platform_impl/linux/wayland/event_loop/mod.rs @@ -401,7 +401,9 @@ impl EventLoop { } } - if compositor_update.resized { + // NOTE: Rescale changed the physical size which winit operates in, thus we should + // resize. + if compositor_update.resized || compositor_update.scale_changed { let physical_size = self.with_state(|state| { let windows = state.windows.get_mut(); let window = windows.get(&window_id).unwrap().lock().unwrap();