]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Fixes stopping FlashFrame, closes #906
authorCheng Zhao <zcbenz@gmail.com>
Tue, 16 Dec 2014 01:27:58 +0000 (17:27 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 16 Dec 2014 01:27:58 +0000 (17:27 -0800)
atom/browser/native_window_views.cc

index 80fcfc539c26ead2a84e35a42acbd1cabc2ba867..93b73f58446a029ddfa1fd1815d05ec2ec965032 100644 (file)
@@ -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);
 }