feat: expose surface alpha modifier

This commit is contained in:
Samuel Onoja committed 2026-09-25 03:34:59 +01:00
1 parent 9abdaee01e
commit b9f0ab044e
2 files changed
+5

No files matched your search

+1
View File
@@ -237,6 +237,7 @@ impl XdgForeignHandler for Ferese {
impl XdgToplevelIconHandler for Ferese {} impl XdgToplevelIconHandler for Ferese {}
smithay::delegate_compositor!(Ferese); smithay::delegate_compositor!(Ferese);
smithay::delegate_alpha_modifier!(Ferese);
smithay::delegate_cursor_shape!(Ferese); smithay::delegate_cursor_shape!(Ferese);
smithay::delegate_data_device!(Ferese); smithay::delegate_data_device!(Ferese);
smithay::delegate_dmabuf!(Ferese); smithay::delegate_dmabuf!(Ferese);
+4
View File
@@ -47,6 +47,7 @@ use smithay::{
}, },
utils::{Logical, Point, Size}, utils::{Logical, Point, Size},
wayland::{ wayland::{
alpha_modifier::AlphaModifierState,
compositor::{CompositorClientState, CompositorState, with_states}, compositor::{CompositorClientState, CompositorState, with_states},
cursor_shape::CursorShapeManagerState, cursor_shape::CursorShapeManagerState,
dmabuf::{DmabufState, ImportNotifier}, dmabuf::{DmabufState, ImportNotifier},
@@ -123,6 +124,7 @@ pub struct Ferese {
last_animation_tick: Instant, last_animation_tick: Instant,
pub popups: PopupManager, pub popups: PopupManager,
pub seat: Seat<Self>, pub seat: Seat<Self>,
pub alpha_modifier_state: AlphaModifierState,
pub compositor_state: CompositorState, pub compositor_state: CompositorState,
pub cursor_shape_state: CursorShapeManagerState, pub cursor_shape_state: CursorShapeManagerState,
pub data_device_state: DataDeviceState, pub data_device_state: DataDeviceState,
@@ -321,6 +323,7 @@ impl Ferese {
) -> Result<Self, Box<dyn Error>> { ) -> Result<Self, Box<dyn Error>> {
let display_handle = display.handle(); let display_handle = display.handle();
crate::handlers::screencopy::init_global(&display_handle); crate::handlers::screencopy::init_global(&display_handle);
let alpha_modifier_state = AlphaModifierState::new::<Self>(&display_handle);
let compositor_state = CompositorState::new::<Self>(&display_handle); let compositor_state = CompositorState::new::<Self>(&display_handle);
let cursor_shape_state = CursorShapeManagerState::new::<Self>(&display_handle); let cursor_shape_state = CursorShapeManagerState::new::<Self>(&display_handle);
let xdg_shell_state = XdgShellState::new::<Self>(&display_handle); let xdg_shell_state = XdgShellState::new::<Self>(&display_handle);
@@ -425,6 +428,7 @@ impl Ferese {
last_animation_tick: start_time, last_animation_tick: start_time,
popups: PopupManager::default(), popups: PopupManager::default(),
seat, seat,
alpha_modifier_state,
compositor_state, compositor_state,
cursor_shape_state, cursor_shape_state,
data_device_state, data_device_state,