Bug 1525874 - [Linux/Gtk+] When mozilla.widget.use-argb-visuals is set disable toplevel window shape mask, r=lsalzman
authorMartin Stransky <stransky@redhat.com>
Thu, 07 Feb 2019 14:13:34 +0000
changeset 457619 7e88e78b389830b2d335b5f5be83bb446a9c2d7c
parent 457618 904d06bacb8f5a5593165fd10bfca302a4059db4
child 457620 2fac327be8ce74768e2a26adb2e52195e20748ec
push id35516
push userrmaries@mozilla.com
push dateFri, 08 Feb 2019 04:23:26 +0000
treeherdermozilla-central@d599d1a73a3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1525874
milestone67.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 1525874 - [Linux/Gtk+] When mozilla.widget.use-argb-visuals is set disable toplevel window shape mask, r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D18947
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3289,16 +3289,25 @@ nsresult nsWindow::Create(nsIWidget *aPa
         // and enable it by default for selected window managers.
         needsAlphaVisual = TopLevelWindowUseARGBVisual();
         if (needsAlphaVisual && mIsX11Display && !shouldAccelerate) {
           // We want to draw a transparent titlebar but we can't use
           // ARGB visual due to Bug 1516224.
           // We use ARGB visual for mShell only and shape mask
           // for mContainer where is all our content drawn.
           mTransparencyBitmapForTitlebar = true;
+        }
+
+        // When mozilla.widget.use-argb-visuals is set don't use shape mask.
+        if (mTransparencyBitmapForTitlebar &&
+            Preferences::GetBool("mozilla.widget.use-argb-visuals", false)) {
+          mTransparencyBitmapForTitlebar = false;
+        }
+
+        if (mTransparencyBitmapForTitlebar) {
           mCSDSupportLevel = CSD_SUPPORT_CLIENT;
         }
       }
 
       bool isSetVisual = false;
       // If using WebRender on X11, we need to select a visual with a depth
       // buffer, as well as an alpha channel if transparency is requested. This
       // must be done before the widget is realized.