[gtk+] GtkHeaderBar: Reconsider buttons if any tiling state changes



commit bdd2ca9a6015a857c22e1e113dc043a1b6db6137
Author: Simon McVittie <smcv debian org>
Date:   Thu Oct 26 15:57:29 2017 +0100

    GtkHeaderBar: Reconsider buttons if any tiling state changes
    
    Looking at the 1-bit "tiled or not?" state is not necessarily
    enough.
    
    Signed-off-by: Simon McVittie <smcv debian org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789357

 gtk/gtkheaderbar.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index ba8786d..d6ef590 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -1799,7 +1799,13 @@ window_state_changed (GtkWidget           *window,
   GdkWindowState changed, new_state;
 
   gdk_event_get_window_state ((GdkEvent *)event, &changed, &new_state);
-  if (changed & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_TILED))
+  if (changed & (GDK_WINDOW_STATE_FULLSCREEN |
+                 GDK_WINDOW_STATE_MAXIMIZED |
+                 GDK_WINDOW_STATE_TILED |
+                 GDK_WINDOW_STATE_TOP_TILED |
+                 GDK_WINDOW_STATE_RIGHT_TILED |
+                 GDK_WINDOW_STATE_BOTTOM_TILED |
+                 GDK_WINDOW_STATE_LEFT_TILED))
     _gtk_header_bar_update_window_buttons (bar);
 
   return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]