Releases: rust-windowing/winit
Releases · rust-windowing/winit
v0.26.0
- Update
raw-window-handle
tov0.4
. This is not a breaking change, we still implementHasRawWindowHandle
fromv0.3
, see rust-windowing/raw-window-handle#74. Note that you might have to runcargo update -p raw-window-handle
after upgrading. - On X11, bump
mio
to 0.8. - On Android, fixed
WindowExtAndroid::config
initially returning an emptyConfiguration
. - On Android, fixed
Window::scale_factor
andMonitorHandle::scale_factor
initially always returning 1.0. - On X11, select an appropriate visual for transparency if is requested
- On Wayland and X11, fix diagonal window resize cursor orientation.
- On macOS, drop the event callback before exiting.
- On Android, implement
Window::request_redraw
- Breaking: On Web, remove the
stdweb
backend. - Added
Window::focus_window
to bring the window to the front and set input focus. - On Wayland and X11, implement
is_maximized
method onWindow
. - On Windows, prevent ghost window from showing up in the taskbar after either several hours of use or restarting
explorer.exe
. - On macOS, fix issue where
ReceivedCharacter
was not being emitted during some key repeat events. - On Wayland, load cursor icons
hand2
andhand1
forCursorIcon::Hand
. - Breaking: On Wayland, Theme trait and its support types are dropped.
- On Wayland, bump
smithay-client-toolkit
to 0.15.1. - On Wayland, implement
request_user_attention
withxdg_activation_v1
. - On X11, emit missing
WindowEvent::ScaleFactorChanged
when the only monitor gets reconnected. - On X11, if RANDR based scale factor is higher than 20 reset it to 1
- On Wayland, add an enabled-by-default feature called
wayland-dlopen
so users can opt out of usingdlopen
to load system libraries. - Breaking: On Android, bump
ndk
andndk-glue
to 0.5. - On Windows, increase wait timer resolution for more accurate timing when using
WaitUntil
. - On macOS, fix native file dialogs hanging the event loop.
- On Wayland, implement a workaround for wrong configure size when using
xdg_decoration
inkwin_wayland
- On macOS, fix an issue that prevented the menu bar from showing in borderless fullscreen mode.
- On X11, EINTR while polling for events no longer causes a panic. Instead it will be treated as a spurious wakeup.
v0.25.0
- Breaking: On macOS, replace
WindowBuilderExtMacOS::with_activation_policy
withEventLoopExtMacOS::set_activation_policy
- On macOS, wait with activating the application until the application has initialized.
- On macOS, fix creating new windows when the application has a main menu.
- On Windows, fix fractional deltas for mouse wheel device events.
- On macOS, fix segmentation fault after dropping the main window.
- On Android,
InputEvent::KeyEvent
is partially implemented providing the key scancode. - Added
is_maximized
method toWindow
. - On Windows, fix bug where clicking the decoration bar would make the cursor blink.
- On Windows, fix bug causing newly created windows to erroneously display the "wait" (spinning) cursor.
- On macOS, wake up the event loop immediately when a redraw is requested.
- On Windows, change the default window size (1024x768) to match the default on other desktop platforms (800x600).
- On Windows, fix bug causing mouse capture to not be released.
- On Windows, fix fullscreen not preserving minimized/maximized state.
- On Android, unimplemented events are marked as unhandled on the native event loop.
- On Windows, added
WindowBuilderExtWindows::with_menu
to set a custom menu at window creation time. - On Android, bump
ndk
andndk-glue
to 0.3: use predefined constants for eventident
. - On macOS, fix objects captured by the event loop closure not being dropped on panic.
- On Windows, fixed
WindowEvent::ThemeChanged
not properly firing and fixedWindow::theme
returning the wrong theme. - On Web, added support for
DeviceEvent::MouseMotion
to listen for relative mouse movements. - Added
WindowBuilder::with_position
to allow setting the position of aWindow
on creation. Supported on Windows, macOS and X11. - Added
Window::drag_window
. Implemented on Windows, macOS, X11 and Wayland. - On X11, bump
mio
to 0.7. - On Windows, added
WindowBuilderExtWindows::with_owner_window
to allow creating popup windows. - On Windows, added
WindowExtWindows::set_enable
to allow creating modal popup windows. - On macOS, emit
RedrawRequested
events immediately while the window is being resized. - Implement
Default
,Hash
, andEq
forLogicalPosition
,PhysicalPosition
,LogicalSize
, andPhysicalSize
. - On macOS, initialize the Menu Bar with minimal defaults. (Can be prevented using
enable_default_menu_creation
) - On macOS, change the default behavior for first click when the window was unfocused. Now the window becomes focused and then emits a
MouseInput
event on a "first mouse click". - Implement mint (math interoperability standard types) conversions (under feature flag
mint
).
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
'sis_dark_mode
totheme
. - 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
inWindowBuilder
. - 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
torun_return::EventLoopExtRunReturn
. - Added
request_user_attention
method toWindow
. - Breaking: On macOS, removed
WindowExt::request_user_attention
, useWindow::request_user_attention
. - Breaking: On X11, removed
WindowExt::set_urgent
, useWindow::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 usesu16
.
v0.23.0
- On iOS, fixed support for the "Debug View Heirarchy" feature in Xcode.
- On all platforms,
available_monitors
andprimary_monitor
are now onEventLoopWindowTarget
rather thanEventLoop
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
toEventLoopWindowTarget
via existingEventLoopWindowTargetExtMacOS
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.
- On Web, implement mouse capturing for click-dragging out of the canvas.
- On Web, fix
ControlFlow::Exit
not properly handled. - On Web (web-sys only), send
WindowEvent::ScaleFactorChanged
event whenwindow.devicePixelRatio
is changed. - Breaking: On Web,
set_cursor_position
andset_cursor_grab
will now always return an error. - Breaking:
PixelDelta
scroll events now return aPhysicalPosition
. - On NetBSD, fixed crash due to incorrect detection of the main thread.
- Breaking: On X11,
-
key is mapped to theMinus
virtual key code, instead ofSubtract
. - On macOS, fix inverted horizontal scroll.
- Breaking:
current_monitor
now returnsOption<MonitorHandle>
. - Breaking:
primary_monitor
now returnsOption<MonitorHandle>
. - On macOS, updated core-* dependencies and cocoa.
- Bump
parking_lot
to 0.11 - On Android, bump
ndk
,ndk-sys
andndk-glue
to 0.2. Checkout the new ndk-glue main proc attribute. - On iOS, fixed starting the app in landscape where the view still had portrait dimensions.
- Deprecate the stdweb backend, to be removed in a future release
- Breaking: Prefixed virtual key codes
Add
,Multiply
,Divide
,Decimal
, andSubtract
withNumpad
. - Added
Asterisk
andPlus
virtual key codes. - On Web (web-sys only), the
Event::LoopDestroyed
event is correctly emitted when leaving the page. - On Web, the
WindowEvent::Destroyed
event now gets emitted when aWindow
is dropped. - On Web (web-sys only), the event listeners are now removed when a
Window
is dropped or when the event loop is destroyed. - On Web, the event handler closure passed to
EventLoop::run
now gets dropped after the event loop is destroyed. - Breaking: On Web, the canvas element associated to a
Window
is no longer removed from the DOM when theWindow
is dropped. - On Web,
WindowEvent::Resized
is now emitted whenWindow::set_inner_size
is called. - Breaking:
Fullscreen
enum now usesBorderless(Option<MonitorHandle>)
instead ofBorderless(MonitorHandle)
to allow picking the current monitor. - On MacOS, fix
WindowEvent::Moved
ignoring the scale factor. - On Wayland, add missing virtual keycodes.
- On Wayland, implement proper
set_cursor_grab
. - On Wayland, the cursor will use similar icons if the requested one isn't available.
- On Wayland, right clicking on client side decorations will request application menu.
- On Wayland, fix tracking of window size after state changes.
- On Wayland, fix client side decorations not being hidden properly in fullscreen.
- On Wayland, fix incorrect size event when entering fullscreen with client side decorations.
- On Wayland, fix
resizable
attribute not being applied properly on startup. - On Wayland, fix disabled repeat rate not being handled.
- On Wayland, fix decoration buttons not working after tty switch.
- On Wayland, fix scaling not being applied on output re-enable.
- On Wayland, fix crash when
XCURSOR_SIZE
is0
. - On Wayland, fix pointer getting created in some cases without pointer capability.
- On Wayland, on kwin, fix space between window and decorations on startup.
- Breaking: On Wayland,
Theme
trait was reworked. - On Wayland, disable maximize button for non-resizable window.
- On Wayland, added support for
set_ime_position
. - On Wayland, fix crash on startup since GNOME 3.37.90.
- On X11, fix incorrect modifiers state on startup.
v0.22.2
- Added Clone implementation for 'static events.
- On Windows, fix window intermittently hanging when
ControlFlow
was set toPoll
. - On Windows, fix
WindowBuilder::with_maximized
being ignored. - On Android, minimal platform support.
- On iOS, touch positions are now properly converted to physical pixels.
- On macOS, updated core-* dependencies and cocoa
v0.22.1
v0.22.0
- On Windows, fix minor timing issue in wait_until_time_or_msg
- On Windows, rework handling of request_redraw() to address panics.
- On macOS, fix
set_simple_screen
to remember frame excluding title bar. - On Wayland, fix coordinates in touch events when scale factor isn't 1.
- On Wayland, fix color from
close_button_icon_color
not applying. - Ignore locale if unsupported by X11 backend
- On Wayland, Add HiDPI cursor support
- On Web, add the ability to query "Light" or "Dark" system theme send
ThemeChanged
on change. - Fix
Event::to_static
returningNone
for user events. - On Wayland, Hide CSD for fullscreen windows.
- On Windows, ignore spurious mouse move messages.
- Breaking: Move
ModifiersChanged
variant fromDeviceEvent
toWindowEvent
. - On Windows, add
IconExtWindows
trait which exposes creating anIcon
from an external file or embedded resource - Add
BadIcon::OsError
variant for when OS icon functionality fails - On Windows, fix crash at startup on systems that do not properly support Windows' Dark Mode
- Revert On macOS, fix not sending ReceivedCharacter event for specific keys combinations.
- on macOS, fix incorrect ReceivedCharacter events for some key combinations.
- Breaking: Use
i32
instead ofu32
for position type inWindowEvent::Moved
.
v0.21.0
- On Windows, fixed "error: linking with
link.exe
failed: exit code: 1120" error on older versions of windows. - On macOS, fix set_minimized(true) works only with decorations.
- On macOS, add
hide_application
toEventLoopWindowTarget
via a newEventLoopWindowTargetExtMacOS
trait.hide_application
will hide the entire application by calling-[NSApplication hide: nil]
. - On macOS, fix not sending ReceivedCharacter event for specific keys combinations.
- On macOS, fix
CursorMoved
event reporting the cursor position using logical coordinates. - On macOS, fix issue where unbundled applications would sometimes open without being focused.
- On macOS, fix
run_return
does not return unless it receives a message. - On Windows, fix bug where
RedrawRequested
would only get emitted every other iteration of the event loop. - On X11, fix deadlock on window state when handling certain window events.
WindowBuilder
now implementsDefault
.- Breaking:
WindowEvent::CursorMoved
changed tof64
units, preserving high-precision data supplied by most backends - On Wayland, fix coordinates in mouse events when scale factor isn't 1
- On Web, add the ability to provide a custom canvas
- Breaking: On Wayland, the
WaylandTheme
struct has been replaced with aTheme
trait, allowing for extra configuration
v0.20.0
- Breaking: Overhaul how Winit handles DPI:
- Window functions and events now return
PhysicalSize
instead ofLogicalSize
. - Functions that take
Size
orPosition
types can now take eitherLogical
orPhysical
types. hidpi_factor
has been renamed toscale_factor
.HiDpiFactorChanged
has been renamed toScaleFactorChanged
, and lets you control how the OS
resizes the window in response to the change.- On X11, deprecate
WINIT_HIDPI_FACTOR
environment variable in favor ofWINIT_X11_SCALE_FACTOR
. Size
andPosition
types are now generic over their exact pixel type.
- Window functions and events now return
v0.20.0-alpha6
- On macOS, fix
set_cursor_visible
hides cursor outside of window. - On macOS, fix
CursorEntered
andCursorLeft
events fired at old window size. - On macOS, fix error when
set_fullscreen
is called during fullscreen transition. - On all platforms except mobile and WASM, implement
Window::set_minimized
. - On X11, fix
CursorEntered
event being generated for non-winit windows. - On macOS, fix crash when starting maximized without decorations.
- On macOS, fix application not terminating on
run_return
. - On Wayland, fix cursor icon updates on window borders when using CSD.
- On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when starting window in maximized mode.
- On Windows, theme the title bar according to whether the system theme is "Light" or "Dark".
- Added
WindowEvent::ThemeChanged
variant to handle changes to the system theme. Currently only implemented on Windows. - Breaking: Changes to the
RedrawRequested
event (#1041):RedrawRequested
has been moved fromWindowEvent
toEvent
.EventsCleared
has been renamed toMainEventsCleared
.RedrawRequested
is now issued only afterMainEventsCleared
.RedrawEventsCleared
is issued after each set ofRedrawRequested
events.
- Implement synthetic window focus key events on Windows.
- Breaking: Change
ModifiersState
to abitflags
struct. - On Windows, implement
VirtualKeyCode
translation forLWin
andRWin
. - On Windows, fix closing the last opened window causing
DeviceEvent
s to stop getting emitted. - On Windows, fix
Window::set_visible
not setting internal flags correctly. This resulted in some weird behavior. - Add
DeviceEvent::ModifiersChanged
.- Deprecate
modifiers
fields in other events in favor ofModifiersChanged
.
- Deprecate
- On X11,
WINIT_HIDPI_FACTOR
now dominatesXft.dpi
when picking DPI factor for output. - On X11, add special value
randr
forWINIT_HIDPI_FACTOR
to make winit use self computed DPI factor instead of the one fromXft.dpi
.