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 745717 - Update window state saving to follow best practices
Update window state saving to follow best practices
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-06 02:59 UTC by Florian Müllner
Modified: 2015-03-06 03:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mainWindow: Minor cleanup (1.21 KB, patch)
2015-03-06 02:59 UTC, Florian Müllner
committed Details | Review
mainWindow: Do not save window position (2.26 KB, patch)
2015-03-06 02:59 UTC, Florian Müllner
committed Details | Review
mainWindow: Only save window state/size on quit (3.00 KB, patch)
2015-03-06 02:59 UTC, Florian Müllner
committed Details | Review
mainWindow: Save size on GtkWidget::size-allocate ... (2.67 KB, patch)
2015-03-06 02:59 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2015-03-06 02:59:17 UTC
https://wiki.gnome.org/HowDoI/SaveWindowState
Comment 1 Florian Müllner 2015-03-06 02:59:21 UTC
Created attachment 298673 [details] [review]
mainWindow: Minor cleanup
Comment 2 Florian Müllner 2015-03-06 02:59:26 UTC
Created attachment 298674 [details] [review]
mainWindow: Do not save window position

Best practices recommend leaving window placing to the WM[0], so
only save/restore maximization state and size.

[0] https://wiki.gnome.org/HowDoI/SaveWindowState
Comment 3 Florian Müllner 2015-03-06 02:59:30 UTC
Created attachment 298675 [details] [review]
mainWindow: Only save window state/size on quit

Follow the recommendations[0] and cache window state and size until
the application quits rather than directly saving every change to
GSettings.

[0] https://wiki.gnome.org/HowDoI/SaveWindowState
Comment 4 Florian Müllner 2015-03-06 02:59:34 UTC
Created attachment 298676 [details] [review]
mainWindow: Save size on GtkWidget::size-allocate ...

... instead of using GtkWidget::configure-event, according to
best practices[0].

[0] https://wiki.gnome.org/HowDoI/SaveWindowState
Comment 5 Florian Müllner 2015-03-06 03:00:22 UTC
Attachment 298673 [details] pushed as e6b3bd1 - mainWindow: Minor cleanup
Attachment 298674 [details] pushed as ab935b8 - mainWindow: Do not save window position
Attachment 298675 [details] pushed as 5c8c295 - mainWindow: Only save window state/size on quit
Attachment 298676 [details] pushed as 9df9393 - mainWindow: Save size on GtkWidget::size-allocate ...