https://bugs.kde.org/show_bug.cgi?id=514600

            Bug ID: 514600
           Summary: KDecoration/KWin: incorrect display of buttons in the
                    window titlebar due to incorrect size of the titlebar
                    and borders
    Classification: Plasma
           Product: Breeze
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: window decoration
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

Created attachment 188522
  --> https://bugs.kde.org/attachment.cgi?id=188522&action=edit
Video contains steps to reproduce and bug itself

SUMMARY

On Wayland on KDE 6, buttons in the titlebar are incorrectly displayed for
those themes that use the titlebar height value (`borderTop()`), for example,
Oxygen. This is due to the fact that the height of the titlebar is taken for
the size of the buttons, but for some reason it sometimes returns to zero
(probably, the button size update event is triggered earlier than the titlebar
height update event, or for some other reason), so the coordinates eventually
break (see screenshot 1 - oxygen-buttons-went-higher.png).

Moreover, there is no such bug on KDE 5 + Wayland/X11, that is, it is a
regression. But I do not know which version exactly.

Most likely, the problem is somewhere in the chain between KWin and
KDecoration.

Also, this problem is relevant for the Breeze too, but in a slightly different
scenario:

There is some kind of desynchronization of the values `borderRight()` and
`borderLeft()` depending on their position `isRightEdge()` and `isLeftEdge()'.

On KDE 6 + X11 or KDE 5 + X11/Wayland, if it is `isLeftEdge()`, then the value
is `borderLeft() = 0`, and if `isRightEdge()', then `borderRight() = 0`.

But on KDE 6 + Wayland, when `isRightEdge()`, then `borderRight()` may not be
zero, but equal to the width of the border, which increases the width of the
titlebar and eventually moves the buttons in the header to the right outside
the screen. This is best seen with wide (huge) borders (see screenshot 2 -
buttons-to-right.png).

And also vice versa, when the window is not `isRightEdge()` and not
`isLeftEdge()` (it is located in the middle of the screen), it may be that the
value of `borderLeft()` and `borderRight()` are equal to zero, which reduces
the overall width of the titlebar, and thus adds extra margins to the width
with the border width from the edges for these buttons (see screenshot 3 -
extra-margin-to-the-left.png).

And this problem with the left and right borders does not appear on KDE 6 +
X11, only on Wayland.

STEPS TO REPRODUCE

1. It is necessary to enable huge borders so that the problem is better
visible.
2. Switch decorations between Breeze, Oxygen and Plastik. After switching to
Oxygen, you will see that the buttons went higher that they should be.
3. Switch to Breeze decoration. Close the window, open new one, and magnify the
window to the right side of the screen (`isRightEdge()`). Buttons will move to
the right outside the window.

The sequence of actions is best seen in the video that I have attached.

OBSERVED RESULT

Incorrect display of buttons in the window titlebar for Oxygen and Breeze.

EXPECTED RESULT

Correct button display without extra offsets (margins).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon Unstable Edition
KDE Plasma Version: 6.5.80 
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.1

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to