For hidden window focus() should do nothing

This commit is contained in:
Cheng Zhao 2016-07-05 10:34:52 +09:00
parent de502d8012
commit 41b8dda071

View file

@ -335,6 +335,10 @@ void NativeWindowViews::CloseImmediately() {
} }
void NativeWindowViews::Focus(bool focus) { void NativeWindowViews::Focus(bool focus) {
// For hidden window focus() should do nothing.
if (!IsVisible())
return;
if (focus) { if (focus) {
#if defined(OS_WIN) #if defined(OS_WIN)
window_->Activate(); window_->Activate();