xwm: Support sticky requests for unmapped windows

This commit is contained in:
Victoria Brekenfeld 2026-05-18 17:28:27 +02:00 committed by Victoria Brekenfeld
parent 6e4551a200
commit 85630236fa
3 changed files with 39 additions and 17 deletions

View file

@ -815,6 +815,7 @@ impl XwmHandler for State {
seat,
fullscreen: None,
maximized: false,
sticky: false,
})
}
}
@ -1167,6 +1168,28 @@ impl XwmHandler for State {
}
}
fn stick_request(&mut self, _xwm: XwmId, window: X11Surface) {
let mut shell = self.common.shell.write();
if let Some(pending) = shell
.pending_windows
.iter_mut()
.find(|pending| pending.surface.x11_surface() == Some(&window))
{
pending.sticky = true;
}
}
fn unstick_request(&mut self, _xwm: XwmId, window: X11Surface) {
let mut shell = self.common.shell.write();
if let Some(pending) = shell
.pending_windows
.iter_mut()
.find(|pending| pending.surface.x11_surface() == Some(&window))
{
pending.sticky = false;
}
}
fn active_window_request(
&mut self,
_xwm: XwmId,