Bug 1578652 - Add a comment pointing to a gross gtk resize workaround. r=stransky
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 04 Sep 2019 08:18:12 +0000
changeset 491632 997689901e41bc755161e86e9ed9edfa76e0e855
parent 491631 dc731a3f75986af84dcd2bd4acb645725806230d
child 491633 de9dfc1b30b02f5da547fa333736021afdc609dd
push id36532
push usercbrindusan@mozilla.com
push dateWed, 04 Sep 2019 16:29:47 +0000
treeherdermozilla-central@d23599eaa057 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstransky
bugs1578652
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1578652 - Add a comment pointing to a gross gtk resize workaround. r=stransky This was fixed upstream, so we can eventually remove this. Having the issue number makes it much nicer to figure out when is the right time to remove it. Differential Revision: https://phabricator.services.mozilla.com/D44624
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3237,16 +3237,18 @@ void nsWindow::OnWindowStateEvent(GtkWid
   //
   // In order to provide a sensible size for the window when the user exits
   // 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);
   }