header bar: Use GdkEvent API

This commit is contained in:
Matthias Clasen 2017-08-26 10:55:16 -04:00 committed by Carlos Garnacho
parent 50701abcc3
commit 67489349a5

View File

@ -1801,8 +1801,10 @@ window_state_changed (GtkWidget *window,
gpointer data) gpointer data)
{ {
GtkHeaderBar *bar = GTK_HEADER_BAR (data); GtkHeaderBar *bar = GTK_HEADER_BAR (data);
GdkWindowState changed, new_state;
if (event->changed_mask & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_TILED)) gdk_event_get_window_state ((GdkEvent *)event, &changed, &new_state);
if (changed & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_TILED))
_gtk_header_bar_update_window_buttons (bar); _gtk_header_bar_update_window_buttons (bar);
return FALSE; return FALSE;