[gtk/matthiasc/for-master] window: Fix state updates
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] window: Fix state updates
- Date: Fri, 23 Oct 2020 15:54:08 +0000 (UTC)
commit 10d7ccc8e0ecfc267b8e3f803abb6bd04eb628a9
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 23 11:51:02 2020 -0400
window: Fix state updates
When the compositor unmaximized the window, we get a
state-changed signal, and we update the maximized field.
But then we go and recompute our layout based on the
maximize_initially field, and that is still TRUE, when
we were maximized initially. So we need to update both
fields.
This fixes a problem where using the window menu to
unmaximize an initially maximized window would not
work.
Fixes: #3226
gtk/gtkwindow.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 3f59e4e02c..feec52aa22 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4702,11 +4702,16 @@ surface_state_changed (GtkWidget *widget)
}
if (changed_mask & GDK_TOPLEVEL_STATE_FULLSCREEN)
- priv->fullscreen = (new_surface_state & GDK_TOPLEVEL_STATE_FULLSCREEN) ? TRUE : FALSE;
+ {
+ priv->fullscreen = (new_surface_state & GDK_TOPLEVEL_STATE_FULLSCREEN) ? TRUE : FALSE;
+ priv->fullscreen_initially = priv->fullscreen;
+ }
if (changed_mask & GDK_TOPLEVEL_STATE_MAXIMIZED)
{
priv->maximized = (new_surface_state & GDK_TOPLEVEL_STATE_MAXIMIZED) ? TRUE : FALSE;
+ priv->maximize_initially = priv->maximized;
+
g_object_notify_by_pspec (G_OBJECT (widget), window_props[PROP_IS_MAXIMIZED]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]