Model lock ownership explicitly and allow protected crash recovery
This commit is contained in:
1 parent
570984a39b
commit
8ad5293178
22 files changed
+264
-80
No files matched your search
@@ -28,7 +28,7 @@ impl Ferese {
|
||||
}
|
||||
|
||||
pub(crate) fn focus_last_window(&mut self) {
|
||||
if self.session_lock.active || self.input_capture.captures(1) {
|
||||
if self.session_lock.active() || self.input_capture.captures(1) {
|
||||
return;
|
||||
}
|
||||
self.cancel_focus_cycle();
|
||||
@@ -43,7 +43,7 @@ impl Ferese {
|
||||
}
|
||||
|
||||
pub(crate) fn cycle_focus(&mut self, reverse: bool, preview: bool) {
|
||||
if self.session_lock.active || self.input_capture.captures(1) {
|
||||
if self.session_lock.active() || self.input_capture.captures(1) {
|
||||
return;
|
||||
}
|
||||
let available = self.focus_candidates();
|
||||
@@ -85,7 +85,7 @@ impl Ferese {
|
||||
let Some(mut cycle) = self.focus_cycle.take() else {
|
||||
return;
|
||||
};
|
||||
if !self.session_lock.active
|
||||
if !self.session_lock.active()
|
||||
&& !self.input_capture.captures(1)
|
||||
&& let Some(id) = cycle.reconcile(&self.focus_candidates())
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
impl Ferese {
|
||||
pub fn surface_under(&self, position: Point<f64, Logical>) -> Option<(WlSurface, Point<f64, Logical>)> {
|
||||
if self.session_lock.active {
|
||||
if self.session_lock.active() {
|
||||
return self.lock_surface_under(position);
|
||||
}
|
||||
if self.input_capture.active() {
|
||||
@@ -18,7 +18,7 @@ impl Ferese {
|
||||
}
|
||||
|
||||
pub fn layer_under(&self, position: Point<f64, Logical>) -> Option<(LayerSurface, WlSurface, Point<f64, Logical>)> {
|
||||
if self.session_lock.active {
|
||||
if self.session_lock.active() {
|
||||
return None;
|
||||
}
|
||||
if let Some(layer) = self.layer_surface_under(position, &[Layer::Overlay, Layer::Top]) {
|
||||
|
||||
@@ -84,7 +84,7 @@ impl Ferese {
|
||||
self.refresh_input_capture_zones();
|
||||
let visible_workspaces = self.visible_workspace_ids();
|
||||
self.reconcile_workspaces(&visible_workspaces);
|
||||
if self.session_lock.active {
|
||||
if self.session_lock.active() {
|
||||
self.configure_lock_surfaces();
|
||||
}
|
||||
// Consume idle time before setting new targets; it must not become a
|
||||
|
||||
@@ -7,7 +7,7 @@ impl Ferese {
|
||||
|
||||
pub(super) fn focus_swipe_is_current(&self, swipe: &FocusSwipe) -> bool {
|
||||
self.animations_enabled
|
||||
&& !self.session_lock.active
|
||||
&& !self.session_lock.active()
|
||||
&& !self.overview.is_presenting()
|
||||
&& self.workspaces.active_id() == swipe.workspace
|
||||
&& self.focused_window == Some(swipe.from)
|
||||
@@ -552,7 +552,7 @@ impl Ferese {
|
||||
if self.input_capture.captures(1) {
|
||||
return;
|
||||
}
|
||||
if self.session_lock.active {
|
||||
if self.session_lock.active() {
|
||||
self.focus_lock_surface();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ impl Ferese {
|
||||
self.reset_animation_clock();
|
||||
}
|
||||
|
||||
if self.session_lock.active {
|
||||
if self.session_lock.active() {
|
||||
self.session_lock.output_added(output);
|
||||
self.lock_input_activity();
|
||||
}
|
||||
@@ -77,6 +77,8 @@ impl Ferese {
|
||||
self.session_lock.surfaces.remove(output);
|
||||
self.session_lock.backgrounds.remove(output);
|
||||
self.session_lock.output_removed(output);
|
||||
self.confirm_lock_if_ready();
|
||||
self.refresh_lock_idle_policy();
|
||||
|
||||
match self.output_workspaces.disconnect(output_id) {
|
||||
Ok(Some(target)) => {
|
||||
|
||||
Reference in new issue
Block a user