Expose relative pointer global on the kms backend
This commit is contained in:
parent
4890bfb029
commit
313bdd91b8
3 changed files with 13 additions and 1 deletions
|
|
@ -52,7 +52,9 @@ use smithay::{
|
||||||
wayland_server::{protocol::wl_surface::WlSurface, DisplayHandle, Resource},
|
wayland_server::{protocol::wl_surface::WlSurface, DisplayHandle, Resource},
|
||||||
},
|
},
|
||||||
utils::{DeviceFd, Size, Transform},
|
utils::{DeviceFd, Size, Transform},
|
||||||
wayland::{dmabuf::DmabufGlobal, seat::WaylandFocus},
|
wayland::{
|
||||||
|
dmabuf::DmabufGlobal, relative_pointer::RelativePointerManagerState, seat::WaylandFocus,
|
||||||
|
},
|
||||||
xwayland::XWaylandClientData,
|
xwayland::XWaylandClientData,
|
||||||
};
|
};
|
||||||
use tracing::{debug, error, info, warn};
|
use tracing::{debug, error, info, warn};
|
||||||
|
|
@ -305,6 +307,9 @@ pub fn init_backend(
|
||||||
devices: HashMap::new(),
|
devices: HashMap::new(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Create relative pointer global
|
||||||
|
RelativePointerManagerState::new::<State>(&dh);
|
||||||
|
|
||||||
// TODO: Do multiple Xwaylands for better multigpu
|
// TODO: Do multiple Xwaylands for better multigpu
|
||||||
state.launch_xwayland(Some(primary));
|
state.launch_xwayland(Some(primary));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ pub mod output;
|
||||||
pub mod output_configuration;
|
pub mod output_configuration;
|
||||||
pub mod presentation;
|
pub mod presentation;
|
||||||
pub mod primary_selection;
|
pub mod primary_selection;
|
||||||
|
pub mod relative_pointer;
|
||||||
pub mod screencopy;
|
pub mod screencopy;
|
||||||
pub mod seat;
|
pub mod seat;
|
||||||
pub mod shm;
|
pub mod shm;
|
||||||
|
|
|
||||||
6
src/wayland/handlers/relative_pointer.rs
Normal file
6
src/wayland/handlers/relative_pointer.rs
Normal 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);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue