Skip to content
Snippets Groups Projects
  1. Apr 21, 2025
  2. Apr 19, 2025
    • Fatih Uzunoğlu's avatar
    • Fatih Uzunoğlu's avatar
    • Fatih Uzunoğlu's avatar
      qt: disable mask instead of using the exact `QWindow::geometry()` in `CompositorWayland` · 4ead38ef
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      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).
      4ead38ef
    • Fatih Uzunoğlu's avatar
      qml: use anchoring in `EmptyLabel.qml` labels · 4e83b48d
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      This is because in some cases (such as changing
      the interface scale) the `Column` does not
      re-position them.
      4e83b48d
    • Fatih Uzunoğlu's avatar
      qml: disable word wrap in `EmptyLabelHint.qml` · 4fe0e24a
      Fatih Uzunoğlu authored and Steve Lhomme's avatar Steve Lhomme committed
      As the implicit size can not be determined with
      word wrap. We currently depend on the implicit
      size starting with 452a2171.
      4fe0e24a
Loading