gtk-demo: Fix the size saving for CSD

We need to use gtk_window_get_size to get the correct size that
we can pass to gtk_window_set_default_size regardless of CSD
or not.
This commit is contained in:
Matthias Clasen 2016-02-14 09:29:55 -05:00
parent 601e762973
commit fc90bd5e30

View File

@ -487,10 +487,7 @@ demo_application_window_size_allocate (GtkWidget *widget,
GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation); GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation);
if (!window->maximized && !window->fullscreen) if (!window->maximized && !window->fullscreen)
{ gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
window->width = allocation->width;
window->height = allocation->height;
}
} }
static gboolean static gboolean