Bug 4433 - GTK_CSD=1 causes all top-level window to grow with every restart
Summary: GTK_CSD=1 causes all top-level window to grow with every restart
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: UI (show other bugs)
Version: 4.0.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2021-01-26 23:51 UTC by Steve Randall
Modified: 2021-02-11 10:13 UTC (History)
0 users

See Also:


Attachments
Get window size instead of allocation. (884 bytes, patch)
2021-01-26 23:51 UTC, Steve Randall
Details | Diff
Get and set window sizes and positions compatible with CSD. (24.81 KB, patch)
2021-02-02 13:37 UTC, Steve Randall
Details | Diff

Description Steve Randall 2021-01-26 23:51:14 UTC
Created attachment 2169 [details]
Get window size instead of allocation.

When running with GTK_CSD=1 to enable client side decoration, the main window gets larger with every restart of the program. This appears to be due to using gtk_widget_get_allocation, which apparently includes decoration space. The correct call would be gtk_window_get_size, which returns an appropriate size for the subsequent gtk_window_set_default_size. Attached patch fixes the main window, but there are presumably others.
Comment 1 Paul 2021-01-28 09:51:07 UTC
I couldn't reproduce this myself, since I use KDE and GTK_CSD has no effect. But there were no unwanted side-effects of the patch so I have pushed it to git now. Thanks.
Comment 2 Steve Randall 2021-01-28 14:45:00 UTC
This problem affects all top level windows (whose sizes are saved). I was kind of hoping you would know what they all are, but I guess I'll start tracking down the others.
Comment 3 Steve Randall 2021-01-28 14:45:30 UTC
This problem affects all top level windows (whose sizes are saved). I was kind of hoping you would know what they all are, but I guess I'll start tracking down the others.
Comment 4 Steve Randall 2021-02-02 13:37:12 UTC
Created attachment 2172 [details]
Get and set window sizes and positions compatible with CSD.

This should take care of the rest of the top-level windows. Also, the same problem affects saved positions. Also, a number of calls to gtk_widget_set_size_request had not been converted to gtk_window_set_default_size, so I changed those.
Comment 5 Paul 2021-02-11 10:13:42 UTC
pushed to git. Thanks!

Note You need to log in before you can comment on or make changes to this bug.