summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Deslauriers <[email protected]>2025-01-30 09:09:40 -0500
committerLuke from DC <[email protected]>2025-02-11 03:26:58 +0000
commit75032aef04ba5326d29c7b594abe1d51491c376e (patch)
treef3014ce3fe7bdd8df63bfbb2db18ee2bc34d8c34
parent72e5c2e229d66718c54b2e0b851062051c6cb5e8 (diff)
downloadpluma-75032aef04ba5326d29c7b594abe1d51491c376e.tar.bz2
pluma-75032aef04ba5326d29c7b594abe1d51491c376e.tar.xz
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)
-rw-r--r--pluma/pluma-window.c3
1 files changed, 1 insertions, 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);
}