xwm: Support sticky requests for unmapped windows
This commit is contained in:
parent
6e4551a200
commit
85630236fa
3 changed files with 39 additions and 17 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue