From c1b0f83aee0348cd49e42529418b42d29e3ea6cc Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 18 Oct 2024 11:52:30 +0800 Subject: [PATCH] fix: lost focus request for window in inactive workspace --- packages/wm/src/common/events/handle_window_focused.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/wm/src/common/events/handle_window_focused.rs b/packages/wm/src/common/events/handle_window_focused.rs index 57e7bf0f7..360b1721a 100644 --- a/packages/wm/src/common/events/handle_window_focused.rs +++ b/packages/wm/src/common/events/handle_window_focused.rs @@ -24,10 +24,8 @@ pub fn handle_window_focused( // Ignore the focus event if: // 1. Window is being hidden by the WM. // 2. Focus is already set to the WM's focused container. - // 3. Window is not actually the foreground window. if window.display_state() == DisplayState::Hiding || state.focused_container() == Some(window.clone().into()) - || Platform::foreground_window() != native_window { return Ok(()); }