Bug 610713 - Fix popup menus leaving behind artifacts when using hardware acceleration and a basic Windows theme. r=jmathies
authorJames H <jh.dev0@gmail.com>
Thu, 13 Sep 2012 21:31:53 -0400
changeset 115889 2d39dbbe75b3205e36219acbba451066feb10b51
parent 115888 65b95ed309b948dbd8aa2fcd79a98ebee7395eee
child 115890 7c119b50e7aa02965dcb82fd134f6fe467c4a7d3
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)
reviewersjmathies
bugs610713
milestone18.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 610713 - Fix popup menus leaving behind artifacts when using hardware acceleration and a basic Windows theme. r=jmathies
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -476,18 +476,23 @@ nsWindow::Create(nsIWidget *aParent,
   }
 
   mIsRTL = aInitData->mRTL;
 
   DWORD style = WindowStyle();
   DWORD extendedStyle = WindowExStyle();
 
   if (mWindowType == eWindowType_popup) {
-    if (!aParent)
+    if (!aParent) {
       parent = NULL;
+    }
+
+    if (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) {
     // Make sure CreateWindowEx succeeds at creating a toplevel window
     style &= ~0x40000000; // WS_CHILDWINDOW