Skip to content

feat(server): advertise wp_alpha_modifier_v1 - #784

Open
isaksamsten wants to merge 1 commit into
noctalia-dev:mainfrom
isaksamsten:feat/alpha-modifier
Open

isaksamsten wants to merge 1 commit into
noctalia-dev:mainfrom
isaksamsten:feat/alpha-modifier

Conversation

@isaksamsten

Copy link
Copy Markdown
Contributor

Summary

Create the wp_alpha_modifier_v1 global, and expose it to security-context (sandboxed) clients.

Umbriel already applies the client's alpha multiplier: umbrielfx multiplies it into the surface's scene opacity, and View::fullscreenOpaque treats a multiplier below 1 as translucent. But the global was never created, so no client could use the protocol. This adds wlr_alpha_modifier_v1_create next to the other per-surface protocols.

Motivation

Clients that fade or dim their own windows have to redraw every buffer with the alpha baked in. With alpha-modifier they set one multiplier and the compositor applies it while compositing.

Real users:

  • Wine's Wayland driver (since Wine 11.11) maps Windows layered-window opacity (SetLayeredWindowAttributes / UpdateLayeredWindow) onto alpha-modifier-v1 (wine!11119).
  • wl-expose and wl-sidebar use it for their own window opacity.

Sandboxed apps get the global because it only affects the client's own surfaces. It adds nothing beyond what an ARGB buffer can already do, doesn't change the input region, and sends no events back. That puts it in the same group as viewporter, fractional-scale, and content-type. Wine is often run from Flatpak (Steam, Bottles), so hiding it would mainly cost those users the cheaper path.

Type of Change

  • New feature

Testing

  • protocol/security_context passes. wp_alpha_modifier_v1 is now in NORMAL_GLOBALS, so the check confirms the global exists and that both ordinary and security-context clients see it. protocol/security_context_rule also passes.
  • I built and ran the check with meson compile -C build-debug umbriel tests/global-client tests/security-context-client and tests/harness/check.sh ./build-debug/umbriel protocol/security_context. just check couldn't build harness-clients on my machine: the system wayland-protocols is 1.47, which lacks the text-input-v3 action event that seat_log_client.cpp uses. That's unrelated to this change.
  • Manual: tested with clients using alpha-modifier, both windowed and fullscreen.

Manual Coverage

  • Tested in a native Umbriel session
  • Tested with native Wayland applications

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • This change fits SCOPE.md, or its scope was agreed in an issue or on Discord first.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format, or this PR has no C++, shader, or Markdown changes.
  • I ran the relevant build, test, lint, or verification commands, or explained why they were not run.
  • I functionally verified compositor behavior where automated checks are insufficient.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I updated docs/ and examples/config.toml, or this PR does not change user-facing configuration or behavior.
  • I used canonical names for config keys, IPC actions, paths, and identifiers.

@talia-ci talia-ci Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talia preliminary review

Check Result
Merge score 🟢 5/5 — No issues found; ready for CI and human review
Findings None found
Review depth 4/5 — how thoroughly the changed code could be checked by reading it
Coverage 2 of 2 changed files reviewed

What Talia checked: Checked the new global creation and filter ordering in Server::start, the 33-entry security-context allowlist and its harness assertion, and the pre-existing alpha-modifier consumers in umbrielfx scene opacity, overview mirroring, and View::fullscreenOpaque; no introduced defect was supported, with only wlroots-internal signal details left uninspected.

Run details
  • Commit reviewed: e483847
  • Source lookups: 26 file reads, 26 searches
  • Prompt version: 859b7490ca3d

Preliminary automated review: Talia read the changed code and related source; nothing was built, run or tested, and AI can make mistakes. It is not a scope acceptance or a promise to merge; a human reviewer makes the final call. See our ethos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant