mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
fix: Windows: Calling window.setFocusable(true) will no longer cause a window to lose focus (#45640)
Make setFocusable only deactivate a window if focusable is false. Do not deactivate a window when setting focusable to true.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user