From 3e84968dacb6a50a82ef5e35c0ac373c38172681 Mon Sep 17 00:00:00 2001 From: Hojjat Date: Thu, 2 Apr 2026 13:22:30 -0600 Subject: [PATCH] fix: clean up pending_windows for surfaces that were never mapped --- src/wayland/handlers/xdg_shell/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wayland/handlers/xdg_shell/mod.rs b/src/wayland/handlers/xdg_shell/mod.rs index 75ca1ab9..55828af8 100644 --- a/src/wayland/handlers/xdg_shell/mod.rs +++ b/src/wayland/handlers/xdg_shell/mod.rs @@ -315,6 +315,11 @@ impl XdgShellHandler for State { let mut shell = self.common.shell.write(); let seat = shell.seats.last_active().clone(); + // Clean up pending_windows for surfaces that were never mapped. + shell + .pending_windows + .retain(|pending| pending.surface != surface); + let output = shell .visible_output_for_surface(surface.wl_surface()) .cloned();