sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
805 stars 75 forks source link

update winit requirement from 0.19 to 0.24 #90

Closed SonnyX closed 3 years ago

SonnyX commented 3 years ago

Updates the requirements on winit to permit the latest version.

Release notes

Sourced from winit's releases.

v0.24.0

  • On Windows, fix applications not exiting gracefully due to thread_event_target_callback accessing corrupted memory.
  • On Windows, implement Window::set_ime_position.
  • Breaking: On Windows, Renamed WindowBuilderExtWindows's is_dark_mode to theme.
  • On Windows, add WindowBuilderExtWindows::with_theme to set a preferred theme.
  • On Windows, fix bug causing message boxes to appear delayed.
  • On Android, calling WindowEvent::Focused now works properly instead of always returning false.
  • On Windows, fix alt-tab behaviour by removing borderless fullscreen "always on top" flag.
  • On Windows, fix bug preventing windows with transparency enabled from having fully-opaque regions.
  • Breaking: On Windows, include prefix byte in scancodes.
  • On Wayland, fix window not being resizeable when using with_min_inner_size in WindowBuilder.
  • On Unix, fix cross-compiling to wasm32 without enabling X11 or Wayland.
  • On Windows, fix use after free crash during window destruction.
  • On Web, fix WindowEvent::ReceivedCharacter never being sent on key input.
  • On macOS, fix compilation when targeting aarch64
  • On X11, fix Window::request_redraw not waking the event loop.
  • On Wayland, the keypad arrow keys are now recognized.
  • Breaking Rename desktop::EventLoopExtDesktop to run_return::EventLoopExtRunReturn.
  • Added request_user_attention method to Window.
  • Breaking: On macOS, removed WindowExt::request_user_attention, use Window::request_user_attention.
  • Breaking: On X11, removed WindowExt::set_urgent, use Window::request_user_attention.
  • On Wayland, default font size in CSD increased from 11 to 17.
  • On Windows, fix bug causing message boxes to appear delayed.
  • On Android, support multi-touch.
  • On Wayland, extra mouse buttons are not dropped anymore.
  • Breaking: MouseButton::Other now uses u16.
Changelog

Sourced from winit's changelog.

0.24.0 (2020-12-09)

  • On Windows, fix applications not exiting gracefully due to thread_event_target_callback accessing corrupted memory.
  • On Windows, implement Window::set_ime_position.
  • Breaking: On Windows, Renamed WindowBuilderExtWindows's is_dark_mode to theme.
  • Breaking: On Windows, renamed WindowBuilderExtWindows::is_dark_mode to theme.
  • On Windows, add WindowBuilderExtWindows::with_theme to set a preferred theme.
  • On Windows, fix bug causing message boxes to appear delayed.
  • On Android, calling WindowEvent::Focused now works properly instead of always returning false.
  • On Windows, fix Alt-Tab behaviour by removing borderless fullscreen "always on top" flag.
  • On Windows, fix bug preventing windows with transparency enabled from having fully-opaque regions.
  • Breaking: On Windows, include prefix byte in scancodes.
  • On Wayland, fix window not being resizeable when using WindowBuilder::with_min_inner_size.
  • On Unix, fix cross-compiling to wasm32 without enabling X11 or Wayland.
  • On Windows, fix use-after-free crash during window destruction.
  • On Web, fix WindowEvent::ReceivedCharacter never being sent on key input.
  • On macOS, fix compilation when targeting aarch64.
  • On X11, fix Window::request_redraw not waking the event loop.
  • On Wayland, the keypad arrow keys are now recognized.
  • Breaking Rename desktop::EventLoopExtDesktop to run_return::EventLoopExtRunReturn.
  • Added request_user_attention method to Window.
  • Breaking: On macOS, removed WindowExt::request_user_attention, use Window::request_user_attention.
  • Breaking: On X11, removed WindowExt::set_urgent, use Window::request_user_attention.
  • On Wayland, default font size in CSD increased from 11 to 17.
  • On Windows, fix bug causing message boxes to appear delayed.
  • On Android, support multi-touch.
  • On Wayland, extra mouse buttons are not dropped anymore.
  • Breaking: MouseButton::Other now uses u16.

0.23.0 (2020-10-02)

  • On iOS, fixed support for the "Debug View Heirarchy" feature in Xcode.
  • On all platforms, available_monitors and primary_monitor are now on EventLoopWindowTarget rather than EventLoop to list monitors event in the event loop.
  • On Unix, X11 and Wayland are now optional features (enabled by default)
  • On X11, fix deadlock when calling set_fullscreen_inner.
  • On Web, prevent the webpage from scrolling when the user is focused on a winit canvas
  • On Web, calling window.set_cursor_icon no longer breaks HiDPI scaling
  • On Windows, drag and drop is now optional and must be enabled with WindowBuilderExtWindows::with_drag_and_drop(true).
  • On Wayland, fix deadlock when calling to set_inner_size from a callback.
  • On macOS, add hide__other_applications to EventLoopWindowTarget via existing EventLoopWindowTargetExtMacOS trait. hide_other_applications will hide other applications by calling -[NSApplication hideOtherApplications: nil].
  • On android added support for run_return.
  • On MacOS, Fixed fullscreen and dialog support for run_return.
  • On Windows, fix bug where we'd try to emit MainEventsCleared events during nested win32 event loops.
  • On Web, use mouse events if pointer events aren't supported. This affects Safari.
  • On Windows, set_ime_position is now a no-op instead of a runtime crash.
  • On Android, set_fullscreen is now a no-op instead of a runtime crash.
  • On iOS and Android, set_inner_size is now a no-op instead of a runtime crash.
  • On Android, fix ControlFlow::Poll not polling the Android event queue.
  • On macOS, add NSWindow.hasShadow support.
  • On Web, fix vertical mouse wheel scrolling being inverted.
Commits
  • 6db308f Release 0.24.0
  • 6f70fd9 Windows: Changed thread_event_target_callback's WM_DESTROY to WM_NCDESTROY (#...
  • db038d9 On Windows, implement 'Window::set_ime_position' with IMM API
  • c5620ef On Wayland, don't drop extra mouse buttons
  • 8fb7aa5 Android: Improved multi-touch (#1783)
  • 6ddee9a Ability to force a theme on Windows (#1666)
  • 5700359 Android: support multi-touch (#1776)
  • 0861a35 Add 'request_user_attention' to Window
  • f79efec Fix deprecation warning in the window icon example
  • 77d5d20 Windows: Delayed Message Boxes Fix. (#1769)
  • Additional commits viewable in compare view


pravic commented 3 years ago

It requires some adaptation in our code but yeah, it makes sense. Why did you close?

SonnyX commented 3 years ago

Because I first want to fix the build errors! :)

pravic commented 3 years ago

As far as I remember, they rearranged work with the events a bit and with the event loop. Nothing hard to rewrite.

SonnyX commented 3 years ago

Some stuff has been deprecated, however as it is, this builds. I recommend checking for yourself if the example still works properly however.

pravic commented 3 years ago

Oh, winit 0.19 contains backtrace crate that contains object crate that forces us to bump the MSRV. winit 0.20+, on the other hand, doesn't contain it.

pravic commented 3 years ago

@SonnyX I've reviewed this PR and decided to rewrite the example a bit differently, see 7062521. Well, the diff is quite ugly, but basically the rendering part was moved from the old WindowEvent::Refresh to a new Event::RedrawRequested, and the loop closure has been adapted to the new event loop model. Also, the keyboard modifiers are no longer a part of different events but rather are sent as a different event, see fdc7ba0.

SonnyX commented 3 years ago

Awesome, thanks for keeping the deps up to date :)