mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
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:
parent
601e762973
commit
fc90bd5e30
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user