mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Lock session right away with no outputs
This commit is contained in:
+10
-2
@@ -4510,8 +4510,16 @@ impl Niri {
|
|||||||
self.cursor_manager
|
self.cursor_manager
|
||||||
.set_cursor_image(CursorImageStatus::default_named());
|
.set_cursor_image(CursorImageStatus::default_named());
|
||||||
|
|
||||||
self.lock_state = LockState::Locking(confirmation);
|
if self.output_state.is_empty() {
|
||||||
self.queue_redraw_all();
|
// There are no outputs, lock the session right away.
|
||||||
|
let lock = confirmation.ext_session_lock().clone();
|
||||||
|
confirmation.lock();
|
||||||
|
self.lock_state = LockState::Locked(lock);
|
||||||
|
} else {
|
||||||
|
// There are outputs, which we need to redraw before locking.
|
||||||
|
self.lock_state = LockState::Locking(confirmation);
|
||||||
|
self.queue_redraw_all();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unlock(&mut self) {
|
pub fn unlock(&mut self) {
|
||||||
|
|||||||
Reference in New Issue
Block a user