Available nowhere.
Expand description
§0.20.0
- On X11, fix
ModifiersChangedemitting incorrect modifier change events - Breaking: Overhaul how Winit handles DPI:
- Window functions and events now return
PhysicalSizeinstead ofLogicalSize. - Functions that take
SizeorPositiontypes can now take eitherLogicalorPhysicaltypes. hidpi_factorhas been renamed toscale_factor.HiDpiFactorChangedhas been renamed toScaleFactorChanged, and lets you control how the OS resizes the window in response to the change.- On X11, deprecate
WINIT_HIDPI_FACTORenvironment variable in favor ofWINIT_X11_SCALE_FACTOR. SizeandPositiontypes are now generic over their exact pixel type.
- Window functions and events now return
§0.20.0-alpha6
- On macOS, fix
set_cursor_visiblehides cursor outside of window. - On macOS, fix
CursorEnteredandCursorLeftevents fired at old window size. - On macOS, fix error when
set_fullscreenis called during fullscreen transition. - On all platforms except mobile and WASM, implement
Window::set_minimized. - On X11, fix
CursorEnteredevent 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::ThemeChangedvariant to handle changes to the system theme. Currently only implemented on Windows. - Breaking: Changes to the
RedrawRequestedevent (#1041):RedrawRequestedhas been moved fromWindowEventtoEvent.EventsClearedhas been renamed toMainEventsCleared.RedrawRequestedis now issued only afterMainEventsCleared.RedrawEventsClearedis issued after each set ofRedrawRequestedevents.
- Implement synthetic window focus key events on Windows.
- Breaking: Change
ModifiersStateto abitflagsstruct. - On Windows, implement
VirtualKeyCodetranslation forLWinandRWin. - On Windows, fix closing the last opened window causing
DeviceEvents to stop getting emitted. - On Windows, fix
Window::set_visiblenot setting internal flags correctly. This resulted in some weird behavior. - Add
DeviceEvent::ModifiersChanged.- Deprecate
modifiersfields in other events in favor ofModifiersChanged.
- Deprecate
- On X11,
WINIT_HIDPI_FACTORnow dominatesXft.dpiwhen picking DPI factor for output. - On X11, add special value
randrforWINIT_HIDPI_FACTORto make winit use self computed DPI factor instead of the one fromXft.dpi.
§0.20.0-alpha5
- On macOS, fix application termination on
ControlFlow::Exit - On Windows, fix missing
ReceivedCharacterevents when Alt is held. - On macOS, stop emitting private corporate characters in
ReceivedCharacterevents. - On X11, fix misreporting DPI factor at startup.
- On X11, fix events not being reported when using
run_return. - On X11, fix key modifiers being incorrectly reported.
- On X11, fix window creation hanging when another window is fullscreen.
- On Windows, fix focusing unfocused windows when switching from fullscreen to windowed.
- On X11, fix reporting incorrect DPI factor when waking from suspend.
- Change
EventLoopClosedto contain the original event. - Breaking: Add
is_syntheticfield toWindowEventvariantKeyboardInput, indicating that the event is generated by winit. - On X11, generate synthetic key events for keys held when a window gains or loses focus.
- On X11, issue a
CursorMovedevent when aTouchevent occurs, as X11 implicitly moves the cursor for such events.
§0.20.0-alpha4
- Add web support via the ‘stdweb’ or ‘web-sys’ features
- On Windows, implemented function to get HINSTANCE
- On macOS, implement
run_return. - On iOS, fix inverted parameter in
set_prefers_home_indicator_hidden. - On X11, performance is improved when rapidly calling
Window::set_cursor_icon. - On iOS, fix improper
msg_sendusage that was UB and/or would break if!is stabilized. - On Windows, unset
maximizedwhen manually changing the window’s position or size. - On Windows, add touch pressure information for touch events.
- On macOS, differentiate between
CursorIcon::GrabandCursorIcon::Grabbing. - On Wayland, fix event processing sometimes stalling when using OpenGL with vsync.
- Officially remove the Emscripten backend.
- On Windows, fix handling of surrogate pairs when dispatching
ReceivedCharacter. - On macOS 10.15, fix freeze upon exiting exclusive fullscreen mode.
- On iOS, fix panic upon closing the app.
- On X11, allow setting multiple
XWindowTypes. - On iOS, fix null window on initial
HiDpiFactorChangedevent. - On Windows, fix fullscreen window shrinking upon getting restored to a normal window.
- On macOS, fix events not being emitted during modal loops, such as when windows are being resized by the user.
- On Windows, fix hovering the mouse over the active window creating an endless stream of CursorMoved events.
- Always dispatch a
RedrawRequestedevent after creating a new window. - On X11, return dummy monitor data to avoid panicking when no monitors exist.
- On X11, prevent stealing input focus when creating a new window. Only steal input focus when entering fullscreen mode.
- On Wayland, fixed DeviceEvents for relative mouse movement is not always produced
- On Wayland, add support for set_cursor_visible and set_cursor_grab.
- On Wayland, fixed DeviceEvents for relative mouse movement is not always produced.
- Removed
derivativecrate dependency. - On Wayland, add support for set_cursor_icon.
- Use
impl Iterator<Item = MonitorHandle>instead ofAvailableMonitorsIterconsistently. - On macOS, fix fullscreen state being updated after entering fullscreen instead of before,
resulting in
Window::fullscreenreturning the old state inResizedevents instead of reflecting the new fullscreen state - On X11, fix use-after-free during window creation
- On Windows, disable monitor change keyboard shortcut while in exclusive fullscreen.
- On Windows, ensure that changing a borderless fullscreen window’s monitor via keyboard shortcuts keeps the window fullscreen on the new monitor.
- Prevent
EventLoop::newandEventLoop::with_user_eventfrom getting called outside the main thread.- This is because some platforms cannot run the event loop outside the main thread. Preventing this reduces the potential for cross-platform compatibility gotchyas.
- On Windows and Linux X11/Wayland, add platform-specific functions for creating an
EventLoopoutside the main thread. - On Wayland, drop resize events identical to the current window size.
- On Windows, fix window rectangle not getting set correctly on high-DPI systems.
§0.20.0-alpha3
- On macOS, drop the run closure on exit.
- On Windows, location of
WindowEvent::Touchare window client coordinates instead of screen coordinates. - On X11, fix delayed events after window redraw.
- On macOS, add
WindowBuilderExt::with_disallow_hidpito have the option to turn off best resolution openGL surface. - On Windows, screen saver won’t start if the window is in fullscreen mode.
- Change all occurrences of the
new_user_eventmethod towith_user_event. - On macOS, the dock and the menu bar are now hidden in fullscreen mode.
Window::set_fullscreennow takesOption<Fullscreen>whereFullscreenconsists ofFullscreen::Exclusive(VideoMode)andFullscreen::Borderless(MonitorHandle)variants.- Adds support for exclusive fullscreen mode.
- On iOS, add support for hiding the home indicator.
- On iOS, add support for deferring system gestures.
- On iOS, fix a crash that occurred while acquiring a monitor’s name.
- On iOS, fix armv7-apple-ios compile target.
- Removed the
T: Clonerequirement from theCloneimpl ofEventLoopProxy<T>. - On iOS, disable overscan compensation for external displays (removes black bars surrounding the image).
- On Linux, the functions
is_wayland,is_x11,xlib_xconnectionandwayland_displayhave been moved to a newEventLoopWindowTargetExtUnixtrait. - On iOS, add
set_prefers_status_bar_hiddenextension function instead of hijackingset_decorationsfor this purpose. - On macOS and iOS, corrected the auto trait impls of
EventLoopProxy. - On iOS, add touch pressure information for touch events.
- Implement
raw_window_handle::HasRawWindowHandleforWindowtype on all supported platforms. - On macOS, fix the signature of
-[NSView drawRect:]. - On iOS, fix the behavior of
ControlFlow::Poll. It wasn’t polling if that was the only mode ever used by the application. - On iOS, fix DPI sent out by views on creation was
0.0- now it gives a reasonable number. - On iOS, RedrawRequested now works for gl/metal backed views.
- On iOS, RedrawRequested is generally ordered after EventsCleared.
§0.20.0-alpha2
- On X11, non-resizable windows now have maximize explicitly disabled.
- On Windows, support paths longer than MAX_PATH (260 characters) in
WindowEvent::DroppedFileandWindowEvent::HoveredFile. - On Mac, implement
DeviceEvent::Button. - Change
Event::Suspended(true / false)toEvent::SuspendedandEvent::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.
- Revert the use of invisible surfaces in Wayland, which introduced graphical glitches with OpenGL (#835)
- On X11, implement
_NET_WM_PINGto allow desktop environment to kill unresponsive programs. - On Windows, when a window is initially invisible, it won’t take focus from the existing visible windows.
- On Windows, fix multiple calls to
request_redrawduringEventsClearedsending multipleRedrawRequested events. - On Windows, fix edge case where
RedrawRequestedcould be dispatched before input events in event loop iteration. - On Windows, fix timing issue that could cause events to be improperly dispatched after
RedrawRequestedbut beforeEventsCleared. - On macOS, drop unused Metal dependency.
- On Windows, fix the trail effect happening on transparent decorated windows. Borderless (or un-decorated) windows were not affected.
- On Windows, fix
with_maximizednot properly setting window size to entire window. - On macOS, change
WindowExtMacOS::request_user_attention()to take anenuminstead of abool.
§0.20.0-alpha1
- Changes below are considered breaking.
- Change all occurrences of
EventsLooptoEventLoop. - Previously flat API is now exposed through
event,event_loop,monitor, andwindowmodules. osmodule changes:- Renamed to
platform. - All traits now have platform-specific suffixes.
- Exposes new
desktopmodule on Windows, Mac, and Linux.
- Renamed to
- Changes to event loop types:
EventLoopProxy::wakeuphas been removed in favor ofsend_event.- Major: New
runmethod drives winit event loop.- Returns
!to ensure API behaves identically across all supported platforms.- This allows
emscriptenimplementation to work without lying about the API.
- This allows
ControlFlow’s variants have been replaced withWait,WaitUntil(Instant),Poll, andExit.- Is read after
EventsClearedis processed. Waitwaits until new events are available.WaitUntilwaits until either new events are available or the provided time has been reached.Pollinstantly resumes the event loop.Exitaborts the event loop.
- Is read after
- Takes a closure that implements
'static + FnMut(Event<T>, &EventLoop<T>, &mut ControlFlow).&EventLoop<T>is provided to allow newWindows to be created.
- Returns
- Major:
platform::desktopmodule exposesEventLoopExtDesktoptrait withrun_returnmethod.- Behaves identically to
run, but returns control flow to the calling context and can take non-'staticclosures.
- Behaves identically to
EventLoop’spoll_eventsandrun_forevermethods have been removed in favor ofrunandrun_return.
- Changes to events:
- Remove
Event::Awakenedin favor ofEvent::UserEvent(T).- Can be sent with
EventLoopProxy::send_event.
- Can be sent with
- Rename
WindowEvent::RefreshtoWindowEvent::RedrawRequested.RedrawRequestedcan be sent by the user with theWindow::request_redrawmethod.
EventLoop,EventLoopProxy, andEventare now generic overT, for use inUserEvent.- Major: Add
NewEvents(StartCause),EventsCleared, andLoopDestroyedvariants toEvent.NewEventsis emitted when new events are ready to be processed by event loop.StartCausedescribes why new events are available, withResumeTimeReached,Poll,WaitCancelled, andInit(sent once at start of loop).
EventsClearedis emitted when all available events have been processed.- Can be used to perform logic that depends on all events being processed (e.g. an iteration of a game loop).
LoopDestroyedis emitted when therunorrun_returnmethod is about to exit.
- Remove
- Rename
MonitorIdtoMonitorHandle. - Removed
serdeimplementations fromControlFlow. - Rename several functions to improve both internal consistency and compliance with Rust API guidelines.
- Remove
WindowBuilder::multitouchfield, since it was only implemented on a few platforms. Multitouch is always enabled now. - Breaking: On macOS, change
nsidentifiers to use snake_case for consistency with iOS’suiidentifiers. - Add
MonitorHandle::video_modesmethod for retrieving supported video modes for the given monitor. - On Wayland, the window now exists even if nothing has been drawn.
- On Windows, fix initial dimensions of a fullscreen window.
- On Windows, Fix transparent borderless windows rendering wrong.