summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firefox.spec3
-rw-r--r--mozilla-1609538.patch69
2 files changed, 72 insertions, 0 deletions
diff --git a/firefox.spec b/firefox.spec
index 0a1602d..418de36 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -184,6 +184,7 @@ Patch422: mozilla-1580174-webrtc-popup.patch
# Wayland specific upstream patches
Patch574: firefox-pipewire.patch
+Patch575: mozilla-1609538.patch
# PGO/LTO patches
Patch600: pgo.patch
@@ -388,6 +389,7 @@ This package contains results of tests executed during build.
# Wayland specific upstream patches
%patch574 -p1 -b .firefox-pipewire
+%patch575 -p1 -b .mozilla-1609538
# PGO patches
%patch600 -p1 -b .pgo
@@ -965,6 +967,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Tue Mar 03 2020 Martin Stransky <stransky@redhat.com> - 74.0-1
- Update to 74.0 Build 1
+- Added mozbz#1609538
* Mon Feb 24 2020 Martin Stransky <stransky@redhat.com> - 73.0.1-4
- Using pipewire-0.2 as buildrequire
diff --git a/mozilla-1609538.patch b/mozilla-1609538.patch
new file mode 100644
index 0000000..eb108db
--- /dev/null
+++ b/mozilla-1609538.patch
@@ -0,0 +1,69 @@
+diff -up firefox-74.0/widget/gtk/mozcontainer.cpp.mozilla-1609538 firefox-74.0/widget/gtk/mozcontainer.cpp
+--- firefox-74.0/widget/gtk/mozcontainer.cpp.mozilla-1609538 2020-03-02 23:04:56.000000000 +0100
++++ firefox-74.0/widget/gtk/mozcontainer.cpp 2020-03-04 12:26:05.561668537 +0100
+@@ -164,13 +164,15 @@ void moz_container_move(MozContainer* co
+
+ // wl_subsurface_set_position is actually property of parent surface
+ // which is effective when parent surface is commited.
+- wl_surface* parent_surface =
+- moz_gtk_widget_get_wl_surface(GTK_WIDGET(container));
+- if (parent_surface) {
+- wl_subsurface_set_position(container->subsurface, container->subsurface_dx,
+- container->subsurface_dy);
+- wl_surface_commit(parent_surface);
+- container->surface_position_needs_update = false;
++ wl_subsurface_set_position(container->subsurface, container->subsurface_dx,
++ container->subsurface_dy);
++ container->surface_position_needs_update = false;
++
++ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
++ if (window) {
++ GdkRectangle rect = (GdkRectangle){.width = gdk_window_get_width(window),
++ .height = gdk_window_get_height(window)};
++ gdk_window_invalidate_rect(window, &rect, false);
+ }
+ }
+
+@@ -575,11 +577,15 @@ static void moz_container_set_opaque_reg
+ gtk_widget_get_allocation(GTK_WIDGET(container), &allocation);
+
+ // Set region to mozcontainer which does not have any offset
+- wl_region* region =
+- CreateOpaqueRegionWayland(0, 0, allocation.width, allocation.height,
+- container->opaque_region_subtract_corners);
+- wl_surface_set_opaque_region(container->surface, region);
+- wl_region_destroy(region);
++ if (container->opaque_region_subtract_corners) {
++ wl_region* region =
++ CreateOpaqueRegionWayland(0, 0, allocation.width, allocation.height,
++ container->opaque_region_subtract_corners);
++ wl_surface_set_opaque_region(container->surface, region);
++ wl_region_destroy(region);
++ } else {
++ wl_surface_set_opaque_region(container->surface, nullptr);
++ }
+ }
+
+ struct wl_surface* moz_container_get_wl_surface(MozContainer* container) {
+diff -up firefox-74.0/widget/gtk/nsWindow.cpp.mozilla-1609538 firefox-74.0/widget/gtk/nsWindow.cpp
+--- firefox-74.0/widget/gtk/nsWindow.cpp.mozilla-1609538 2020-03-04 12:23:34.365414768 +0100
++++ firefox-74.0/widget/gtk/nsWindow.cpp 2020-03-04 12:23:34.368414793 +0100
+@@ -4866,10 +4866,14 @@ void nsWindow::UpdateTopLevelOpaqueRegio
+ return;
+ }
+
+- wl_region* region =
+- CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
+- wl_surface_set_opaque_region(surface, region);
+- wl_region_destroy(region);
++ if (!aSubtractCorners) {
++ 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);
++ }
+
+ GdkWindow* window = gtk_widget_get_window(mShell);
+ if (window) {
bgstack15