mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
For hidden window focus() should do nothing
This commit is contained in:
@@ -335,6 +335,10 @@ void NativeWindowViews::CloseImmediately() {
|
||||
}
|
||||
|
||||
void NativeWindowViews::Focus(bool focus) {
|
||||
// For hidden window focus() should do nothing.
|
||||
if (!IsVisible())
|
||||
return;
|
||||
|
||||
if (focus) {
|
||||
#if defined(OS_WIN)
|
||||
window_->Activate();
|
||||
|
||||
Reference in New Issue
Block a user