mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 14:50:04 -04:00
Fix CI for Rust v1.80 (#3822)
`clippy::doc_lazy_continuation` was added, which needed some fixing from our side.
This commit is contained in:
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
- On X11, non-resizable windows now have maximize explicitly disabled.
|
- On X11, non-resizable windows now have maximize explicitly disabled.
|
||||||
- On Windows, support paths longer than MAX_PATH (260 characters) in `WindowEvent::DroppedFile`
|
- On Windows, support paths longer than MAX_PATH (260 characters) in `WindowEvent::DroppedFile`
|
||||||
and `WindowEvent::HoveredFile`.
|
and `WindowEvent::HoveredFile`.
|
||||||
- On Mac, implement `DeviceEvent::Button`.
|
- On Mac, implement `DeviceEvent::Button`.
|
||||||
- Change `Event::Suspended(true / false)` to `Event::Suspended` and `Event::Resumed`.
|
- Change `Event::Suspended(true / false)` to `Event::Suspended` and `Event::Resumed`.
|
||||||
- On X11, fix sanity check which checks that a monitor's reported width and height (in millimeters) are non-zero when calculating the DPI factor.
|
- On X11, fix sanity check which checks that a monitor's reported width and height (in millimeters) are non-zero when calculating the DPI factor.
|
||||||
|
|||||||
@@ -3,20 +3,20 @@
|
|||||||
- Added event `WindowEvent::HiDPIFactorChanged`.
|
- Added event `WindowEvent::HiDPIFactorChanged`.
|
||||||
- Added method `MonitorId::get_hidpi_factor`.
|
- Added method `MonitorId::get_hidpi_factor`.
|
||||||
- Deprecated `get_inner_size_pixels` and `get_inner_size_points` methods of `Window` in favor of
|
- Deprecated `get_inner_size_pixels` and `get_inner_size_points` methods of `Window` in favor of
|
||||||
`get_inner_size`.
|
`get_inner_size`.
|
||||||
- **Breaking:** `EventsLoop` is `!Send` and `!Sync` because of platform-dependant constraints,
|
- **Breaking:** `EventsLoop` is `!Send` and `!Sync` because of platform-dependant constraints,
|
||||||
but `Window`, `WindowId`, `DeviceId` and `MonitorId` guaranteed to be `Send`.
|
but `Window`, `WindowId`, `DeviceId` and `MonitorId` guaranteed to be `Send`.
|
||||||
- `MonitorId::get_position` now returns `(i32, i32)` instead of `(u32, u32)`.
|
- `MonitorId::get_position` now returns `(i32, i32)` instead of `(u32, u32)`.
|
||||||
- Rewrite of the wayland backend to use wayland-client-0.11
|
- Rewrite of the wayland backend to use wayland-client-0.11
|
||||||
- Support for dead keys on wayland for keyboard utf8 input
|
- Support for dead keys on wayland for keyboard utf8 input
|
||||||
- Monitor enumeration on Windows is now implemented using `EnumDisplayMonitors` instead of
|
- Monitor enumeration on Windows is now implemented using `EnumDisplayMonitors` instead of
|
||||||
`EnumDisplayDevices`. This changes the value returned by `MonitorId::get_name()`.
|
`EnumDisplayDevices`. This changes the value returned by `MonitorId::get_name()`.
|
||||||
- On Windows added `MonitorIdExt::hmonitor` method
|
- On Windows added `MonitorIdExt::hmonitor` method
|
||||||
- Impl `Clone` for `EventsLoopProxy`
|
- Impl `Clone` for `EventsLoopProxy`
|
||||||
- `EventsLoop::get_primary_monitor()` on X11 will fallback to any available monitor if no primary is found
|
- `EventsLoop::get_primary_monitor()` on X11 will fallback to any available monitor if no primary is found
|
||||||
- Support for touch event on wayland
|
- Support for touch event on wayland
|
||||||
- `WindowEvent`s `MouseMoved`, `MouseEntered`, and `MouseLeft` have been renamed to
|
- `WindowEvent`s `MouseMoved`, `MouseEntered`, and `MouseLeft` have been renamed to
|
||||||
`CursorMoved`, `CursorEntered`, and `CursorLeft`.
|
`CursorMoved`, `CursorEntered`, and `CursorLeft`.
|
||||||
- New `DeviceEvent`s added, `MouseMotion` and `MouseWheel`.
|
- New `DeviceEvent`s added, `MouseMotion` and `MouseWheel`.
|
||||||
- Send `CursorMoved` event after `CursorEntered` and `Focused` events.
|
- Send `CursorMoved` event after `CursorEntered` and `Focused` events.
|
||||||
- Add support for `ModifiersState`, `MouseMove`, `MouseInput`, `MouseMotion` for emscripten backend.
|
- Add support for `ModifiersState`, `MouseMove`, `MouseInput`, `MouseMotion` for emscripten backend.
|
||||||
|
|||||||
@@ -565,8 +565,7 @@ pub struct KeyEvent {
|
|||||||
///
|
///
|
||||||
/// This has two use cases:
|
/// This has two use cases:
|
||||||
/// - Allows querying whether the current input is a Dead key.
|
/// - Allows querying whether the current input is a Dead key.
|
||||||
/// - Allows handling key-bindings on platforms which don't
|
/// - Allows handling key-bindings on platforms which don't support [`key_without_modifiers`].
|
||||||
/// support [`key_without_modifiers`].
|
|
||||||
///
|
///
|
||||||
/// If you use this field (or [`key_without_modifiers`] for that matter) for keyboard
|
/// If you use this field (or [`key_without_modifiers`] for that matter) for keyboard
|
||||||
/// shortcuts, **it is important that you provide users with a way to configure your
|
/// shortcuts, **it is important that you provide users with a way to configure your
|
||||||
@@ -574,8 +573,8 @@ pub struct KeyEvent {
|
|||||||
/// incompatible keyboard layout.**
|
/// incompatible keyboard layout.**
|
||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
/// - **Web:** Dead keys might be reported as the real key instead
|
/// - **Web:** Dead keys might be reported as the real key instead of `Dead` depending on the
|
||||||
/// of `Dead` depending on the browser/OS.
|
/// browser/OS.
|
||||||
///
|
///
|
||||||
/// [`key_without_modifiers`]: crate::platform::modifier_supplement::KeyEventExtModifierSupplement::key_without_modifiers
|
/// [`key_without_modifiers`]: crate::platform::modifier_supplement::KeyEventExtModifierSupplement::key_without_modifiers
|
||||||
pub logical_key: keyboard::Key,
|
pub logical_key: keyboard::Key,
|
||||||
|
|||||||
@@ -70,11 +70,11 @@ pub trait EventLoopExtPumpEvents {
|
|||||||
///
|
///
|
||||||
/// ## Unsupported Platforms
|
/// ## Unsupported Platforms
|
||||||
///
|
///
|
||||||
/// - **Web:** This API is fundamentally incompatible with the event-based way in which
|
/// - **Web:** This API is fundamentally incompatible with the event-based way in which Web
|
||||||
/// Web browsers work because it's not possible to have a long-running external
|
/// browsers work because it's not possible to have a long-running external loop that would
|
||||||
/// loop that would block the browser and there is nothing that can be
|
/// block the browser and there is nothing that can be polled to ask for new new events.
|
||||||
/// polled to ask for new new events. Events are delivered via callbacks based
|
/// Events are delivered via callbacks based on an event loop that is internal to the browser
|
||||||
/// on an event loop that is internal to the browser itself.
|
/// itself.
|
||||||
/// - **iOS:** It's not possible to stop and start an `NSApplication` repeatedly on iOS so
|
/// - **iOS:** It's not possible to stop and start an `NSApplication` repeatedly on iOS so
|
||||||
/// there's no way to support the same approach to polling as on MacOS.
|
/// there's no way to support the same approach to polling as on MacOS.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -263,8 +263,7 @@ pub fn get_keyboard_physical_key(keyboard: RAWKEYBOARD) -> Option<PhysicalKey> {
|
|||||||
scancode_to_physicalkey(scancode as u32)
|
scancode_to_physicalkey(scancode as u32)
|
||||||
};
|
};
|
||||||
if keyboard.VKey == VK_SHIFT {
|
if keyboard.VKey == VK_SHIFT {
|
||||||
if let PhysicalKey::Code(code) = physical_key {
|
if let PhysicalKey::Code(
|
||||||
match code {
|
|
||||||
KeyCode::NumpadDecimal
|
KeyCode::NumpadDecimal
|
||||||
| KeyCode::Numpad0
|
| KeyCode::Numpad0
|
||||||
| KeyCode::Numpad1
|
| KeyCode::Numpad1
|
||||||
@@ -275,7 +274,9 @@ pub fn get_keyboard_physical_key(keyboard: RAWKEYBOARD) -> Option<PhysicalKey> {
|
|||||||
| KeyCode::Numpad6
|
| KeyCode::Numpad6
|
||||||
| KeyCode::Numpad7
|
| KeyCode::Numpad7
|
||||||
| KeyCode::Numpad8
|
| KeyCode::Numpad8
|
||||||
| KeyCode::Numpad9 => {
|
| KeyCode::Numpad9,
|
||||||
|
) = physical_key
|
||||||
|
{
|
||||||
// On Windows, holding the Shift key makes numpad keys behave as if NumLock
|
// On Windows, holding the Shift key makes numpad keys behave as if NumLock
|
||||||
// wasn't active. The way this is exposed to applications by the system is that
|
// wasn't active. The way this is exposed to applications by the system is that
|
||||||
// the application receives a fake key release event for the shift key at the
|
// the application receives a fake key release event for the shift key at the
|
||||||
@@ -293,9 +294,6 @@ pub fn get_keyboard_physical_key(keyboard: RAWKEYBOARD) -> Option<PhysicalKey> {
|
|||||||
// "The shift key overrides NumLock"
|
// "The shift key overrides NumLock"
|
||||||
// https://devblogs.microsoft.com/oldnewthing/20040906-00/?p=37953
|
// https://devblogs.microsoft.com/oldnewthing/20040906-00/?p=37953
|
||||||
return None;
|
return None;
|
||||||
},
|
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -416,8 +416,8 @@ impl WindowAttributes {
|
|||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
///
|
///
|
||||||
/// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely
|
/// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely prevent all
|
||||||
/// prevent all apps from reading the window content, for instance, QuickTime.
|
/// apps from reading the window content, for instance, QuickTime.
|
||||||
/// - **iOS / Android / Web / x11 / Orbital:** Ignored.
|
/// - **iOS / Android / Web / x11 / Orbital:** Ignored.
|
||||||
///
|
///
|
||||||
/// [`NSWindowSharingNone`]: https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone
|
/// [`NSWindowSharingNone`]: https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone
|
||||||
@@ -1394,8 +1394,8 @@ impl Window {
|
|||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
///
|
///
|
||||||
/// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely
|
/// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely prevent all
|
||||||
/// prevent all apps from reading the window content, for instance, QuickTime.
|
/// apps from reading the window content, for instance, QuickTime.
|
||||||
/// - **iOS / Android / x11 / Wayland / Web / Orbital:** Unsupported.
|
/// - **iOS / Android / x11 / Wayland / Web / Orbital:** Unsupported.
|
||||||
///
|
///
|
||||||
/// [`NSWindowSharingNone`]: https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone
|
/// [`NSWindowSharingNone`]: https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone
|
||||||
|
|||||||
Reference in New Issue
Block a user