Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 58
    • Issues 58
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 160
    • Merge requests 160
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • KWinKWin
  • Merge requests
  • !1765

wayland: Properly handle async xdg-decoration updates

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Vlad Zahorodnii requested to merge work/zzag/async-xdg-decoration-shadow-approach into master Dec 08, 2021
  • Overview 0
  • Commits 5
  • Pipelines 28
  • Changes 15

Currently, if a window switches between SSD and CSD, it is possible to encounter a "corrupted" state where the server-side decoration is wrapped around the window while it still has the client-side decoration.

The xdg-decoration protocol fixes this problem by saying that decoration updates are bound to xdg_surface configure events.

At the moment, kwin sort of applies decoration updates immediately. With this change, decoration updates will be done according to the spec.

If the compositor wants to create a decoration, it will send a configure event and apply the decoration when the configure event is acked by the client. In order to send the configure event with a good window geometry size, kwin will create the decoration to query the border size but not assign it to the client yet. As is, KDecoration api doesn't make querying the border size ahead of time easy. The decoration plugin can assign arbitrary border sizes to windows as it pleases it. We could change that, but it effectively means starting KDecoration3 and setting existing window deco ecosystem around kwin on fire the second time, that's off the table.

If the compositor wants to remove the decoration, it will send a configure event. When the configure event is acked and the surface is committed, the window decoration will be destroyed.

Sync'ing decoration updates to configure events ensures that we cannot end up with having both client-side and server-side decoration. It also helps us to fix a bunch of geometry related issues caused by creating and destroying the decoration without any surface buffer attached yet.

BUG: 445259

closes #71 (closed)
depends on kwayland-server!155 (merged)

Edited Dec 10, 2021 by Vlad Zahorodnii
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/zzag/async-xdg-decoration-shadow-approach