Commit 1ecff82e authored by Adrien Plazas's avatar Adrien Plazas
Browse files

gtkwindow: Maximize dialogs when mapping

That is when initially maximized windows are expected to be maximized,
not just before realizing them.
parent c88c7ef2
......@@ -6266,6 +6266,7 @@ gtk_window_map (GtkWidget *widget)
GdkWindow *gdk_window;
GList *link;
GdkDisplay *display;
gboolean is_dialog;
if (!_gtk_widget_is_toplevel (widget))
......@@ -6290,7 +6291,10 @@ gtk_window_map (GtkWidget *widget)
gdk_window = _gtk_widget_get_window (widget);
if (priv->maximize_initially)
/* Transient windows can be considered pseudo-dialogs. */
is_dialog = GTK_IS_DIALOG (widget) || !!gtk_window_get_transient_for (window);
if (priv->maximize_initially ||
(is_dialog && gtk_window_get_resizable (window)))
gdk_window_maximize (gdk_window);
gdk_window_unmaximize (gdk_window);
......@@ -7358,16 +7362,10 @@ gtk_window_realize (GtkWidget *widget)
GtkWindowPrivate *priv;
gint i;
GList *link;
gboolean is_pseudo_dialog;
window = GTK_WINDOW (widget);
priv = window->priv;
is_pseudo_dialog = !GTK_IS_DIALOG (widget) &&
!!gtk_window_get_transient_for (window);
if (is_pseudo_dialog && gtk_window_get_resizable (window))
gtk_window_maximize (window);
if (!priv->client_decorated && gtk_window_should_use_csd (window))
create_decoration (widget);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment