From: Cheng Zhao Date: Tue, 16 Dec 2014 01:27:58 +0000 (-0800) Subject: win: Fixes stopping FlashFrame, closes #906 X-Git-Tag: v0.20.1~10 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=cb911b19dd3f3d028648c961db4529ade5ef69f2;p=electron.git win: Fixes stopping FlashFrame, closes #906 --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 80fcfc53..93b73f58 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -489,6 +489,18 @@ std::string NativeWindowViews::GetTitle() { } void NativeWindowViews::FlashFrame(bool flash) { +#if defined(OS_WIN) + // The Chromium's implementation has a bug stopping flash. + if (!flash) { + FLASHWINFO fwi; + fwi.cbSize = sizeof(fwi); + fwi.hwnd = GetAcceleratedWidget(); + fwi.dwFlags = FLASHW_STOP; + fwi.uCount = 0; + FlashWindowEx(&fwi); + return; + } +#endif window_->FlashFrame(flash); }