Created attachment 105801 [details] Sample Java code to reproduce the bug Titlebar height of the windows are not set properly if the window is created with empty title initially and its title is changed later. This affects some applications including LibreOffice (if started maximized) and Spotify. To reproduce the bug follow these steps: 1. Open Libreoffice Writer, maximize the window and exit. 2. Go to System Settings > Font and set Window Title font size to a big value (like 20) and Apply. 3. Open Libreoffice Writer. The titlebar is sized according to the window buttons (maximize, minimize, close etc.) only, so half of the window title is cropped. If the window is unmaximized after that, it is set properly. This seems to happen when window is created with empty title and its title is changed later. Tested this with the attached Java code. Screenshot (notice that the bottom of 'p' character is cropped): https://www.kde.org/announcements/plasma-5.10/plymouth-kcm.png
Hugo, could you check if this is a KWin or breeze decoration issue?
Hi Christoph Probably a breeze bug. When we calculate the decoration borders we use: fm.boundingRect(c->caption()) (fm being fontMetrics) So when caption is empty, this gives 0. It is then not updated on caption change. I guess I shoud just use fm.height() (after all you do not want the size of the decoration to change depending on the caracters that appear in the caption !)
Git commit 2cc0f8ba2da50ca3efa500ebdcc3655c8d0e47f8 by Hugo Pereira Da Costa. Committed on 06/06/2017 at 15:47. Pushed by hpereiradacosta into branch 'master'. use fontMetrics.height() rather than boundingRect(...).height() the height of the title bar should not depend on the caption content. M +1 -1 kdecoration/breezedecoration.cpp https://commits.kde.org/breeze/2cc0f8ba2da50ca3efa500ebdcc3655c8d0e47f8
Was able to test with the provided java code (thanks !) Now fixed. Will backport and also fix oxygen. Thanks for reporting the issue Hugo
Git commit 4f0940b79001ae8b400d01a8abf63d03b8dbd9fc by Hugo Pereira Da Costa. Committed on 06/06/2017 at 16:06. Pushed by hpereiradacosta into branch 'Plasma/5.10'. use fontMetrics.height() rather than boundingRect(...).height() the height of the title bar should not depend on the caption content. M +1 -1 kdecoration/breezedecoration.cpp https://commits.kde.org/breeze/4f0940b79001ae8b400d01a8abf63d03b8dbd9fc