diff --git a/src/wayland/protocols/overlap_notify.rs b/src/wayland/protocols/overlap_notify.rs index ca30f3e1..c325845c 100644 --- a/src/wayland/protocols/overlap_notify.rs +++ b/src/wayland/protocols/overlap_notify.rs @@ -93,10 +93,13 @@ impl OverlapNotifyState { .registered_toplevels() .filter(|w| { if let Some(active_workspace) = active_workspace.as_ref() { - ToplevelHandleStateInner::from_window(*w) - .lock() + let state = w + .user_data() + .get::() .unwrap() - .in_workspace(&active_workspace) + .lock() + .unwrap(); + state.in_workspace(&active_workspace) } else { true } diff --git a/src/wayland/protocols/toplevel_info.rs b/src/wayland/protocols/toplevel_info.rs index e9a7ba2a..afc8339a 100644 --- a/src/wayland/protocols/toplevel_info.rs +++ b/src/wayland/protocols/toplevel_info.rs @@ -80,6 +80,10 @@ impl ToplevelStateInner { pub fn foreign_handle(&self) -> Option<&ForeignToplevelHandle> { self.foreign_handle.as_ref() } + + pub fn in_workspace(&self, handle: &WorkspaceHandle) -> bool { + self.workspaces.contains(handle) + } } pub struct ToplevelHandleStateInner { @@ -120,10 +124,6 @@ impl ToplevelHandleStateInner { window: None, }) } - - pub fn in_workspace(&self, handle: &WorkspaceHandle) -> bool { - self.workspaces.contains(handle) - } } impl GlobalDispatch