mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
window: fix initial shadow width for maximized/fullscreen windows
To calculate the shadow width, we look at the value of priv->fullscreen and priv->maximized. Those fields will have the actual value only after GTK receives back a window state event though, so they will be wrong in _realize(). Look at priv->fullscreen_initially and priv->maximize_initially too, to avoid the size changing right after realize, which would make the window flicker if maximized at startup. https://bugzilla.gnome.org/show_bug.cgi?id=747808
This commit is contained in:
parent
5dbccc868e
commit
740bcf5fe0
@ -6006,6 +6006,8 @@ gtk_window_map (GtkWidget *widget)
|
||||
else
|
||||
gdk_window_unmaximize (gdk_window);
|
||||
|
||||
priv->maximize_initially = FALSE;
|
||||
|
||||
if (priv->stick_initially)
|
||||
gdk_window_stick (gdk_window);
|
||||
else
|
||||
@ -6021,6 +6023,8 @@ gtk_window_map (GtkWidget *widget)
|
||||
else
|
||||
gdk_window_unfullscreen (gdk_window);
|
||||
|
||||
priv->fullscreen_initially = FALSE;
|
||||
|
||||
gdk_window_set_keep_above (gdk_window, priv->above_initially);
|
||||
|
||||
gdk_window_set_keep_below (gdk_window, priv->below_initially);
|
||||
@ -6474,7 +6478,9 @@ get_shadow_width (GtkWidget *widget,
|
||||
return;
|
||||
|
||||
if (priv->maximized ||
|
||||
priv->fullscreen)
|
||||
priv->maximize_initially ||
|
||||
priv->fullscreen ||
|
||||
priv->fullscreen_initially)
|
||||
return;
|
||||
|
||||
if (!gtk_widget_is_toplevel (widget))
|
||||
|
Loading…
Reference in New Issue
Block a user