Bug 1276120, hide popups when a parent window is being minimized, handles the case where the window is minimized via a keyboard shortcut, r=jmathies
authorNeil Deakin <neil@mozilla.com>
Fri, 03 Jun 2016 13:59:34 -0400
changeset 341497 fefb7adc384abcc33f4da47496787bfdac1c9f85
parent 341496 d935da74d415dcd468f706fd54c5fb52f8122a09
child 341498 981ea1b8f2e741361eeaa2a42bf3c5fe607471e1
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs1276120
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276120, hide popups when a parent window is being minimized, handles the case where the window is minimized via a keyboard shortcut, r=jmathies
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -7515,16 +7515,23 @@ nsWindow::DealWithPopups(HWND aWnd, UINT
       }
 
       // Prevent the click inside the popup from causing a change in window
       // activation. Since the popup is shown non-activated, we need to eat any
       // requests to activate the window while it is displayed. Windows will
       // automatically activate the popup on the mousedown otherwise.
       return true;
 
+    case WM_SHOWWINDOW:
+      // If the window is being minimized, close popups.
+      if (aLParam == SW_PARENTCLOSING) {
+        break;
+      }
+      return false;
+
     case WM_KILLFOCUS:
       // If focus moves to other window created in different process/thread,
       // e.g., a plugin window, popups should be rolled up.
       if (IsDifferentThreadWindow(reinterpret_cast<HWND>(aWParam))) {
         break;
       }
       return false;