Bug 1523721 - [Linux/Gtk+] Continue processing window_state_event handler when titlebar is updated. r=dao, a=RyanVM
authorMartin Stransky <stransky@redhat.com>
Tue, 05 Feb 2019 15:07:51 +0000
changeset 515809 f15609e45c76e7186fbcf26eadebd4a75e484264
parent 515808 f8aadf41dcd052cf78272d82fd262094a8e26567
child 515810 4e7796daf83876341131ecde49e8d38d4989d4c0
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, RyanVM
bugs1523721
milestone66.0
Bug 1523721 - [Linux/Gtk+] Continue processing window_state_event handler when titlebar is updated. r=dao, a=RyanVM Recently we quit nsWindow::OnWindowStateEvent()/window_state_event handler when titlebar needs an update due to focus change. That's incorrect as we need to process other information from the handler - maxminized/normal window state. Differential Revision: https://phabricator.services.mozilla.com/D18681
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2930,17 +2930,16 @@ void nsWindow::OnWindowStateEvent(GtkWid
   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.
     mTitlebarBackdropState =
         !(aEvent->new_window_state & GDK_WINDOW_STATE_FOCUSED);
 
     ForceTitlebarRedraw();
-    return;
   }
 
   // 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;