mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-23 18:36:34 +11:00
parent
1819be1173
commit
15a4fec3d9
2 changed files with 12 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
||||||
- `Icon::to_cardinals` is no longer public, since it was never supposed to be.
|
- `Icon::to_cardinals` is no longer public, since it was never supposed to be.
|
||||||
- Wayland: improve diagnostics if initialization fails
|
- Wayland: improve diagnostics if initialization fails
|
||||||
- Fix some system event key doesn't work when focused, do not block keyevent forward to system on macOS
|
- Fix some system event key doesn't work when focused, do not block keyevent forward to system on macOS
|
||||||
|
- On X11, the scroll wheel position is now correctly reset on i3 and other WMs that have the same quirk.
|
||||||
|
|
||||||
# Version 0.14.0 (2018-05-09)
|
# Version 0.14.0 (2018-05-09)
|
||||||
|
|
||||||
|
|
|
@ -804,15 +804,19 @@ impl EventsLoop {
|
||||||
let window_id = mkwid(xev.event);
|
let window_id = mkwid(xev.event);
|
||||||
let device_id = mkdid(xev.deviceid);
|
let device_id = mkdid(xev.deviceid);
|
||||||
|
|
||||||
let mut devices = self.devices.borrow_mut();
|
|
||||||
let physical_device = match devices.get_mut(&DeviceId(xev.sourceid)) {
|
|
||||||
Some(device) => device,
|
|
||||||
None => return,
|
|
||||||
};
|
|
||||||
if let Some(all_info) = DeviceInfo::get(&self.display, ffi::XIAllDevices) {
|
if let Some(all_info) = DeviceInfo::get(&self.display, ffi::XIAllDevices) {
|
||||||
|
let mut devices = self.devices.borrow_mut();
|
||||||
for device_info in all_info.iter() {
|
for device_info in all_info.iter() {
|
||||||
if device_info.deviceid == xev.sourceid {
|
if device_info.deviceid == xev.sourceid
|
||||||
physical_device.reset_scroll_position(device_info);
|
// This is needed for resetting to work correctly on i3, and
|
||||||
|
// presumably some other WMs. On those, `XI_Enter` doesn't include
|
||||||
|
// the physical device ID, so both `sourceid` and `deviceid` are
|
||||||
|
// the virtual device.
|
||||||
|
|| device_info.attachment == xev.sourceid {
|
||||||
|
let device_id = DeviceId(device_info.deviceid);
|
||||||
|
if let Some(device) = devices.get_mut(&device_id) {
|
||||||
|
device.reset_scroll_position(device_info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue