[Oxygen] [Bug 500976] Window size not restored correctly after exiting full screen.
Lukáš Turek
bugzilla_noreply at kde.org
Tue May 27 20:37:34 BST 2025
https://bugs.kde.org/show_bug.cgi?id=500976
--- Comment #9 from Lukáš Turek <8an at 8an.cz> ---
Actually, the window size is correct, only the placement of buttons is wrong
(window title is positioned correctly). So the problem is somewhere in
Decoration::updateButtonsGeometry(). It seems that captionHeight() sometimes
returns a wrong value. This patch is a quick workaround, but the real cause is
likely somewhere outside Oxygen decoration. Breeze is not affected, because it
doesn't use captionHeight() to calculate the position of buttons.
--- a/kdecoration/oxygendecoration.cpp
+++ b/kdecoration/oxygendecoration.cpp
@@ -350,9 +350,9 @@ void Decoration::updateButtonsGeometry()
auto s = settings();
// adjust button position
- const int bHeight = captionHeight() + (isMaximized() ? s->smallSpacing() *
Metrics::TitleBar_TopMargin : 0);
+ const int bHeight = buttonHeight() + (isMaximized() ? s->smallSpacing() *
Metrics::TitleBar_TopMargin : 0);
const int bWidth = buttonHeight();
- const int verticalOffset = (isMaximized() ? s->smallSpacing() *
Metrics::TitleBar_TopMargin : 0) + (captionHeight() - buttonHeight()) / 2;
+ const int verticalOffset = (isMaximized() ? s->smallSpacing() *
Metrics::TitleBar_TopMargin : 0);
const QVector<KDecoration3::DecorationButton *> leftButtons =
m_leftButtons->buttons();
const QVector<KDecoration3::DecorationButton *> rightButtons =
m_rightButtons->buttons();
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list