Open szanni opened 6 months ago
It is unclear to me if there was ever a good reason for doing these calculations. I could not find any documentation in the code or git log. All code related to window sizing is a best effort on all Unix systems anyways as the gtk3 docs state everywhere. I did not notice any regressions by removing all the window size calculations.
👍
on all systems I tested (i3wm and weston)
Has this been tested on Wayland yet?
I will try some other DEs besides Weston.
on all systems I tested (i3wm and weston)
Has this been tested on Wayland yet?
I will try some other DEs besides Weston.
To add to that, this means the unit test work. By no means do Wayland systems honor uiWindowSetPosition
in any shape or form as Wayland has no protocol for doing so. And SetContentSize only really works when increasing window size form the original on Wayland systems consistently.
Tested with weston and sway+floating windows.
This sadly got a lot bigger than initially anticipated but much of this code is interdependent, hence all of this at once:
FALSE
Fixes for unix:
uiWindowContentSize
now usesgtk_window_get_size
andgtk_window_resize
instead of trying to do some magic calculations on the inner container. According to the docs gtk already does a best effort calculation to report the size sans window decorations. The prior, inner container size code does not work on hidden windows and margined windows anyways and does not add anything on all systems I tested (i3wm and weston) apart from code, confusion, bugs and brittleness, hence the removal.It is unclear to me if there was ever a good reason for doing these calculations. I could not find any documentation in the code or git log. All code related to window sizing is a best effort on all Unix systems anyways as the gtk3 docs state everywhere. I did not notice any regressions by removing all the window size calculations.