From e500698af7707ccbff6b801d1fe1c307be1c647b Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Fri, 9 May 2025 19:27:23 +0200 Subject: [PATCH] tree: set lock node to invisible when idling --- src/ifs/wl_surface/ext_session_lock_surface_v1.rs | 5 +++++ src/tree/output.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ifs/wl_surface/ext_session_lock_surface_v1.rs b/src/ifs/wl_surface/ext_session_lock_surface_v1.rs index 64155afd..f1ceb474 100644 --- a/src/ifs/wl_surface/ext_session_lock_surface_v1.rs +++ b/src/ifs/wl_surface/ext_session_lock_surface_v1.rs @@ -55,6 +55,11 @@ impl ExtSessionLockSurfaceV1 { height: height as _, }); } + + pub fn set_visible(&self, visible: bool) { + self.surface.set_visible(visible); + self.seat_state.set_visible(self, visible); + } } impl ExtSessionLockSurfaceV1RequestHandler for ExtSessionLockSurfaceV1 { diff --git a/src/tree/output.rs b/src/tree/output.rs index ce143a99..676b2686 100644 --- a/src/tree/output.rs +++ b/src/tree/output.rs @@ -976,7 +976,7 @@ impl OutputNode { let mut visible = self.state.root_visible(); if self.state.lock.locked.get() { if let Some(surface) = self.lock_surface.get() { - surface.surface.set_visible(visible); + surface.set_visible(visible); } visible = false; }