[gitg] Fix window growing each start
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Fix window growing each start
- Date: Mon, 10 Oct 2022 22:26:43 +0000 (UTC)
commit ec8d97d5c4913fbde63add83a4dce319560dee85
Author: Clayton G. Hobbs <clay lakeserv net>
Date: Sun Oct 9 16:26:45 2016 -0400
Fix window growing each start
As described in bug 771290, the window got slightly larger each time
gitg was run. This was due to the way we accidentally mixed APIs when
saving/restoring the window size.
To fix this, use GtkWindow methods when saving the window size. This
is consistent with our prior use of GtkWindow methods to set the window
size on startup.
https://bugzilla.gnome.org/show_bug.cgi?id=771290
gitg/gitg-window.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 4b60e045..f77a7f56 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -603,7 +603,9 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
{
if (this.get_realized() && !(Gdk.WindowState.MAXIMIZED in get_window().get_state()))
{
- d_state_settings.set("size", "(ii)", event.width, event.height);
+ int width, height;
+ get_size(out width, out height);
+ d_state_settings.set("size", "(ii)", width, height);
}
return base.configure_event(event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]