Bug 801301 - Fix popup submenus opening behind their parent on Windows XP. r=roc
authorJames H <jh.dev0@gmail.com>
Sun, 14 Oct 2012 18:04:05 -0400
changeset 110600 69e943a96a429913bc4a11322cb21456cdef83e2
parent 110599 55d64487e54a85cd634aa2a226b56b8c611e1ab4
child 110601 a25b864146d19835001ecd6bdee7e1a820a3f776
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs801301
milestone19.0a1
Bug 801301 - Fix popup submenus opening behind their parent on Windows XP. r=roc
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -483,17 +483,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) {