Make DeviceId/WindowId::dummy() safe (#3784)

This commit is contained in:
daxpedda
2024-07-14 13:14:32 +02:00
committed by Kirill Chibisov
parent 71dea4637d
commit 6509f8a18b
15 changed files with 31 additions and 33 deletions

View File

@@ -370,7 +370,7 @@ impl Shared {
}
runner.send_event(Event::DeviceEvent {
device_id: RootDeviceId(unsafe { DeviceId::dummy() }),
device_id: RootDeviceId(DeviceId::dummy()),
event: DeviceEvent::Key(RawKeyEvent {
physical_key: backend::event::key_code(&event),
state: ElementState::Pressed,
@@ -388,7 +388,7 @@ impl Shared {
}
runner.send_event(Event::DeviceEvent {
device_id: RootDeviceId(unsafe { DeviceId::dummy() }),
device_id: RootDeviceId(DeviceId::dummy()),
event: DeviceEvent::Key(RawKeyEvent {
physical_key: backend::event::key_code(&event),
state: ElementState::Released,