зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1620973 [Wayland] Make opaque regions configurable by widget.wayland.use-opaque-region, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D65988 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fd2afd2541
Коммит
d96c7ebdd5
|
@ -4018,6 +4018,7 @@ pref("network.psl.onUpdate_notify", false);
|
|||
#endif
|
||||
#ifdef MOZ_WAYLAND
|
||||
pref("widget.wayland_vsync.enabled", false);
|
||||
pref("widget.wayland.use-opaque-region", true);
|
||||
#endif
|
||||
|
||||
// All the Geolocation preferences are here.
|
||||
|
|
|
@ -333,6 +333,7 @@ static bool gBlockActivateEvent = false;
|
|||
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 @@ wl_region* CreateOpaqueRegionWayland(int aX, int aY, int aWidth, int aHeight,
|
|||
}
|
||||
|
||||
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 @@ static nsresult initialize_prefs(void) {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче