[gnome-system-monitor] Save window size properly
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Save window size properly
- Date: Thu, 18 Feb 2016 15:28:23 +0000 (UTC)
commit 721c6f2ad817d28a53a953edee6149b5dd09df0f
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 17 23:43:00 2016 -0500
Save window size properly
This is following the current best practice as layed out in
https://wiki.gnome.org/HowDoI/SaveWindowState. It is important
to use gtk_window_get_size, otherwise the window will grow
under Wayland.
https://bugzilla.gnome.org/show_bug.cgi?id=762231
src/application.cpp | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/application.cpp b/src/application.cpp
index f6138d3..fb22d38 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -283,8 +283,7 @@ GsmApplication::save_config ()
int width, height, xpos, ypos;
gboolean maximized;
- width = gdk_window_get_width (gtk_widget_get_window (main_window));
- height = gdk_window_get_height (gtk_widget_get_window (main_window));
+ gtk_widget_get_size (main_window, &width, &height);
gtk_window_get_position (GTK_WINDOW (main_window), &xpos, &ypos);
maximized = gdk_window_get_state (gtk_widget_get_window (main_window)) & GDK_WINDOW_STATE_MAXIMIZED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]