Bug 801301 - Fix popup submenus opening behind their parent on Windows XP. r=roc, a=bajaj
authorJames H <jh.dev0@gmail.com>
Sun, 14 Oct 2012 18:04:05 -0400
changeset 116236 f4d50878e6b6b1fe2bc0837b33c5a95cb045bb22
parent 116235 6f7d1e8c941bbbd1bb4e826d95ab52f8a9bad5d8
child 116237 59b71be6285e159c0b9b7563d729704439b53aee
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, bajaj
bugs801301
milestone18.0a2
Bug 801301 - Fix popup submenus opening behind their parent on Windows XP. r=roc, a=bajaj
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -480,17 +480,18 @@ nsWindow::Create(nsIWidget *aParent,
   DWORD style = WindowStyle();
   DWORD extendedStyle = WindowExStyle();
 
   if (mWindowType == eWindowType_popup) {
     if (!aParent) {
       parent = NULL;
     }
 
-    if (mPopupType == ePopupTypeMenu && aInitData->mDropShadow) {
+    if (WinUtils::GetWindowsVersion() >= WinUtils::VISTA_VERSION &&
+        mPopupType == ePopupTypeMenu && aInitData->mDropShadow) {
       extendedStyle |= WS_EX_COMPOSITED;
     }
 
     if (aInitData->mIsDragPopup) {
       // This flag makes the window transparent to mouse events
       extendedStyle |= WS_EX_TRANSPARENT;
     }
   } else if (mWindowType == eWindowType_invisible) {