From a59ccae56f87f7219986a6f1c7fa6162dd547437 Mon Sep 17 00:00:00 2001 From: William Light Date: Mon, 14 Sep 2020 03:30:30 +0200 Subject: [PATCH] x11: suppress non-resize configure notify events --- src/x11/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/x11/window.rs b/src/x11/window.rs index 3876212..558b7b0 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -311,8 +311,11 @@ impl Window { xcb::CONFIGURE_NOTIFY => { let event = unsafe { xcb::cast_event::(&event) }; + let (width, height) = (event.width() as u32, event.height() as u32); - self.new_size = Some((event.width() as u32, event.height() as u32)); + if width != self.window_info.width || height != self.window_info.height { + self.new_size = Some((width, height)); + } } ////