qt: wayland: fix incorrect input region after switching the window title bar setting (`FramelessWindowHint`)
This is useful when toggling the window title bar setting. For example, if it is
switched on from off, a title bar appears and the window geometry no longer counts
the title bar, but then, the mask needs to account for the title bar. This is
observed with KWin, where SSD is supported (through zxdg_decoration_manager_v1
)
but not effective when the setting is switched (which effectively means switching
the FramelessWindowHint
flag), as in that case Qt platform plugin tries to decorate
the window itself (probably the protocol does not support switching SSD like that).
I assume this occurs because the title bar is not really server-side decoration
but rather the one provided by platform decoration (QT_WAYLAND_DECORATION
), so
technically client-side decoration (managed by the platform plugin).
Since when FramelessWindowHint
is off; either SSD (zxdg_decoration_manager_v1
),
or CSD (managed by the platform plugin), in both cases the windowExtendedMargin()
would be set to 0 in our case, this is a valid workaround instead of trying to get
the client side margins with (QWaylandWindow::clientSideMargins()
) and accounting
it when applying the margins.
I'm not sure if this is a Qt or KWin Wayland bug, because if CSD is handled by the platform plugin, the application should not be forced to care about the CSD. In that case for the application, it is no different than SSD.
Also use QRect(QPoint(0, 0), m_qmlView->size())
instead of m_qmlView->geometry()
because mask should be relative to the window, not screen. Currently this does not
change anything because XDG surface (at least regular ones) does not provide where
it is positioned in the screen, so QWindow::position()
returns (0, 0).
Request review @chub.
Merge request reports
Activity
added MRStatus::Reviewable label
added Component::Interface: Qt label
changed milestone to %Bugs paradize
changed milestone to %4.0
added MRStatus::Acceptable label and removed MRStatus::Reviewable label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, have votes and score > 0 -
MergeRequest should have no activity (threads/votes) for (72h/72h)
-
added 22 commits
-
69ad1b0b...4e83b48d - 21 commits from branch
videolan:master
- 4ead38ef - qt: disable mask instead of using the exact `QWindow::geometry()` in `CompositorWayland`
-
69ad1b0b...4e83b48d - 21 commits from branch
enabled an automatic merge when all merge checks for 4ead38ef pass