fix: Windows: Calling window.setFocusable(true) will no longer cause a window to lose focus (#48927)

Make setFocusable only deactivate a window if focusable is false. Do not deactivate a window when setting focusable to true.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: vulture <isu@vulture.fm>
This commit is contained in:
trop[bot]
2025-11-13 09:53:02 +01:00
committed by GitHub
parent fa764f7328
commit 543f1670fe

View File

@@ -1363,7 +1363,8 @@ void NativeWindowViews::SetFocusable(bool focusable) {
ex_style |= WS_EX_NOACTIVATE;
::SetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE, ex_style);
SetSkipTaskbar(!focusable);
Focus(false);
if (!focusable)
Focus(false);
#endif
}