From b18fda39cd00e81e3d7d9801fc9e8948405b312bab53f6ef2af74652d18d6ac0 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Wed, 29 Dec 2021 09:38:41 +0000 Subject: [PATCH] Accepting request 943030 from home:iznogood:branches:mozilla:Factory - Add upstream patches: * mozilla-bmo1745560.patch: Fix build against wayland 1.20. * mozilla-bmo1744896.patch: Create WaylandVsyncSource on window creation OBS-URL: https://build.opensuse.org/request/show/943030 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=949 --- MozillaFirefox.changes | 8 ++++++++ MozillaFirefox.spec | 4 ++++ mozilla-bmo1744896.patch | 43 ++++++++++++++++++++++++++++++++++++++++ mozilla-bmo1745560.patch | 15 ++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 mozilla-bmo1744896.patch create mode 100644 mozilla-bmo1745560.patch diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index 21a8e29..885e378 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Dec 28 17:45:28 UTC 2021 - Bjørn Lie + +- Add upstream patches: + * mozilla-bmo1745560.patch: Fix build against wayland 1.20. + * mozilla-bmo1744896.patch: Create WaylandVsyncSource on window + creation + ------------------------------------------------------------------- Fri Dec 17 13:49:16 UTC 2021 - Wolfgang Rosenauer diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index 699c5d6..ba81ef3 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -223,6 +223,8 @@ Patch27: mozilla-s390x-skia-gradient.patch Patch28: mozilla-libavcodec58_91.patch Patch29: mozilla-silence-no-return-type.patch Patch31: mozilla-bmo531915.patch +Patch32: mozilla-bmo1745560.patch +Patch33: mozilla-bmo1744896.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch @@ -351,6 +353,8 @@ cd $RPM_BUILD_DIR/%{srcname}-%{orig_version} %patch28 -p1 %patch29 -p1 %patch31 -p1 +%patch32 -p1 +%patch33 -p1 # Firefox %patch101 -p1 %patch102 -p1 diff --git a/mozilla-bmo1744896.patch b/mozilla-bmo1744896.patch new file mode 100644 index 0000000..46b2607 --- /dev/null +++ b/mozilla-bmo1744896.patch @@ -0,0 +1,43 @@ +diff -up firefox-95.0.2/widget/gtk/nsWindow.cpp.1744896 firefox-95.0.2/widget/gtk/nsWindow.cpp +--- firefox-95.0.2/widget/gtk/nsWindow.cpp.1744896 2021-12-23 11:54:31.522539340 +0100 ++++ firefox-95.0.2/widget/gtk/nsWindow.cpp 2021-12-23 11:55:56.070270174 +0100 +@@ -5765,6 +5765,17 @@ nsresult nsWindow::Create(nsIWidget* aPa + } + } + #endif ++#ifdef MOZ_WAYLAND ++ // Initialize the window specific VsyncSource early in order to avoid races ++ // with BrowserParent::UpdateVsyncParentVsyncSource(). ++ // Only use for toplevel windows for now, see bug 1619246. ++ if (GdkIsWaylandDisplay() && ++ StaticPrefs::widget_wayland_vsync_enabled_AtStartup() && ++ mWindowType == eWindowType_toplevel) { ++ mWaylandVsyncSource = new WaylandVsyncSource(); ++ MOZ_RELEASE_ASSERT(mWaylandVsyncSource); ++ } ++#endif + + // We create input contexts for all containers, except for + // toplevel popup windows +@@ -6077,19 +6088,12 @@ void nsWindow::ResumeCompositorFromCompo + + void nsWindow::WaylandStartVsync() { + #ifdef MOZ_WAYLAND +- // only use for toplevel windows for now - see bug 1619246 +- if (!GdkIsWaylandDisplay() || +- !StaticPrefs::widget_wayland_vsync_enabled_AtStartup() || +- mWindowType != eWindowType_toplevel) { ++ if (!mWaylandVsyncSource) { + return; + } + + LOG("nsWindow::WaylandStartVsync() [%p]\n", (void*)this); + +- if (!mWaylandVsyncSource) { +- mWaylandVsyncSource = new WaylandVsyncSource(); +- } +- + WaylandVsyncSource::WaylandDisplay& display = + static_cast( + mWaylandVsyncSource->GetGlobalDisplay()); + diff --git a/mozilla-bmo1745560.patch b/mozilla-bmo1745560.patch new file mode 100644 index 0000000..d372949 --- /dev/null +++ b/mozilla-bmo1745560.patch @@ -0,0 +1,15 @@ +diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c +--- a/widget/gtk/mozwayland/mozwayland.c ++++ b/widget/gtk/mozwayland/mozwayland.c +@@ -200,3 +200,10 @@ + + MOZ_EXPORT void wl_list_insert_list(struct wl_list* list, + struct wl_list* other) {} ++ ++MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags( ++ struct wl_proxy* proxy, uint32_t opcode, ++ const struct wl_interface* interface, uint32_t version, uint32_t flags, ++ ...) { ++ return NULL; ++} +