diff --git a/disable-vsync-for-kiosk.patch b/disable-vsync-for-kiosk.patch new file mode 100644 index 0000000..8e6225b --- /dev/null +++ b/disable-vsync-for-kiosk.patch @@ -0,0 +1,18 @@ +diff -up firefox-128.8.0/widget/gtk/nsWindow.cpp.kiosk-vsync firefox-128.8.0/widget/gtk/nsWindow.cpp +--- firefox-128.8.0/widget/gtk/nsWindow.cpp.kiosk-vsync 2025-03-13 13:04:03.112498669 +0100 ++++ firefox-128.8.0/widget/gtk/nsWindow.cpp 2025-03-13 13:06:13.227823446 +0100 +@@ -6348,9 +6348,13 @@ nsresult nsWindow::Create(nsIWidget* aPa + // Initialize the window specific VsyncSource early in order to avoid races + // with BrowserParent::UpdateVsyncParentVsyncDispatcher(). + // Only use for toplevel windows for now, see bug 1619246. ++ // ++ // Disable vsync for the kiosk mode - it cause the black screen ++ // This will be fixed in Firefox 140 + if (GdkIsWaylandDisplay() && + StaticPrefs::widget_wayland_vsync_enabled_AtStartup() && +- IsTopLevelWindowType()) { ++ IsTopLevelWindowType() && ++ !gKioskMode ) { + mWaylandVsyncSource = new WaylandVsyncSource(this); + mWaylandVsyncDispatcher = new VsyncDispatcher(mWaylandVsyncSource); + LOG_VSYNC(" created WaylandVsyncSource"); diff --git a/firefox.spec b/firefox.spec index 383b75d..c572348 100644 --- a/firefox.spec +++ b/firefox.spec @@ -244,6 +244,9 @@ Patch09: rhbz-2131158-webrtc-nss-fix.patch Patch10: build-ffvpx.patch Patch11: build-disable-gamepad.patch Patch12: firefox-system-nss-replace-xyber-with-mlkem.patch +# Enabled vsync cause the black screen when running in Kiosk mode +# This will be fixed in Firefox 140 +Patch13: disable-vsync-for-kiosk.patch # -- Upstreamed patches -- Patch51: mozilla-bmo1170092.patch @@ -1222,6 +1225,7 @@ echo "--------------------------------------------" %if 0%{?rhel} == 10 %patch -P12 -p1 -b .system-nss-replace-xyber-with-mlkem %endif +%patch -P13 -p1 -b .kiosk-vsync # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with_wasi_sdk}