updated mozilla-1623106.patch

This commit is contained in:
Martin Stransky 2020-03-18 21:51:06 +01:00
parent f610b4b283
commit b7fec52e4d
2 changed files with 47 additions and 6 deletions

View File

@ -118,7 +118,7 @@ ExcludeArch: s390x
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 74.0
Release: 10%{?nss_tag}%{?dist}
Release: 11%{?nss_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@ -964,7 +964,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Tue Mar 17 2020 Martin Stransky <stransky@redhat.com> - 74.0-10
* Tue Mar 17 2020 Martin Stransky <stransky@redhat.com> - 74.0-11
- Added fix for mozbz#1623106
* Tue Mar 17 2020 Martin Stransky <stransky@redhat.com> - 74.0-9

View File

@ -1,16 +1,22 @@
changeset: 520675:823e745af09e
changeset: 521153:1bef33e1956a
tag: tip
parent: 521144:5bfecf5aff6d
user: Martin Stransky <stransky@redhat.com>
date: Tue Mar 17 21:27:52 2020 +0100
date: Tue Mar 17 21:22:44 2020 +0100
files: widget/gtk/nsWindow.cpp
description:
dd2
Bug 1623106 [Linux/Gtk] Don't use window resize workaround for Gtk >= 3.24, r?jhorak
We have a workaround for https://gitlab.gnome.org/GNOME/gtk/issues/1044 which is already fixed
in Gtk 3.24 and causes resize regression there so let's remove it.
Differential Revision: https://phabricator.services.mozilla.com/D67387
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2740,16 +2739,18 @@ void nsWindow::OnContainerUnrealize() {
@@ -2739,16 +2739,18 @@ void nsWindow::OnContainerUnrealize() {
}
}
@ -29,4 +35,39 @@ diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
// Invalidate the new part of the window now for the pending paint to
// minimize background flashes (GDK does not do this for external resizes
@@ -3524,23 +3526,27 @@ void nsWindow::OnWindowStateEvent(GtkWid
// maximized state, we hide the GDK_WINDOW_STATE_MAXIMIZED change from
// gtk_window_state_event() so as to trick GTK into using the values from
// gtk_window_resize() in its configure request.
//
// We instead notify gtk_window_state_event() of the maximized state change
// once the window is shown.
//
// See https://gitlab.gnome.org/GNOME/gtk/issues/1044
- if (!mIsShown) {
- aEvent->changed_mask = static_cast<GdkWindowState>(
- aEvent->changed_mask & ~GDK_WINDOW_STATE_MAXIMIZED);
- } else if (aEvent->changed_mask & GDK_WINDOW_STATE_WITHDRAWN &&
- aEvent->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) {
- aEvent->changed_mask = static_cast<GdkWindowState>(
- aEvent->changed_mask | GDK_WINDOW_STATE_MAXIMIZED);
+ //
+ // This is fixed in Gtk 3.24+
+ if (gtk_check_version(3, 24) != nullptr) {
+ if (!mIsShown) {
+ aEvent->changed_mask = static_cast<GdkWindowState>(
+ aEvent->changed_mask & ~GDK_WINDOW_STATE_MAXIMIZED);
+ } else if (aEvent->changed_mask & GDK_WINDOW_STATE_WITHDRAWN &&
+ aEvent->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) {
+ aEvent->changed_mask = static_cast<GdkWindowState>(
+ aEvent->changed_mask | GDK_WINDOW_STATE_MAXIMIZED);
+ }
}
// This is a workaround for https://gitlab.gnome.org/GNOME/gtk/issues/1395
// Gtk+ controls window active appearance by window-state-event signal.
if (mDrawInTitlebar && (aEvent->changed_mask & GDK_WINDOW_STATE_FOCUSED)) {
// Emulate what Gtk+ does at gtk_window_state_event().
// We can't check GTK_STATE_FLAG_BACKDROP directly as it's set by Gtk+
// *after* this window-state-event handler.