Disable vsync for the kiosk mode

Enabled vsync cased black screen in RHEL10 in kiosk mode. This should be
fixed in the Firefox 140 esr.

Related: RHEL-84235
This commit is contained in:
Jan Horak 2025-03-13 13:11:32 +01:00 committed by Eike Rathke
parent 4b6c5f0000
commit 6e5155866d
2 changed files with 22 additions and 0 deletions

View File

@ -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");

View File

@ -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}