Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • W wayland-protocols
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 103
    • Issues 103
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • waylandwayland
  • wayland-protocols
  • Merge requests
  • !26

unstable: Add surface group transaction protocol

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Jonas Ådahl requested to merge jadahl/wayland-protocols:wip/transactions into main Mar 18, 2020
  • Overview 43
  • Commits 1
  • Pipelines 4
  • Changes 4

This adds a protocol that aims to make it possible to update multiple surfaces atomically. An intended use case is to update a xdg_popup together with its parent, but it can be used for any other reason, including replacing the synchronization included in the subsurfaces protocol.

It works by adding surfaces to a "transaction" object that will, as long as a surface belongs to it, cache any committed state. To apply all the cache state atomically, the client calls the wp_transaction.commit request, causing all the cached state to be applied atomically.

This level of synchronization works on a "lower" level than subsurfaces, as in, a transaction object will consume the state the subsurface defines as being applied, caching it until the wp_transaction.commit request is done.

Signed-off-by: Jonas Ådahl jadahl@gmail.com


I've implemented support in mutter and gtk so far, and will add a weston implementation as soon as we've agreed upon various elementary things, like naming and basic semantics.

One detail that I'll raise up front that needs some further thought is the semantics when a surface is removed from a transaction object. The alternatives I see are

  1. When a surface is removed from a transaction object, any cached state is applied
  2. When a surface is removed from a transaction object, any cached state is merged back into the pending state
  3. When a surface is removed from a transaction object, any cached state is dropped
  4. When a surface is removed from a transaction object, cached state is applied only if there was a wl_surface.commit since the last wp_transaction.commit

In the current wording, I've gone with alternative 2, simply because it enables clients to "move" a surface from one transaction to another without any implicit wl_surface.commit like behavior. One could argue that it'd be enough to just not commit any cached state before removing, but if removing is implicitly a commit, it may interfere with a ack_configure commit. Another option would be 4., where one explicitly states that it's effectively a no-op from a state application point of view. Anyhow, I'm open for suggestions.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/transactions