diff --git a/D163310.diff b/D163310.diff new file mode 100644 index 0000000..bad1f17 --- /dev/null +++ b/D163310.diff @@ -0,0 +1,58 @@ +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -3029,11 +3029,11 @@ + #endif + } + + void nsWindow::SetUserTimeAndStartupTokenForActivatedWindow() { + nsGTKToolkit* toolkit = nsGTKToolkit::GetToolkit(); +- if (!toolkit) { ++ if (!toolkit || MOZ_UNLIKELY(mWindowType == eWindowType_invisible)) { + return; + } + + mWindowActivationTokenFromEnv = toolkit->GetStartupToken(); + if (!mWindowActivationTokenFromEnv.IsEmpty()) { +@@ -6614,30 +6614,34 @@ + return; + } + } + } + // Set up usertime/startupID metadata for the created window. +- if (mWindowType != eWindowType_invisible) { ++ // On X11 we use gtk_window_set_startup_id() so we need to call it ++ // before show. ++ if (GdkIsX11Display()) { + SetUserTimeAndStartupTokenForActivatedWindow(); + } + if (GdkIsWaylandDisplay()) { + if (IsWaylandPopup()) { + ShowWaylandPopupWindow(); + } else { + ShowWaylandToplevelWindow(); + } ++ } else { ++ LOG(" calling gtk_widget_show(mShell)\n"); ++ gtk_widget_show(mShell); ++ } ++ if (GdkIsWaylandDisplay()) { ++ SetUserTimeAndStartupTokenForActivatedWindow(); + #ifdef MOZ_WAYLAND + auto token = std::move(mWindowActivationTokenFromEnv); + if (!token.IsEmpty()) { + FocusWaylandWindow(token.get()); + } + #endif +- } else { +- LOG(" calling gtk_widget_show(mShell)\n"); +- gtk_widget_show(mShell); +- } +- ++ } + if (mHiddenPopupPositioned && IsPopup()) { + LOG(" re-position hidden popup window"); + gtk_window_move(GTK_WINDOW(mShell), mPopupPosition.x, mPopupPosition.y); + mHiddenPopupPositioned = false; + } + diff --git a/firefox.spec b/firefox.spec index 95c33c4..6292b72 100644 --- a/firefox.spec +++ b/firefox.spec @@ -230,6 +230,7 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch +Patch79: D163310.diff # Test patches # Generate without context by @@ -506,6 +507,7 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 +%patch79 -p1 -b .D163310 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell