Bug 1170312 - Don't let the desktop background influence the vibrancy effect's backdrop for context menus. r?spohl draft
authorMarkus Stange <mstange@themasta.com>
Thu, 22 Feb 2018 23:35:33 -0500
changeset 758862 a8438503edd8438c171a08cf25942e417875d018
parent 758861 0954f16b7263a5b6837714c07b2bae6cab7f25b6
child 760589 e74214388c107624463ae5e6e0fe9bdcfdf4cc97
push id100196
push userbmo:mstange@themasta.com
push dateFri, 23 Feb 2018 04:37:17 +0000
reviewersspohl
bugs1170312
milestone60.0a1
Bug 1170312 - Don't let the desktop background influence the vibrancy effect's backdrop for context menus. r?spohl MozReview-Commit-ID: FKLVouZg8ac
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -3957,16 +3957,25 @@ TitlebarDrawCallback(void* aInfo, CGCont
 
   mIsContextMenu = false;
   return [super initWithContentRect:contentRect styleMask:styleMask
           backing:bufferingType defer:deferCreation];
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
 }
 
+// Override the private API _backdropBleedAmount. This determines how much the
+// desktop wallpaper contributes to the vibrancy backdrop.
+// Return 0 in order to match what the system does for sheet windows and
+// _NSPopoverWindows.
+- (CGFloat)_backdropBleedAmount
+{
+  return 0.0;
+}
+
 - (BOOL)isContextMenu
 {
   return mIsContextMenu;
 }
 
 - (void)setIsContextMenu:(BOOL)flag
 {
   mIsContextMenu = flag;