diff options
author | Martin Stransky <stransky@redhat.com> | 2019-11-27 11:49:25 +0100 |
---|---|---|
committer | Martin Stransky <stransky@redhat.com> | 2019-11-27 11:49:25 +0100 |
commit | 7a6b6c7272fa5f10bef389f6f33b65357f2e351b (patch) | |
tree | 37d05a164cafda3f90017f7ad5bc447ad67b6524 /mozilla-1593408.patch | |
parent | Merge branch 'master' into f31 (diff) | |
parent | Added fix for mozilla#1593408 (diff) | |
download | librewolf-fedora-ff-7a6b6c7272fa5f10bef389f6f33b65357f2e351b.tar.gz librewolf-fedora-ff-7a6b6c7272fa5f10bef389f6f33b65357f2e351b.tar.bz2 librewolf-fedora-ff-7a6b6c7272fa5f10bef389f6f33b65357f2e351b.zip |
Merge branch 'master' into f31
Diffstat (limited to 'mozilla-1593408.patch')
-rw-r--r-- | mozilla-1593408.patch | 76 |
1 files changed, 76 insertions, 0 deletions
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 = |