Added fix for mozilla#1593408
This commit is contained in:
parent
5297420163
commit
a947f30c04
@ -160,6 +160,7 @@ Patch425: D53965-dropdown-missing-on-multimonitor.diff
|
|||||||
# Wayland specific upstream patches
|
# Wayland specific upstream patches
|
||||||
Patch574: firefox-pipewire.patch
|
Patch574: firefox-pipewire.patch
|
||||||
Patch590: firefox-wayland-cache-missing.patch
|
Patch590: firefox-wayland-cache-missing.patch
|
||||||
|
Patch591: mozilla-1593408.patch
|
||||||
|
|
||||||
# PGO/LTO patches
|
# PGO/LTO patches
|
||||||
Patch600: pgo.patch
|
Patch600: pgo.patch
|
||||||
@ -372,6 +373,7 @@ This package contains results of tests executed during build.
|
|||||||
# Wayland specific upstream patches
|
# Wayland specific upstream patches
|
||||||
%patch574 -p1 -b .firefox-pipewire
|
%patch574 -p1 -b .firefox-pipewire
|
||||||
%patch590 -p1 -b .cache-missing
|
%patch590 -p1 -b .cache-missing
|
||||||
|
%patch591 -p1 -b .mozilla-1593408
|
||||||
|
|
||||||
# PGO patches
|
# PGO patches
|
||||||
%patch600 -p1 -b .pgo
|
%patch600 -p1 -b .pgo
|
||||||
|
76
mozilla-1593408.patch
Normal file
76
mozilla-1593408.patch
Normal file
@ -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 =
|
Loading…
Reference in New Issue
Block a user