From be0e372fbc76e088f4e2a8f1412665308083abae Mon Sep 17 00:00:00 2001 From: tesselslate Date: Mon, 4 Nov 2024 21:03:34 -0500 Subject: [PATCH] alpha-modifier-v1: implement protocol Implement the alpha-modifier-v1 protocol, which allows clients to offload alpha blending operations to the compositor. wlroots' scene graph code takes care of updating the opacity of wlr_scene_buffers with an associated wp_alpha_modifier_surface_v1. (cherry picked from commit a2a5e8f4632374b4b322c0520b7e30e35e0d753a) --- river/Server.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/river/Server.zig b/river/Server.zig index 8fc7422..027e777 100644 --- a/river/Server.zig +++ b/river/Server.zig @@ -86,6 +86,8 @@ foreign_toplevel_manager: *wlr.ForeignToplevelManagerV1, tearing_control_manager: *wlr.TearingControlManagerV1, +alpha_modifier: *wlr.AlphaModifierV1, + input_manager: InputManager, root: Root, config: Config, @@ -163,6 +165,8 @@ pub fn init(server: *Server, runtime_xwayland: bool) !void { .tearing_control_manager = try wlr.TearingControlManagerV1.create(wl_server, 1), + .alpha_modifier = try wlr.AlphaModifierV1.create(wl_server), + .config = try Config.init(), .root = undefined, @@ -321,7 +325,8 @@ fn allowlist(server: *Server, global: *const wl.Global) bool { global == server.input_manager.tablet_manager.global or global == server.input_manager.pointer_gestures.global or global == server.idle_inhibit_manager.wlr_manager.global or - global == server.tearing_control_manager.global; + global == server.tearing_control_manager.global or + global == server.alpha_modifier.global; } /// Returns true if the global is blocked for security contexts