api: remove ::dummy from Id types

`::dummy` was used for testing purposes and became redundant after
adding e.g. `from_raw` and `into_raw` methods on `Id` types.
This commit is contained in:
daxpedda 2024-09-29 15:49:45 +02:00 committed by GitHub
parent 6e1b9fa24d
commit 32cd1ad9a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 219 additions and 352 deletions

View file

@ -30,7 +30,7 @@ use crate::dpi::{LogicalPosition, PhysicalPosition};
use crate::event::{ElementState, MouseButton, MouseScrollDelta, TouchPhase, WindowEvent};
use crate::platform_impl::wayland::state::WinitState;
use crate::platform_impl::wayland::{self, DeviceId, WindowId};
use crate::platform_impl::wayland::{self, WindowId};
pub mod relative_pointer;
@ -59,8 +59,6 @@ impl PointerHandler for WinitState {
},
};
let device_id = crate::event::DeviceId(crate::platform_impl::DeviceId::Wayland(DeviceId));
for event in events {
let surface = &event.surface;
@ -124,8 +122,10 @@ impl PointerHandler for WinitState {
},
// Regular events on the main surface.
PointerEventKind::Enter { .. } => {
self.events_sink
.push_window_event(WindowEvent::CursorEntered { device_id }, window_id);
self.events_sink.push_window_event(
WindowEvent::CursorEntered { device_id: None },
window_id,
);
window.pointer_entered(Arc::downgrade(themed_pointer));
@ -133,7 +133,7 @@ impl PointerHandler for WinitState {
pointer.winit_data().inner.lock().unwrap().surface = Some(window_id);
self.events_sink.push_window_event(
WindowEvent::CursorMoved { device_id, position },
WindowEvent::CursorMoved { device_id: None, position },
window_id,
);
},
@ -144,11 +144,11 @@ impl PointerHandler for WinitState {
pointer.winit_data().inner.lock().unwrap().surface = None;
self.events_sink
.push_window_event(WindowEvent::CursorLeft { device_id }, window_id);
.push_window_event(WindowEvent::CursorLeft { device_id: None }, window_id);
},
PointerEventKind::Motion { .. } => {
self.events_sink.push_window_event(
WindowEvent::CursorMoved { device_id, position },
WindowEvent::CursorMoved { device_id: None, position },
window_id,
);
},
@ -164,7 +164,7 @@ impl PointerHandler for WinitState {
ElementState::Released
};
self.events_sink.push_window_event(
WindowEvent::MouseInput { device_id, state, button },
WindowEvent::MouseInput { device_id: None, state, button },
window_id,
);
},
@ -209,7 +209,7 @@ impl PointerHandler for WinitState {
};
self.events_sink.push_window_event(
WindowEvent::MouseWheel { device_id, delta, phase },
WindowEvent::MouseWheel { device_id: None, delta, phase },
window_id,
)
},