mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-14 00:52:54 +02:00
fix(wm): correct logic for foreground access retry
This commit is contained in:
@@ -283,10 +283,11 @@ impl Window {
|
|||||||
// If this still doesn't work then maybe try https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-locksetforegroundwindow
|
// If this still doesn't work then maybe try https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-locksetforegroundwindow
|
||||||
if !tried_resetting_foreground_access {
|
if !tried_resetting_foreground_access {
|
||||||
let process_id = WindowsApi::current_process_id();
|
let process_id = WindowsApi::current_process_id();
|
||||||
WindowsApi::allow_set_foreground_window(process_id)?;
|
if WindowsApi::allow_set_foreground_window(process_id).is_ok() {
|
||||||
tried_resetting_foreground_access = true;
|
tried_resetting_foreground_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user