mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-07-03 14:06:12 +02:00
fix: enhance focus management in WindowManager
- Updated the focusWindow logic to log focus status and ensure the Big Picture window is always shown and focused. - Added detailed logging for focus state checks to improve debugging and visibility of focus behavior.
This commit is contained in:
@@ -509,11 +509,22 @@ export class WindowManager {
|
||||
}
|
||||
|
||||
const result = NativeAddon.focusWindow(handle);
|
||||
if (!result.focused) {
|
||||
|
||||
if (result.focused) {
|
||||
logger.info("native focus: focused");
|
||||
} else {
|
||||
logger.warn("native focus did not achieve full focus", result);
|
||||
bigPicture.show();
|
||||
bigPicture.focus();
|
||||
}
|
||||
|
||||
bigPicture.show();
|
||||
bigPicture.focus();
|
||||
bigPicture.webContents.focus();
|
||||
|
||||
logger.info(
|
||||
"bigPicture.isFocused()=%s webContents.isFocused()=%s",
|
||||
bigPicture.isFocused(),
|
||||
bigPicture.webContents.isFocused()
|
||||
);
|
||||
}
|
||||
|
||||
public static isMainWindowMaximized() {
|
||||
|
||||
Reference in New Issue
Block a user