aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-08-09 11:03:38 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-08-10 14:50:51 +0400
commit396ab935859f4eb46b3cf7aa36e7b496b5898b72 (patch)
treef5486a07986a8d6ade9c32acb8b734101c7fe28f /src/handlers
parentb8e79e9cc8820e4385a8a3fe2912eb2e6f0b81f8 (diff)
downloadniri-396ab935859f4eb46b3cf7aa36e7b496b5898b72.tar.gz
niri-396ab935859f4eb46b3cf7aa36e7b496b5898b72.tar.bz2
niri-396ab935859f4eb46b3cf7aa36e7b496b5898b72.zip
Restructure things and add tty backend
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/compositor.rs14
-rw-r--r--src/handlers/mod.rs18
-rw-r--r--src/handlers/xdg_shell.rs10
3 files changed, 21 insertions, 21 deletions
diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs
index 99041f34..b5f6291d 100644
--- a/src/handlers/compositor.rs
+++ b/src/handlers/compositor.rs
@@ -11,10 +11,10 @@ use smithay::{delegate_compositor, delegate_shm};
use super::xdg_shell;
use crate::grabs::resize_grab;
-use crate::state::ClientState;
-use crate::Smallvil;
+use crate::niri::ClientState;
+use crate::Niri;
-impl CompositorHandler for Smallvil {
+impl CompositorHandler for Niri {
fn compositor_state(&mut self) -> &mut CompositorState {
&mut self.compositor_state
}
@@ -44,15 +44,15 @@ impl CompositorHandler for Smallvil {
}
}
-impl BufferHandler for Smallvil {
+impl BufferHandler for Niri {
fn buffer_destroyed(&mut self, _buffer: &wl_buffer::WlBuffer) {}
}
-impl ShmHandler for Smallvil {
+impl ShmHandler for Niri {
fn shm_state(&self) -> &ShmState {
&self.shm_state
}
}
-delegate_compositor!(Smallvil);
-delegate_shm!(Smallvil);
+delegate_compositor!(Niri);
+delegate_shm!(Niri);
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 58157b27..ab2a1596 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -10,13 +10,13 @@ use smithay::wayland::data_device::{
};
use smithay::{delegate_data_device, delegate_output, delegate_seat};
-use crate::Smallvil;
+use crate::Niri;
-impl SeatHandler for Smallvil {
+impl SeatHandler for Niri {
type KeyboardFocus = WlSurface;
type PointerFocus = WlSurface;
- fn seat_state(&mut self) -> &mut SeatState<Smallvil> {
+ fn seat_state(&mut self) -> &mut SeatState<Niri> {
&mut self.seat_state
}
@@ -29,26 +29,26 @@ impl SeatHandler for Smallvil {
fn focus_changed(&mut self, _seat: &smithay::input::Seat<Self>, _focused: Option<&WlSurface>) {}
}
-delegate_seat!(Smallvil);
+delegate_seat!(Niri);
//
// Wl Data Device
//
-impl DataDeviceHandler for Smallvil {
+impl DataDeviceHandler for Niri {
type SelectionUserData = ();
fn data_device_state(&self) -> &smithay::wayland::data_device::DataDeviceState {
&self.data_device_state
}
}
-impl ClientDndGrabHandler for Smallvil {}
-impl ServerDndGrabHandler for Smallvil {}
+impl ClientDndGrabHandler for Niri {}
+impl ServerDndGrabHandler for Niri {}
-delegate_data_device!(Smallvil);
+delegate_data_device!(Niri);
//
// Wl Output & Xdg Output
//
-delegate_output!(Smallvil);
+delegate_output!(Niri);
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index 3b7f53ff..e681d0ef 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -14,9 +14,9 @@ use smithay::wayland::shell::xdg::{
};
use crate::grabs::{MoveSurfaceGrab, ResizeSurfaceGrab};
-use crate::Smallvil;
+use crate::Niri;
-impl XdgShellHandler for Smallvil {
+impl XdgShellHandler for Niri {
fn xdg_shell_state(&mut self) -> &mut XdgShellState {
&mut self.xdg_shell_state
}
@@ -102,13 +102,13 @@ impl XdgShellHandler for Smallvil {
}
// Xdg Shell
-delegate_xdg_shell!(Smallvil);
+delegate_xdg_shell!(Niri);
fn check_grab(
- seat: &Seat<Smallvil>,
+ seat: &Seat<Niri>,
surface: &WlSurface,
serial: Serial,
-) -> Option<PointerGrabStartData<Smallvil>> {
+) -> Option<PointerGrabStartData<Niri>> {
let pointer = seat.get_pointer()?;
// Check that this surface has a click grab.