mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-26 21:58:10 +01:00
Prevent pointer focus to windows when locked
This commit is contained in:
parent
1faab2a68f
commit
333c805bdd
1 changed files with 9 additions and 5 deletions
14
src/input.rs
14
src/input.rs
|
@ -190,11 +190,15 @@ impl Pinnacle {
|
|||
.output_geometry(output)
|
||||
.expect("called output_geometry on unmapped output");
|
||||
|
||||
if let Some(lock_surface) = output.with_state(|state| state.lock_surface.clone()) {
|
||||
return Some((
|
||||
PointerFocusTarget::WlSurface(lock_surface.wl_surface().clone()),
|
||||
output_geo.loc,
|
||||
));
|
||||
if !self.lock_state.is_unlocked() {
|
||||
return output
|
||||
.with_state(|state| state.lock_surface.clone())
|
||||
.map(|lock_surface| {
|
||||
(
|
||||
PointerFocusTarget::WlSurface(lock_surface.wl_surface().clone()),
|
||||
output_geo.loc,
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
let mut fullscreen_and_up_split_at = 0;
|
||||
|
|
Loading…
Reference in a new issue