firefox/mozilla-1568569.patch

44 lines
1.9 KiB
Diff
Raw Normal View History

2019-08-29 08:44:36 +00:00
diff -up firefox-69.0/widget/gtk/nsWindow.cpp.1568569 firefox-69.0/widget/gtk/nsWindow.cpp
--- firefox-69.0/widget/gtk/nsWindow.cpp.1568569 2019-08-29 09:42:10.484631750 +0200
+++ firefox-69.0/widget/gtk/nsWindow.cpp 2019-08-29 09:49:35.371121273 +0200
@@ -3252,6 +3252,8 @@ void nsWindow::OnWindowStateEvent(GtkWid
2019-07-24 16:31:18 +00:00
return;
}
+ nsSizeMode lastSizeState = mSizeState;
+
if (aEvent->new_window_state & GDK_WINDOW_STATE_ICONIFIED) {
LOG(("\tIconified\n"));
mSizeState = nsSizeMode_Minimized;
2019-08-29 08:44:36 +00:00
@@ -3275,6 +3277,18 @@ void nsWindow::OnWindowStateEvent(GtkWid
2019-07-24 16:31:18 +00:00
#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) {
2019-08-29 08:44:36 +00:00
@@ -3800,6 +3814,11 @@ nsresult nsWindow::Create(nsIWidget* aPa
2019-07-24 16:31:18 +00:00
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) {