Closed computersforpeace closed 4 months ago
@lukefromdc Looks like this is useful for the wayland session?
Only rebased with master to fix CI.
This should not affect the server-side decorated session that is the default in mate-wayland-session but fixes a problem when using client-side decoration: normally, in at least some themes (such as my own) it's possible to get a condition where the menubar overlaps the first line of terminal text. This does not occur when this PR is used.
I was unable to duplicate https://github.com/mate-desktop/mate-terminal/issues/350 but that could be theme-specific and I saw references to long names in the titlebar in the original gnome-terminal report. I am just seeing "terminal" and as I click between the terminal and the desktop the terminal size stays the same.
None the less, this fixes another major nuisance that is theme-specific: Having seen it in any theme (my own UbuntuStudio_Legacy) I have to assume another theme could run into a similar issue at any time without this PR. I didn't get that problem in Menta.
We have to assume mate-terminal could be used in ANY compositor outside a MATE session for that matter, and that a lot of this usage will be with CSD.
I can confirm that PR fixes the issue when using YaruGreen and YaruOk from us.
It seems Wayland-based window managers provide additional decorations that we're not tracking in our "preferred size" computations. This means every geometry update shrinks the window by a bit.
Factor in the allocated dimensions, not just the preferred ones.
Borrows some ideas from https://bugzilla.gnome.org/show_bug.cgi?id=769898
I also drop a few unused values leftover from gnome-terminal.
Fixes #350