summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2019-11-27 11:48:57 +0100
committerMartin Stransky <stransky@redhat.com>2019-11-27 11:48:57 +0100
commita947f30c04613a79b6bfe91655bf38614540952e (patch)
tree37d05a164cafda3f90017f7ad5bc447ad67b6524
parentTemporary disable gnome shell search provider (diff)
downloadlibrewolf-fedora-ff-a947f30c04613a79b6bfe91655bf38614540952e.tar.gz
librewolf-fedora-ff-a947f30c04613a79b6bfe91655bf38614540952e.tar.bz2
librewolf-fedora-ff-a947f30c04613a79b6bfe91655bf38614540952e.zip
Added fix for mozilla#1593408
-rw-r--r--firefox.spec2
-rw-r--r--mozilla-1593408.patch76
2 files changed, 78 insertions, 0 deletions
diff --git a/firefox.spec b/firefox.spec
index f88d1a4..80f0e1f 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -160,6 +160,7 @@ Patch425: D53965-dropdown-missing-on-multimonitor.diff
# Wayland specific upstream patches
Patch574: firefox-pipewire.patch
Patch590: firefox-wayland-cache-missing.patch
+Patch591: mozilla-1593408.patch
# PGO/LTO patches
Patch600: pgo.patch
@@ -372,6 +373,7 @@ This package contains results of tests executed during build.
# Wayland specific upstream patches
%patch574 -p1 -b .firefox-pipewire
%patch590 -p1 -b .cache-missing
+%patch591 -p1 -b .mozilla-1593408
# PGO patches
%patch600 -p1 -b .pgo
diff --git a/mozilla-1593408.patch b/mozilla-1593408.patch
new file mode 100644
index 0000000..e5b5f46
--- /dev/null
+++ b/mozilla-1593408.patch
@@ -0,0 +1,76 @@
+diff -up firefox-71.0/widget/gtk/mozcontainer.cpp.mozilla-1593408 firefox-71.0/widget/gtk/mozcontainer.cpp
+--- firefox-71.0/widget/gtk/mozcontainer.cpp.mozilla-1593408 2019-11-26 01:02:30.000000000 +0100
++++ firefox-71.0/widget/gtk/mozcontainer.cpp 2019-11-27 11:41:20.539447954 +0100
+@@ -76,6 +76,10 @@ static void moz_container_allocate_child
+ MozContainerChild* child);
+ static MozContainerChild* moz_container_get_child(MozContainer* container,
+ GtkWidget* child);
++#ifdef MOZ_WAYLAND
++static wl_surface* moz_container_get_gtk_container_surface(
++ MozContainer* container);
++#endif
+
+ /* public methods */
+
+@@ -158,6 +162,22 @@ void moz_container_move(MozContainer* co
+ container->subsurface_dx = dx;
+ container->subsurface_dy = dy;
+ container->surface_position_update = true;
++
++ // Wayland subsurface is not created yet.
++ if (!container->subsurface) {
++ return;
++ }
++
++ // wl_subsurface_set_position is actually property of parent surface
++ // which is effective when parent surface is commited.
++ wl_surface* parent_surface =
++ moz_container_get_gtk_container_surface(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;
++ }
+ }
+
+ void moz_container_scale_update(MozContainer* container) {
+@@ -620,18 +640,9 @@ struct wl_surface* moz_container_get_wl_
+ (void*)container->surface));
+ }
+
+- // wl_subsurface_set_position is actually property of parent surface
+- // which is effective when parent surface is commited.
+ if (container->surface_position_update) {
+- wl_surface* parent_surface =
+- moz_container_get_gtk_container_surface(container);
+- if (parent_surface) {
+- wl_subsurface_set_position(container->subsurface,
+- container->subsurface_dx,
+- container->subsurface_dy);
+- wl_surface_commit(parent_surface);
+- container->surface_position_update = true;
+- }
++ moz_container_move(container, container->subsurface_dx,
++ container->subsurface_dy);
+ }
+
+ return container->surface;
+@@ -641,12 +652,12 @@ struct wl_egl_window* moz_container_get_
+ LOGWAYLAND(("%s [%p] eglwindow %p\n", __FUNCTION__, (void*)container,
+ (void*)container->eglwindow));
+
+- if (!container->eglwindow) {
+- wl_surface* surface = moz_container_get_wl_surface(container);
+- if (!surface) {
+- return nullptr;
+- }
++ wl_surface* surface = moz_container_get_wl_surface(container);
++ if (!surface) {
++ return nullptr;
++ }
+
++ if (!container->eglwindow) {
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
+ gint scale = moz_container_get_scale(container);
+ container->eglwindow =
bgstack15