From 75032aef04ba5326d29c7b594abe1d51491c376e Mon Sep 17 00:00:00 2001 From: Marc Deslauriers Date: Thu, 30 Jan 2025 09:09:40 -0500 Subject: Do not use the window allocation to save the window size Using the window allocation directly causes the window size to grow each time pluma is opened as it includes window decorations. Use gtk_window_get_size() instead, as recommended in the GTK documentation. (see https://docs.gtk.org/gtk3/method.Window.set_default_size.html) --- pluma/pluma-window.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index a8e4be81..a613beb0 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -291,8 +291,7 @@ pluma_window_configure_event (GtkWidget *widget, { PlumaWindow *window = PLUMA_WINDOW (widget); - window->priv->width = event->width; - window->priv->height = event->height; + gtk_window_get_size(GTK_WINDOW (widget), &window->priv->width, &window->priv->height); return GTK_WIDGET_CLASS (pluma_window_parent_class)->configure_event (widget, event); } -- cgit v1.2.1