summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firefox.spec10
-rw-r--r--mozilla-1568569.patch73
2 files changed, 79 insertions, 4 deletions
diff --git a/firefox.spec b/firefox.spec
index d078dd4..7d72bd6 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -142,6 +142,7 @@ Patch412: mozilla-1337988.patch
Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch
Patch417: bug1375074-save-restore-x28.patch
Patch418: mozilla-1512162.patch
+Patch419: mozilla-1568569.patch
# Wayland specific upstream patches
Patch574: firefox-pipewire.patch
@@ -321,6 +322,10 @@ This package contains results of tests executed during build.
%endif
%patch3 -p1 -b .arm
%patch44 -p1 -b .build-arm-libopus
+# Patch for big endian platforms only
+%if 0%{?big_endian}
+%patch26 -p1 -b .icu
+%endif
# Fedora patches
%patch215 -p1 -b .addons
@@ -340,10 +345,7 @@ This package contains results of tests executed during build.
%patch415 -p1 -b .1238661
%endif
%patch418 -p1 -b .1512162
-# Patch for big endian platforms only
-%if 0%{?big_endian}
-%patch26 -p1 -b .icu
-%endif
+%patch419 -p1 -b .1568569
# Wayland specific upstream patches
%patch574 -p1 -b .firefox-pipewire
diff --git a/mozilla-1568569.patch b/mozilla-1568569.patch
new file mode 100644
index 0000000..ab6225a
--- /dev/null
+++ b/mozilla-1568569.patch
@@ -0,0 +1,73 @@
+diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
+--- a/widget/gtk/nsWindow.cpp
++++ b/widget/gtk/nsWindow.cpp
+@@ -3238,16 +3238,18 @@ void nsWindow::OnWindowStateEvent(GtkWid
+ // We don't care about anything but changes in the maximized/icon/fullscreen
+ // states
+ if ((aEvent->changed_mask &
+ (GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED |
+ GDK_WINDOW_STATE_FULLSCREEN)) == 0) {
+ return;
+ }
+
++ nsSizeMode lastSizeState = mSizeState;
++
+ if (aEvent->new_window_state & GDK_WINDOW_STATE_ICONIFIED) {
+ LOG(("\tIconified\n"));
+ mSizeState = nsSizeMode_Minimized;
+ #ifdef ACCESSIBILITY
+ DispatchMinimizeEventAccessible();
+ #endif // ACCESSIBILITY
+ } else if (aEvent->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) {
+ LOG(("\tFullscreen\n"));
+@@ -3261,16 +3263,28 @@ void nsWindow::OnWindowStateEvent(GtkWid
+ } else {
+ LOG(("\tNormal\n"));
+ mSizeState = nsSizeMode_Normal;
+ #ifdef ACCESSIBILITY
+ DispatchRestoreEventAccessible();
+ #endif // ACCESSIBILITY
+ }
+
++ // Fullscreen video playback may generate bogus alpha values which blends
++ // with desktop background in fullscreen video playback (Bug 1568569).
++ // As a workaround enable to draw mShell background in fullscreen mode
++ // if we draw to mContainer.
++ if (gtk_widget_get_has_window(GTK_WIDGET(mContainer))) {
++ if (mSizeState == nsSizeMode_Fullscreen) {
++ gtk_widget_set_app_paintable(mShell, FALSE);
++ } else if (lastSizeState == nsSizeMode_Fullscreen) {
++ gtk_widget_set_app_paintable(mShell, TRUE);
++ }
++ }
++
+ if (mWidgetListener) {
+ mWidgetListener->SizeModeChanged(mSizeState);
+ if (aEvent->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) {
+ mWidgetListener->FullscreenChanged(aEvent->new_window_state &
+ GDK_WINDOW_STATE_FULLSCREEN);
+ }
+ }
+
+@@ -3787,16 +3801,21 @@ nsresult nsWindow::Create(nsIWidget* aPa
+ eventWidget = (drawToContainer) ? container : mShell;
+
+ // Prevent GtkWindow from painting a background to avoid flickering.
+ gtk_widget_set_app_paintable(eventWidget, TRUE);
+
+ gtk_widget_add_events(eventWidget, kEvents);
+ if (drawToContainer) {
+ gtk_widget_add_events(mShell, GDK_PROPERTY_CHANGE_MASK);
++ // Don't paint mShell background when we draw to mContainer.
++ // Otherwise we see mShell backround to shine through
++ // mContainer (Bug 1507608).
++ // But it may also lead to various bugs where mContainer has unintended
++ // transparent parts which blend with underlying desktop (Bug 1516224).
+ gtk_widget_set_app_paintable(mShell, TRUE);
+ }
+ if (mTransparencyBitmapForTitlebar) {
+ moz_container_force_default_visual(mContainer);
+ }
+
+ // If we draw to mContainer window then configure it now because
+ // gtk_container_add() realizes the child widget.
bgstack15