mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-26 19:31:16 +01:00
fix(wm): respect mff on cross-monitor monocle focus
This commit ensures that if mouse-follows-focus is disabled, the cursor will not follow a focus change to a monocle container on an adjacent monitor. fix #1119
This commit is contained in:
@@ -1888,21 +1888,10 @@ impl WindowManager {
|
||||
if let Ok(focused_workspace) = self.focused_workspace_mut() {
|
||||
if let Some(window) = focused_workspace.maximized_window() {
|
||||
window.focus(mouse_follows_focus)?;
|
||||
// (alex-ds13): @LGUG2Z Why was this being done below on the monocle?
|
||||
// Should it really be done?
|
||||
//
|
||||
// WindowsApi::center_cursor_in_rect(&WindowsApi::window_rect(
|
||||
// window.hwnd,
|
||||
// )?)?;
|
||||
|
||||
cross_monitor_monocle_or_max = true;
|
||||
} else if let Some(monocle) = focused_workspace.monocle_container() {
|
||||
if let Some(window) = monocle.focused_window() {
|
||||
window.focus(mouse_follows_focus)?;
|
||||
WindowsApi::center_cursor_in_rect(&WindowsApi::window_rect(
|
||||
window.hwnd,
|
||||
)?)?;
|
||||
|
||||
cross_monitor_monocle_or_max = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user