Fix window size growing with client-side decorations - #740
Conversation
Save the current client size with gtk_window_get_size() instead of using the cached window dimensions. This prevents the saved size from gradually increasing when using client-side decorations on Wayland.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideWindow configuration persistence now queries GTK for the current window size before saving, preventing client-side decoration offsets from causing the restored size to grow over time on Wayland. Sequence diagram for corrected window size persistencesequenceDiagram
participant GTK as GTK Window
participant WC as WindowConfig
participant Store as Configuration Store
GTK->>WC: on_configure_event(window, event, user_data)
WC->>GTK: gtk_window_get_size(window, width, height)
GTK-->>WC: current client width and height
WC->>WC: SetWidth(width).SetHeight(height)
WC->>Store: Save()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the size calculation is wrong, the application may persist incorrect window dimensions in its configuration, causing an affected window to reopen at the wrong size after reverting the code. The stored value is bounded and can be corrected by resizing or rewriting the configuration.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@City-Bus build failed. |
|




Save the current client size with
gtk_window_get_size()instead of using the cached window dimensions. This prevents the saved size from gradually increasing when using client-side decorations on Wayland.Summary by Sourcery
Bug Fixes: