xwayland: Don't allow spurious map_requests to map windows twice

This commit is contained in:
Victoria Brekenfeld 2025-07-01 14:22:25 +02:00 committed by Victoria Brekenfeld
parent 83ed79af16
commit 5f97691ce5
2 changed files with 32 additions and 2 deletions

View file

@ -734,8 +734,11 @@ impl XwmHandler for State {
let mut shell = self.common.shell.write();
let startup_id = window.startup_id();
// TODO: Not correct for fullscreen (and minimized?)
if shell.element_for_surface(&window).is_some() {
if shell.is_surface_mapped(&window) {
warn!(
?window,
"Got map_request for already mapped window? Ignoring"
);
return;
}