Bug 1615098 [Wayland] Set opaque region to toplevel window only, r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D66583

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Stransky 2020-03-13 08:26:00 +00:00
Родитель 7ba24289ce
Коммит 48832a9055
1 изменённых файлов: 7 добавлений и 13 удалений

Просмотреть файл

@ -4952,24 +4952,18 @@ void nsWindow::UpdateTopLevelOpaqueRegionWayland(bool aSubtractCorners) {
return;
}
// Set opaque region to toplevel window only in fullscreen mode.
bool fullScreen = mSizeState != nsSizeMode_Normal && !mIsTiled;
if (fullScreen) {
wl_region* region =
CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
wl_surface_set_opaque_region(surface, region);
wl_region_destroy(region);
} else {
wl_surface_set_opaque_region(surface, nullptr);
}
wl_region* region =
CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
wl_surface_set_opaque_region(surface, region);
wl_region_destroy(region);
// TODO -> create a function for it
GdkWindow* window = gtk_widget_get_window(mShell);
if (window) {
gdk_window_invalidate_rect(window, &rect, false);
}
moz_container_update_opaque_region(mContainer, aSubtractCorners, fullScreen);
// We don't set opaque region to mozContainer due to Bug 1615098.
// moz_container_update_opaque_region(mContainer, aSubtractCorners,
// fullScreen);
}
#endif