After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762231 - Save window size properly
Save window size properly
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-18 04:46 UTC by Matthias Clasen
Modified: 2016-02-22 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Save window size properly (1.14 KB, patch)
2016-02-18 04:46 UTC, Matthias Clasen
committed Details | Review
application: use gtk_window_get_size not gtk_widget_get_size (963 bytes, patch)
2016-02-22 14:02 UTC, Alberts Muktupāvels
committed Details | Review

Description Matthias Clasen 2016-02-18 04:46:10 UTC
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.
Comment 1 Matthias Clasen 2016-02-18 04:46:13 UTC
Created attachment 321559 [details] [review]
Save window size properly
Comment 2 Robert Roth 2016-02-18 12:04:09 UTC
Review of attachment 321559 [details] [review]:

Looks ok, ok to push.
Comment 3 Robert Roth 2016-02-18 12:04:11 UTC
Review of attachment 321559 [details] [review]:

Looks ok, ok to push.
Comment 4 Matthias Clasen 2016-02-18 15:29:57 UTC
Attachment 321559 [details] pushed as 721c6f2 - Save window size properly
Comment 5 Maxim 2016-02-18 18:41:01 UTC
Need to fix gedit and polari too.
Comment 6 Matthias Clasen 2016-02-18 18:48:30 UTC
Commenting on a fixed bug is not the best way to achieve that
Comment 7 Ting-Wei Lan 2016-02-21 06:20:54 UTC
Error caused by commit 721c6f2:

  CXX      application.o
application.cpp:286:5: error: use of undeclared identifier 'gtk_widget_get_size'; did you mean 'gtk_window_get_size'?
    gtk_widget_get_size (main_window, &width, &height);
    ^~~~~~~~~~~~~~~~~~~
    gtk_window_get_size
/home/lantw44/gnome/devinstall/include/gtk-3.0/gtk/gtkwindow.h:431:10: note: 'gtk_window_get_size' declared here
void     gtk_window_get_size         (GtkWindow   *window,
         ^
application.cpp:286:26: error: cannot initialize a parameter of type 'GtkWindow *' (aka '_GtkWindow *') with an lvalue of type 'GtkWidget *' (aka '_GtkWidget *')
    gtk_widget_get_size (main_window, &width, &height);
                         ^~~~~~~~~~~
/home/lantw44/gnome/devinstall/include/gtk-3.0/gtk/gtkwindow.h:431:52: note: passing argument to parameter 'window' here
void     gtk_window_get_size         (GtkWindow   *window,
                                                   ^
2 errors generated.
Comment 8 Alberts Muktupāvels 2016-02-22 14:02:07 UTC
Created attachment 321844 [details] [review]
application: use gtk_window_get_size not gtk_widget_get_size
Comment 9 Matthias Clasen 2016-02-22 16:00:22 UTC
Review of attachment 321844 [details] [review]:

oops, sorry for that - please commit that obvious fix.