forge
Explore
Log in

Don't you dare go Hollow

misc: Use `CursorImageSurfaceData` type alias

Browse files at this commit

0c340ec5ea351e12e0e826f341b9bf1f7b3b5f5fbbb651Parent: 34679c7
instead of `Mutex<CursorImageAttributes>`
src/cursor.rsmodified+2 -3
@@ -4,12 +4,11 @@ use std::env;
4 use std::fs::File;4 use std::fs::File;
5 use std::io::Read;5 use std::io::Read;
6 use std::rc::Rc;6 use std::rc::Rc;
7-use std::sync::Mutex;
8 7
9 use anyhow::{anyhow, Context};8 use anyhow::{anyhow, Context};
10 use smithay::backend::allocator::Fourcc;9 use smithay::backend::allocator::Fourcc;
11 use smithay::backend::renderer::element::memory::MemoryRenderBuffer;10 use smithay::backend::renderer::element::memory::MemoryRenderBuffer;
12-use smithay::input::pointer::{CursorIcon, CursorImageAttributes, CursorImageStatus};11+use smithay::input::pointer::{CursorIcon, CursorImageStatus, CursorImageSurfaceData};
13 use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;12 use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
14 use smithay::utils::{IsAlive, Logical, Physical, Point, Transform};13 use smithay::utils::{IsAlive, Logical, Physical, Point, Transform};
15 use smithay::wayland::compositor::with_states;14 use smithay::wayland::compositor::with_states;
@@ -67,7 +66,7 @@ impl CursorManager {
67 let hotspot = with_states(&surface, |states| {66 let hotspot = with_states(&surface, |states| {
68 states67 states
69 .data_map68 .data_map
70- .get::<Mutex<CursorImageAttributes>>()69+ .get::<CursorImageSurfaceData>()
71 .unwrap()70 .unwrap()
72 .lock()71 .lock()
73 .unwrap()72 .unwrap()
src/niri.rsmodified+2 -2
@@ -46,7 +46,7 @@ use smithay::desktop::{
46 PopupUngrabStrategy, Space, Window, WindowSurfaceType,46 PopupUngrabStrategy, Space, Window, WindowSurfaceType,
47 };47 };
48 use smithay::input::keyboard::Layout as KeyboardLayout;48 use smithay::input::keyboard::Layout as KeyboardLayout;
49-use smithay::input::pointer::{CursorIcon, CursorImageAttributes, CursorImageStatus, MotionEvent};49+use smithay::input::pointer::{CursorIcon, CursorImageStatus, CursorImageSurfaceData, MotionEvent};
50 use smithay::input::{Seat, SeatState};50 use smithay::input::{Seat, SeatState};
51 use smithay::output::{self, Output, OutputModeSource, PhysicalProperties, Subpixel};51 use smithay::output::{self, Output, OutputModeSource, PhysicalProperties, Subpixel};
52 use smithay::reexports::calloop::generic::Generic;52 use smithay::reexports::calloop::generic::Generic;
@@ -3026,7 +3026,7 @@ impl Niri {
3026 let hotspot = with_states(surface, |states| {3026 let hotspot = with_states(surface, |states| {
3027 states3027 states
3028 .data_map3028 .data_map
3029- .get::<Mutex<CursorImageAttributes>>()3029+ .get::<CursorImageSurfaceData>()
3030 .unwrap()3030 .unwrap()
3031 .lock()3031 .lock()
3032 .unwrap()3032 .unwrap()