GNOME Bugzilla – Bug 762231
Save window size properly
Last modified: 2016-02-22 16:54:43 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.
Created attachment 321559 [details] [review] Save window size properly
Review of attachment 321559 [details] [review]: Looks ok, ok to push.
Attachment 321559 [details] pushed as 721c6f2 - Save window size properly
Need to fix gedit and polari too.
Commenting on a fixed bug is not the best way to achieve that
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.
Created attachment 321844 [details] [review] application: use gtk_window_get_size not gtk_widget_get_size
Review of attachment 321844 [details] [review]: oops, sorry for that - please commit that obvious fix.