Expose relative pointer global on the kms backend

This commit is contained in:
Ian Douglas Scott 2023-02-27 13:54:49 -08:00
parent 4890bfb029
commit 313bdd91b8
3 changed files with 13 additions and 1 deletions

View file

@ -52,7 +52,9 @@ use smithay::{
wayland_server::{protocol::wl_surface::WlSurface, DisplayHandle, Resource},
},
utils::{DeviceFd, Size, Transform},
wayland::{dmabuf::DmabufGlobal, seat::WaylandFocus},
wayland::{
dmabuf::DmabufGlobal, relative_pointer::RelativePointerManagerState, seat::WaylandFocus,
},
xwayland::XWaylandClientData,
};
use tracing::{debug, error, info, warn};
@ -305,6 +307,9 @@ pub fn init_backend(
devices: HashMap::new(),
});
// Create relative pointer global
RelativePointerManagerState::new::<State>(&dh);
// TODO: Do multiple Xwaylands for better multigpu
state.launch_xwayland(Some(primary));

View file

@ -11,6 +11,7 @@ pub mod output;
pub mod output_configuration;
pub mod presentation;
pub mod primary_selection;
pub mod relative_pointer;
pub mod screencopy;
pub mod seat;
pub mod shm;

View file

@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::state::State;
use smithay::delegate_relative_pointer;
delegate_relative_pointer!(State);