summaryrefslogtreecommitdiff
path: root/mozilla-1620973.patch
blob: a8361506cf92582143dca80803bbf0a00b209a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4018,6 +4018,7 @@
 #endif
 #ifdef MOZ_WAYLAND
   pref("widget.wayland_vsync.enabled", false);
+  pref("widget.wayland.use-opaque-region", true);
 #endif
 
 // All the Geolocation preferences are here.
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -333,6 +333,7 @@
 static bool gGlobalsInitialized = false;
 static bool gRaiseWindows = true;
 static bool gUseWaylandVsync = false;
+static bool gUseWaylandUseOpaqueRegion = true;
 static GList* gVisibleWaylandPopupWindows = nullptr;
 
 #if GTK_CHECK_VERSION(3, 4, 0)
@@ -4955,6 +4956,10 @@
 }
 
 void nsWindow::UpdateTopLevelOpaqueRegionWayland(bool aSubtractCorners) {
+  if (!gUseWaylandUseOpaqueRegion) {
+    return;
+  }
+
   wl_surface* surface = moz_gtk_widget_get_wl_surface(GTK_WIDGET(mShell));
   if (!surface) {
     return;
@@ -6690,6 +6695,9 @@
       Preferences::GetBool("mozilla.widget.raise-on-setfocus", true);
   gUseWaylandVsync =
       Preferences::GetBool("widget.wayland_vsync.enabled", false);
+  gUseWaylandUseOpaqueRegion =
+      Preferences::GetBool("widget.wayland.use-opaque-region", true);
+
   return NS_OK;
 }
 

bgstack15