wayland: Implement cursor-shape-v1
This commit is contained in:
parent
79ae56c601
commit
0ffe6ae718
9 changed files with 92 additions and 161 deletions
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
use crate::{
|
||||
backend::render::{
|
||||
cursor::{CursorShape, CursorState},
|
||||
element::AsGlowRenderer,
|
||||
BackdropShader, IndicatorShader, Key, SplitRenderElements, Usage,
|
||||
cursor::CursorState, element::AsGlowRenderer, BackdropShader, IndicatorShader, Key,
|
||||
SplitRenderElements, Usage,
|
||||
},
|
||||
shell::{
|
||||
element::{
|
||||
|
|
@ -32,7 +31,7 @@ use smithay::{
|
|||
desktop::{layer_map_for_output, space::SpaceElement},
|
||||
input::{
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
AxisFrame, ButtonEvent, CursorIcon, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent,
|
||||
GestureSwipeBeginEvent, GestureSwipeEndEvent, GestureSwipeUpdateEvent,
|
||||
GrabStartData as PointerGrabStartData, MotionEvent, PointerGrab, PointerInnerHandle,
|
||||
|
|
@ -710,7 +709,7 @@ impl MoveGrab {
|
|||
|
||||
{
|
||||
let cursor_state = seat.user_data().get::<CursorState>().unwrap();
|
||||
cursor_state.lock().unwrap().set_shape(CursorShape::Grab);
|
||||
cursor_state.lock().unwrap().set_shape(CursorIcon::Grab);
|
||||
}
|
||||
|
||||
MoveGrab {
|
||||
|
|
@ -850,7 +849,7 @@ impl Drop for MoveGrab {
|
|||
|
||||
{
|
||||
let cursor_state = seat.user_data().get::<CursorState>().unwrap();
|
||||
cursor_state.lock().unwrap().set_shape(CursorShape::Default);
|
||||
cursor_state.lock().unwrap().unset_shape();
|
||||
}
|
||||
|
||||
if let Some((mapped, position)) = position {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue