fix(wm): revert regression in ffm raise handler

This commit is contained in:
LGUG2Z
2024-04-22 18:43:34 -07:00
parent 2b5f737d14
commit 4ffffc5eec
2 changed files with 7 additions and 9 deletions
+2 -1
View File
@@ -184,7 +184,8 @@ impl WindowManager {
} }
match event { match event {
WindowManagerEvent::Raise(_window) => { WindowManagerEvent::Raise(window) => {
window.focus(false)?;
self.has_pending_raise_op = false; self.has_pending_raise_op = false;
} }
WindowManagerEvent::Destroy(_, window) | WindowManagerEvent::Unmanage(window) => { WindowManagerEvent::Destroy(_, window) | WindowManagerEvent::Unmanage(window) => {
+1 -4
View File
@@ -774,8 +774,7 @@ impl WindowManager {
pub fn raise_window_at_cursor_pos(&mut self) -> Result<()> { pub fn raise_window_at_cursor_pos(&mut self) -> Result<()> {
let mut hwnd = None; let mut hwnd = None;
for monitor in self.monitors() { let workspace = self.focused_workspace()?;
for workspace in monitor.workspaces() {
if let Some(container_idx) = workspace.container_idx_from_current_point() { if let Some(container_idx) = workspace.container_idx_from_current_point() {
if let Some(container) = workspace.containers().get(container_idx) { if let Some(container) = workspace.containers().get(container_idx) {
if let Some(window) = container.focused_window() { if let Some(window) = container.focused_window() {
@@ -783,8 +782,6 @@ impl WindowManager {
} }
} }
} }
}
}
if let Some(hwnd) = hwnd { if let Some(hwnd) = hwnd {
if self.has_pending_raise_op if self.has_pending_raise_op