mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
55 lines
1.2 KiB
Rust
55 lines
1.2 KiB
Rust
mod compositor;
|
|
mod xdg_shell;
|
|
|
|
//
|
|
// Wl Seat
|
|
use smithay::input::{SeatHandler, SeatState};
|
|
use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
|
|
use smithay::wayland::data_device::{
|
|
ClientDndGrabHandler, DataDeviceHandler, ServerDndGrabHandler,
|
|
};
|
|
use smithay::{delegate_data_device, delegate_output, delegate_seat};
|
|
|
|
use crate::Smallvil;
|
|
|
|
impl SeatHandler for Smallvil {
|
|
type KeyboardFocus = WlSurface;
|
|
type PointerFocus = WlSurface;
|
|
|
|
fn seat_state(&mut self) -> &mut SeatState<Smallvil> {
|
|
&mut self.seat_state
|
|
}
|
|
|
|
fn cursor_image(
|
|
&mut self,
|
|
_seat: &smithay::input::Seat<Self>,
|
|
_image: smithay::input::pointer::CursorImageStatus,
|
|
) {
|
|
}
|
|
fn focus_changed(&mut self, _seat: &smithay::input::Seat<Self>, _focused: Option<&WlSurface>) {}
|
|
}
|
|
|
|
delegate_seat!(Smallvil);
|
|
|
|
//
|
|
// Wl Data Device
|
|
//
|
|
|
|
impl DataDeviceHandler for Smallvil {
|
|
type SelectionUserData = ();
|
|
fn data_device_state(&self) -> &smithay::wayland::data_device::DataDeviceState {
|
|
&self.data_device_state
|
|
}
|
|
}
|
|
|
|
impl ClientDndGrabHandler for Smallvil {}
|
|
impl ServerDndGrabHandler for Smallvil {}
|
|
|
|
delegate_data_device!(Smallvil);
|
|
|
|
//
|
|
// Wl Output & Xdg Output
|
|
//
|
|
|
|
delegate_output!(Smallvil);
|