2022-01-23 23:55:33 +11:00
# Changelog
All notable changes to this project will be documented in this file.
Please keep one empty line before and after all headers. (This is required for `git` to produce a conflict when a release is made while a PR is open and the PR's changelog entry would go into the wrong section).
And please only add new entries to the top of this list, right below the `# Unreleased` header.
2022-01-11 11:23:20 +11:00
# Unreleased
2022-06-11 08:45:24 +10:00
- Build docs on `docs.rs` for iOS and Android as well.
2022-06-11 03:05:28 +10:00
- **Breaking:** Removed the `WindowAttributes` struct, since all its functionality is accessible from `WindowBuilder` .
2022-06-10 00:08:52 +10:00
- On macOS, Fix emitting `Event::LoopDestroyed` on CMD+Q.
2022-06-09 01:22:54 +10:00
- On macOS, fixed an issue where having multiple windows would prevent run_return from ever returning.
2022-05-01 23:21:34 +10:00
- On Wayland, fix bug where the cursor wouldn't hide in GNOME.
2022-04-13 03:10:46 +10:00
- On macOS, Windows, and Wayland, add `set_cursor_hittest` to let the window ignore mouse events.
2022-04-02 05:21:09 +11:00
- On Windows, added `WindowExtWindows::set_skip_taskbar` and `WindowBuilderExtWindows::with_skip_taskbar` .
- On Windows, added `EventLoopBuilderExtWindows::with_msg_hook` .
2022-03-27 08:59:13 +11:00
- On Windows, remove internally unique DC per window.
2022-04-13 03:10:46 +10:00
- On macOS, remove the need to call `set_ime_position` after moving the window.
2022-02-18 05:44:14 +11:00
- Added `Window::is_visible` .
2022-02-18 02:03:17 +11:00
- Added `Window::is_resizable` .
2022-02-18 00:31:13 +11:00
- Added `Window::is_decorated` .
2022-02-04 22:13:04 +11:00
- On X11, fix for repeated event loop iteration when `ControlFlow` was `Wait`
2022-04-01 01:43:48 +11:00
- On X11, fix scale factor calculation when the only monitor is reconnected
2022-02-03 21:46:29 +11:00
- On Wayland, report unaccelerated mouse deltas in `DeviceEvent::MouseMotion` .
2022-02-01 10:14:36 +11:00
- **Breaking:** Bump `ndk` version to 0.6, ndk-sys to `v0.3` , `ndk-glue` to `0.6` .
2022-01-24 06:38:08 +11:00
- Remove no longer needed `WINIT_LINK_COLORSYNC` environment variable.
2022-01-11 11:23:20 +11:00
- **Breaking:** Rename the `Exit` variant of `ControlFlow` to `ExitWithCode` , which holds a value to control the exit code after running. Add an `Exit` constant which aliases to `ExitWithCode(0)` instead to avoid major breakage. This shouldn't affect most existing programs.
2022-02-17 08:09:03 +11:00
- Add `EventLoopBuilder` , which allows you to create and tweak the settings of an event loop before creating it.
- Deprecated `EventLoop::with_user_event` ; use `EventLoopBuilder::with_user_event` instead.
- **Breaking:** Replaced `EventLoopExtMacOS` with `EventLoopBuilderExtMacOS` (which also has renamed methods).
- **Breaking:** Replaced `EventLoopExtWindows` with `EventLoopBuilderExtWindows` (which also has renamed methods).
- **Breaking:** Replaced `EventLoopExtUnix` with `EventLoopBuilderExtUnix` (which also has renamed methods).
2022-03-08 08:58:12 +11:00
- **Breaking:** The platform specific extensions for Windows `winit::platform::windows` have changed. All `HANDLE` -like types e.g. `HWND` and `HMENU` were converted from winapi types or `*mut c_void` to `isize` . This was done to be consistent with the type definitions in windows-sys and to not expose internal dependencies.
- The internal bindings to the [Windows API ](https://docs.microsoft.com/en-us/windows/ ) were changed from the unofficial [winapi ](https://github.com/retep998/winapi-rs ) bindings to the official Microsoft [windows-sys ](https://github.com/microsoft/windows-rs ) bindings.
2022-03-12 02:15:33 +11:00
- On Wayland, fix polling during consecutive `EventLoop::run_return` invocations.
2022-03-27 02:43:13 +11:00
- On Windows, fix race issue creating fullscreen windows with `WindowBuilder::with_fullscreen`
2022-04-02 03:16:59 +11:00
- On Android, `virtual_keycode` for `KeyboardInput` events is now filled in where a suitable match is found.
2022-04-10 11:32:02 +10:00
- Added helper methods on `ControlFlow` to set its value.
2022-04-12 03:13:28 +10:00
- On Wayland, fix `TouchPhase::Ended` always reporting the location of the first touch down, unless the compositor
sent a cancel or frame event.
2022-04-12 03:51:21 +10:00
- On iOS, send `RedrawEventsCleared` even if there are no redraw events, consistent with other platforms.
2022-04-20 08:56:56 +10:00
- **Breaking:** Replaced `Window::with_app_id` and `Window::with_class` with `Window::with_name` on `WindowBuilderExtUnix` .
2022-05-20 10:09:23 +10:00
- On Wayland, fallback CSD was replaced with proper one:
- `WindowBuilderExtUnix::with_wayland_csd_theme` to set color theme in builder.
- `WindowExtUnix::wayland_set_csd_theme` to set color theme when creating a window.
- `WINIT_WAYLAND_CSD_THEME` env variable was added, it can be used to set "dark"/"light" theme in apps that don't expose theme setting.
- `wayland-csd-adwaita` feature that enables proper CSD with title rendering using FreeType system library.
- `wayland-csd-adwaita-notitle` feature that enables CSD but without title rendering.
2022-04-25 06:35:18 +10:00
- On Wayland and X11, fix window not resizing with `Window::set_inner_size` after calling `Window:set_resizable(false)` .
2022-04-30 21:21:08 +10:00
- On Windows, fix wrong fullscreen monitors being recognized when handling WM_WINDOWPOSCHANGING messages
2022-05-07 12:29:25 +10:00
- **Breaking:** Added new `WindowEvent::Ime` supported on desktop platforms.
- Added `Window::set_ime_allowed` supported on desktop platforms.
- **Breaking:** IME input on desktop platforms won't be received unless it's explicitly allowed via `Window::set_ime_allowed` and new `WindowEvent::Ime` events are handled.
2022-05-24 05:53:07 +10:00
- On macOS, `WindowEvent::Resized` is now emitted in `frameDidChange` instead of `windowDidResize` .
2022-06-08 07:17:45 +10:00
- **Breaking:** On X11, device events are now ignored for unfocused windows by default, use `EventLoopWindowTarget::set_device_event_filter` to set the filter level.
2022-06-10 20:43:33 +10:00
- Implemented `Default` on `EventLoop<()>` .
- Implemented `Eq` for `Fullscreen` , `Theme` , and `UserAttentionType` .
2022-01-11 11:23:20 +11:00
2022-01-06 01:38:59 +11:00
# 0.26.1 (2022-01-05)
2021-12-11 13:14:31 +11:00
2022-01-06 00:38:24 +11:00
- Fix linking to the `ColorSync` framework on macOS 10.7, and in newer Rust versions.
2022-01-05 21:13:46 +11:00
- On Web, implement cursor grabbing through the pointer lock API.
2021-12-11 13:14:31 +11:00
- On X11, add mappings for numpad comma, numpad enter, numlock and pause.
2022-01-03 08:01:51 +11:00
- On macOS, fix Pinyin IME input by reverting a change that intended to improve IME.
2022-01-03 23:54:31 +11:00
- On Windows, fix a crash with transparent windows on Windows 11.
2022-03-14 00:22:02 +11:00
- **Breaking:**: Reverse horizontal scrolling sign in `MouseScrollDelta` to match the direction of vertical scrolling. A positive X value now means moving the content to the right. The meaning of vertical scrolling stays the same: a positive Y value means moving the content down.
2021-12-11 13:14:31 +11:00
2021-12-01 22:43:38 +11:00
# 0.26.0 (2021-12-01)
2021-05-20 02:39:53 +10:00
2021-12-07 07:53:56 +11:00
- Update `raw-window-handle` to `v0.4` . This is _not_ a breaking change, we still implement `HasRawWindowHandle` from `v0.3` , see [rust-windowing/raw-window-handle#74 ](https://github.com/rust-windowing/raw-window-handle/pull/74 ). Note that you might have to run `cargo update -p raw-window-handle` after upgrading.
2021-11-20 11:42:23 +11:00
- On X11, bump `mio` to 0.8.
2021-10-27 08:28:28 +11:00
- On Android, fixed `WindowExtAndroid::config` initially returning an empty `Configuration` .
- On Android, fixed `Window::scale_factor` and `MonitorHandle::scale_factor` initially always returning 1.0.
2021-08-23 04:45:24 +10:00
- On X11, select an appropriate visual for transparency if is requested
2021-08-01 18:19:00 +10:00
- On Wayland and X11, fix diagonal window resize cursor orientation.
2021-06-13 22:25:06 +10:00
- On macOS, drop the event callback before exiting.
2021-06-05 20:47:08 +10:00
- On Android, implement `Window::request_redraw`
2021-05-25 03:06:21 +10:00
- **Breaking:** On Web, remove the `stdweb` backend.
2021-05-20 02:39:53 +10:00
- Added `Window::focus_window` to bring the window to the front and set input focus.
2021-06-10 17:43:27 +10:00
- On Wayland and X11, implement `is_maximized` method on `Window` .
2021-08-12 04:02:40 +10:00
- On Windows, prevent ghost window from showing up in the taskbar after either several hours of use or restarting `explorer.exe` .
2021-07-14 01:38:01 +10:00
- On macOS, fix issue where `ReceivedCharacter` was not being emitted during some key repeat events.
2021-08-01 18:16:02 +10:00
- On Wayland, load cursor icons `hand2` and `hand1` for `CursorIcon::Hand` .
2021-08-16 05:31:59 +10:00
- **Breaking:** On Wayland, Theme trait and its support types are dropped.
2021-10-31 06:35:36 +11:00
- On Wayland, bump `smithay-client-toolkit` to 0.15.1.
2021-08-17 14:59:57 +10:00
- On Wayland, implement `request_user_attention` with `xdg_activation_v1` .
2021-08-24 20:36:13 +10:00
- On X11, emit missing `WindowEvent::ScaleFactorChanged` when the only monitor gets reconnected.
2021-10-31 07:47:31 +11:00
- On X11, if RANDR based scale factor is higher than 20 reset it to 1
2021-11-01 01:06:00 +11:00
- On Wayland, add an enabled-by-default feature called `wayland-dlopen` so users can opt out of using `dlopen` to load system libraries.
2021-11-25 02:56:57 +11:00
- **Breaking:** On Android, bump `ndk` and `ndk-glue` to 0.5.
2021-11-03 07:51:39 +11:00
- On Windows, increase wait timer resolution for more accurate timing when using `WaitUntil` .
2021-11-05 05:37:02 +11:00
- On macOS, fix native file dialogs hanging the event loop.
2021-11-15 09:23:54 +11:00
- On Wayland, implement a workaround for wrong configure size when using `xdg_decoration` in `kwin_wayland`
Show the menu bar in borderless fullscreen on macOS (#2053)
* In MacOS, only disable menu bar in exclusive fullscreen
* Save and restore fullscreen options in set_fullscreen
* Don't always cache presentation options when entering exclusive fullscreen
This commit caches presentation options when entering exclusive fullscreen
only if we're coming from borderless fullscreen.
Then, when transitioning from exclusive -> borderless, if no cached presentation
options are present, then the default borderless options are applied.
This fixes the menu bar being unavailable when taking the following path:
[not fullscreen] -> [exclusive fullscreen] -> [borderless fullscreen].
Without this commit, the presentation options from [not fullscreen] were being
cached and then applied to [borderless fullscreen].
* Restore the window level when switching to exclusive fullscreen
The hack of using `CGShieldingWindowLevel() + 1` in borderless fullscreen needs
to be undone when switching from [borderless] -> [exclusive] fullscreen,
otherwise there are menu bar glitches when following a path through
[borderless] -> [exclusive] -> [borderless] modes.
Now, this might appear to conflict with the 'always on top' feature which uses
the 'floating window' level, but this feature appears to be broken anyway when
entering and exiting fullscreen with an always-on-top window. So, rather than
introducing logic to attempt to restore to the 'floating' level here, I think
it's better to do the simple thing for now and then introduce logic for
always-on-top windows when fixing the overall fullscreen behaviour.
* Update the changelog
Co-authored-by: Ehden Sinai <ehdens@gmail.com>
Co-authored-by: Francesca Lovebloom <francesca@brainiumstudios.com>
2021-11-20 08:05:36 +11:00
- On macOS, fix an issue that prevented the menu bar from showing in borderless fullscreen mode.
2021-11-20 11:24:45 +11:00
- On X11, EINTR while polling for events no longer causes a panic. Instead it will be treated as a spurious wakeup.
2021-05-20 02:39:53 +10:00
2021-05-16 03:17:08 +10:00
# 0.25.0 (2021-05-15)
2020-12-14 05:06:53 +11:00
2021-04-30 19:31:28 +10:00
- **Breaking:** On macOS, replace `WindowBuilderExtMacOS::with_activation_policy` with `EventLoopExtMacOS::set_activation_policy`
2021-04-30 03:49:17 +10:00
- On macOS, wait with activating the application until the application has initialized.
2021-04-08 06:24:49 +10:00
- On macOS, fix creating new windows when the application has a main menu.
2021-03-12 08:08:29 +11:00
- On Windows, fix fractional deltas for mouse wheel device events.
2021-03-06 21:17:23 +11:00
- On macOS, fix segmentation fault after dropping the main window.
2021-02-24 08:35:38 +11:00
- On Android, `InputEvent::KeyEvent` is partially implemented providing the key scancode.
2021-01-28 05:01:17 +11:00
- Added `is_maximized` method to `Window` .
2021-02-07 07:10:36 +11:00
- On Windows, fix bug where clicking the decoration bar would make the cursor blink.
2021-01-06 03:39:13 +11:00
- On Windows, fix bug causing newly created windows to erroneously display the "wait" (spinning) cursor.
2021-04-06 17:19:25 +10:00
- On macOS, wake up the event loop immediately when a redraw is requested.
2020-12-21 03:59:46 +11:00
- On Windows, change the default window size (1024x768) to match the default on other desktop platforms (800x600).
2020-12-15 17:31:13 +11:00
- On Windows, fix bug causing mouse capture to not be released.
2020-12-14 05:06:53 +11:00
- On Windows, fix fullscreen not preserving minimized/maximized state.
2021-01-12 18:25:56 +11:00
- On Android, unimplemented events are marked as unhandled on the native event loop.
2021-02-05 08:26:33 +11:00
- On Windows, added `WindowBuilderExtWindows::with_menu` to set a custom menu at window creation time.
2021-01-31 05:43:26 +11:00
- On Android, bump `ndk` and `ndk-glue` to 0.3: use predefined constants for event `ident` .
2021-03-09 05:56:39 +11:00
- On macOS, fix objects captured by the event loop closure not being dropped on panic.
2021-02-20 10:06:12 +11:00
- On Windows, fixed `WindowEvent::ThemeChanged` not properly firing and fixed `Window::theme` returning the wrong theme.
2021-02-17 09:50:46 +11:00
- On Web, added support for `DeviceEvent::MouseMotion` to listen for relative mouse movements.
2021-03-26 05:18:51 +11:00
- Added `WindowBuilder::with_position` to allow setting the position of a `Window` on creation. Supported on Windows, macOS and X11.
2021-03-07 20:43:23 +11:00
- Added `Window::drag_window` . Implemented on Windows, macOS, X11 and Wayland.
2021-03-10 03:50:15 +11:00
- On X11, bump `mio` to 0.7.
2021-04-10 23:47:19 +10:00
- On Windows, added `WindowBuilderExtWindows::with_owner_window` to allow creating popup windows.
- On Windows, added `WindowExtWindows::set_enable` to allow creating modal popup windows.
2021-04-06 17:22:38 +10:00
- On macOS, emit `RedrawRequested` events immediately while the window is being resized.
2021-04-13 07:12:39 +10:00
- Implement `Default` , `Hash` , and `Eq` for `LogicalPosition` , `PhysicalPosition` , `LogicalSize` , and `PhysicalSize` .
2021-04-30 21:34:50 +10:00
- On macOS, initialize the Menu Bar with minimal defaults. (Can be prevented using `enable_default_menu_creation` )
2021-04-30 19:30:09 +10:00
- 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".
2021-05-09 08:56:52 +10:00
- Implement mint (math interoperability standard types) conversions (under feature flag `mint` ).
2020-12-14 05:06:53 +11:00
2020-12-11 03:12:46 +11:00
# 0.24.0 (2020-12-09)
2020-07-03 06:53:47 +10:00
2020-12-10 22:09:08 +11:00
- On Windows, fix applications not exiting gracefully due to thread_event_target_callback accessing corrupted memory.
2020-12-10 07:16:59 +11:00
- On Windows, implement `Window::set_ime_position` .
2020-12-01 05:04:26 +11:00
- **Breaking:** On Windows, Renamed `WindowBuilderExtWindows` 's `is_dark_mode` to `theme` .
2020-12-14 05:06:53 +11:00
- **Breaking:** On Windows, renamed `WindowBuilderExtWindows::is_dark_mode` to `theme` .
2020-12-01 05:04:26 +11:00
- On Windows, add `WindowBuilderExtWindows::with_theme` to set a preferred theme.
- On Windows, fix bug causing message boxes to appear delayed.
2020-12-14 05:06:53 +11:00
- 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.
2020-10-14 21:23:34 +11:00
- On Windows, fix bug preventing windows with transparency enabled from having fully-opaque regions.
2020-10-20 01:35:01 +11:00
- **Breaking:** On Windows, include prefix byte in scancodes.
2020-12-14 05:06:53 +11:00
- On Wayland, fix window not being resizeable when using `WindowBuilder::with_min_inner_size` .
2020-10-22 15:14:33 +11:00
- On Unix, fix cross-compiling to wasm32 without enabling X11 or Wayland.
2020-12-14 05:06:53 +11:00
- On Windows, fix use-after-free crash during window destruction.
2020-10-30 08:13:21 +11:00
- On Web, fix `WindowEvent::ReceivedCharacter` never being sent on key input.
2020-12-14 05:06:53 +11:00
- On macOS, fix compilation when targeting aarch64.
2020-11-06 10:42:03 +11:00
- On X11, fix `Window::request_redraw` not waking the event loop.
2020-11-11 08:55:29 +11:00
- On Wayland, the keypad arrow keys are now recognized.
2020-11-13 06:49:44 +11:00
- **Breaking** Rename `desktop::EventLoopExtDesktop` to `run_return::EventLoopExtRunReturn` .
2020-11-27 13:03:08 +11:00
- Added `request_user_attention` method to `Window` .
2020-12-14 05:06:53 +11:00
- **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` .
2020-11-22 09:53:56 +11:00
- On Wayland, default font size in CSD increased from 11 to 17.
2020-11-29 03:41:11 +11:00
- On Windows, fix bug causing message boxes to appear delayed.
- On Android, support multi-touch.
2020-12-10 07:11:25 +11:00
- On Wayland, extra mouse buttons are not dropped anymore.
- **Breaking**: `MouseButton::Other` now uses `u16` .
2020-10-09 04:44:41 +11:00
2020-10-03 01:05:07 +10:00
# 0.23.0 (2020-10-02)
2020-08-15 05:26:16 +10:00
- On iOS, fixed support for the "Debug View Heirarchy" feature in Xcode.
2020-07-05 05:46:41 +10:00
- On all platforms, `available_monitors` and `primary_monitor` are now on `EventLoopWindowTarget` rather than `EventLoop` to list monitors event in the event loop.
2020-06-15 17:15:27 +10:00
- On Unix, X11 and Wayland are now optional features (enabled by default)
2020-05-28 02:24:08 +10:00
- On X11, fix deadlock when calling `set_fullscreen_inner` .
2020-05-22 03:13:33 +10:00
- On Web, prevent the webpage from scrolling when the user is focused on a winit canvas
2020-08-18 09:48:29 +10:00
- On Web, calling `window.set_cursor_icon` no longer breaks HiDPI scaling
2021-05-05 04:00:11 +10:00
- On Windows, drag and drop is now optional (enabled by default) and can be disabled with `WindowBuilderExtWindows::with_drag_and_drop(false)` .
2020-05-22 20:33:04 +10:00
- On Wayland, fix deadlock when calling to `set_inner_size` from a callback.
2020-05-25 02:26:29 +10:00
- On macOS, add `hide__other_applications` to `EventLoopWindowTarget` via existing `EventLoopWindowTargetExtMacOS` trait. `hide_other_applications` will hide other applications by calling `-[NSApplication hideOtherApplications: nil]` .
2020-06-17 23:55:52 +10:00
- On android added support for `run_return` .
2020-06-10 07:46:33 +10:00
- On MacOS, Fixed fullscreen and dialog support for `run_return` .
2020-07-03 06:53:47 +10:00
- On Windows, fix bug where we'd try to emit `MainEventsCleared` events during nested win32 event loops.
2020-08-05 11:39:09 +10:00
- On Web, use mouse events if pointer events aren't supported. This affects Safari.
2020-07-27 08:16:21 +10:00
- 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.
2020-08-13 04:56:28 +10:00
- On Android, fix `ControlFlow::Poll` not polling the Android event queue.
2020-08-14 04:10:34 +10:00
- On macOS, add `NSWindow.hasShadow` support.
2020-08-21 11:09:04 +10:00
- On Web, fix vertical mouse wheel scrolling being inverted.
2020-08-29 23:34:33 +10:00
- On Web, implement mouse capturing for click-dragging out of the canvas.
2020-08-30 23:15:44 +10:00
- On Web, fix `ControlFlow::Exit` not properly handled.
- On Web (web-sys only), send `WindowEvent::ScaleFactorChanged` event when `window.devicePixelRatio` is changed.
2020-07-27 08:16:21 +10:00
- **Breaking:** On Web, `set_cursor_position` and `set_cursor_grab` will now always return an error.
- **Breaking:** `PixelDelta` scroll events now return a `PhysicalPosition` .
2020-08-21 04:12:01 +10:00
- On NetBSD, fixed crash due to incorrect detection of the main thread.
2020-09-08 03:09:24 +10:00
- **Breaking:** On X11, `-` key is mapped to the `Minus` virtual key code, instead of `Subtract` .
2020-09-07 00:41:19 +10:00
- On macOS, fix inverted horizontal scroll.
2020-09-08 03:09:24 +10:00
- **Breaking:** `current_monitor` now returns `Option<MonitorHandle>` .
2020-09-08 03:20:47 +10:00
- **Breaking:** `primary_monitor` now returns `Option<MonitorHandle>` .
2020-09-08 06:43:51 +10:00
- On macOS, updated core-* dependencies and cocoa.
2020-09-10 06:56:48 +10:00
- Bump `parking_lot` to 0.11
2020-09-19 04:14:56 +10:00
- On Android, bump `ndk` , `ndk-sys` and `ndk-glue` to 0.2. Checkout the new ndk-glue main proc attribute.
2020-09-23 04:21:07 +10:00
- On iOS, fixed starting the app in landscape where the view still had portrait dimensions.
2020-09-21 08:41:44 +10:00
- Deprecate the stdweb backend, to be removed in a future release
2020-09-20 19:58:24 +10:00
- **Breaking:** Prefixed virtual key codes `Add` , `Multiply` , `Divide` , `Decimal` , and `Subtract` with `Numpad` .
- Added `Asterisk` and `Plus` virtual key codes.
2020-09-21 08:42:07 +10:00
- 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 a `Window` 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 the `Window` is dropped.
2020-09-22 08:19:00 +10:00
- On Web, `WindowEvent::Resized` is now emitted when `Window::set_inner_size` is called.
2020-09-22 11:54:47 +10:00
- **Breaking:** `Fullscreen` enum now uses `Borderless(Option<MonitorHandle>)` instead of `Borderless(MonitorHandle)` to allow picking the current monitor.
2020-09-23 20:54:53 +10:00
- On MacOS, fix `WindowEvent::Moved` ignoring the scale factor.
Update SCTK to 0.11.0
* Update SCTK to 0.11.0
Updates smithay-client-toolkit to 0.11.0. The major highlight
of that updated, is update of wayland-rs to 0.27.0. Switching
to wayland-cursor, instead of using libwayland-cursor. It
also fixes the following bugs:
- Disabled repeat rate not being handled.
- Decoration buttons not working after tty switch.
- Scaling not being applied on output reenable.
- Crash when `XCURSOR_SIZE` is `0`.
- Pointer getting created in some cases without pointer capability.
- On kwin, fix space between window and decorations on startup.
- Incorrect size event when entering fullscreen when using
client side decorations.
- Client side decorations not being hided properly in fullscreen.
- Size tracking between fullscreen/tiled state changes.
- Repeat rate triggering multiple times from slow callback handler.
- Resizable attribute not being applied properly on startup.
- Not working IME
Besides those fixes it also adds a bunch of missing virtual key codes,
implements proper cursor grabbing, adds right click on decorations
to open application menu, disabled maximize button for non-resizeable
window, and fall back for cursor icon to similar ones, if the requested
is missing.
It also adds new methods to a `Theme` trait, such as:
- `title_font(&self) -> Option<(String, f32)>` - The font for a title.
- `title_color(&self, window_active: bool) -> [u8; 4]` - The color of
the text in the title.
Fixes #1680.
Fixes #1678.
Fixes #1676.
Fixes #1646.
Fixes #1614.
Fixes #1601.
Fixes #1533.
Fixes #1509.
Fixes #952.
Fixes #947.
2020-09-29 07:11:43 +10:00
- 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` is `0` .
- 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` .
2020-10-01 08:19:15 +10:00
- On Wayland, fix crash on startup since GNOME 3.37.90.
2020-10-02 12:07:09 +10:00
- On X11, fix incorrect modifiers state on startup.
2020-05-22 20:33:04 +10:00
2020-05-17 02:27:16 +10:00
# 0.22.2 (2020-05-16)
2020-05-16 04:58:12 +10:00
- Added Clone implementation for 'static events.
2020-05-05 05:14:13 +10:00
- On Windows, fix window intermittently hanging when `ControlFlow` was set to `Poll` .
2020-04-20 05:52:48 +10:00
- On Windows, fix `WindowBuilder::with_maximized` being ignored.
2020-05-06 23:27:49 +10:00
- On Android, minimal platform support.
2020-05-05 08:55:58 +10:00
- On iOS, touch positions are now properly converted to physical pixels.
2020-05-16 04:32:04 +10:00
- On macOS, updated core-* dependencies and cocoa
2020-04-20 05:52:48 +10:00
2020-04-18 03:36:42 +10:00
# 0.22.1 (2020-04-16)
2020-03-12 15:54:23 +11:00
- On X11, fix `ResumeTimeReached` being fired too early.
2020-04-12 05:49:07 +10:00
- On Web, replaced zero timeout for `ControlFlow::Poll` with `requestAnimationFrame`
2020-04-12 05:20:38 +10:00
- On Web, fix a possible panic during event handling
2020-04-21 07:48:42 +10:00
- On macOS, fix `EventLoopProxy` leaking memory for every instance.
2020-03-12 15:54:23 +11:00
2020-03-10 07:59:39 +11:00
# 0.22.0 (2020-03-09)
2019-07-30 04:16:14 +10:00
2020-02-19 11:27:47 +11:00
- On Windows, fix minor timing issue in wait_until_time_or_msg
2020-03-08 06:04:24 +11:00
- On Windows, rework handling of request_redraw() to address panics.
2020-02-12 19:27:11 +11:00
- On macOS, fix `set_simple_screen` to remember frame excluding title bar.
2020-02-09 13:36:45 +11:00
- On Wayland, fix coordinates in touch events when scale factor isn't 1.
- On Wayland, fix color from `close_button_icon_color` not applying.
2020-02-10 16:37:06 +11:00
- Ignore locale if unsupported by X11 backend
2020-02-13 13:48:58 +11:00
- On Wayland, Add HiDPI cursor support
2020-02-18 06:25:27 +11:00
- On Web, add the ability to query "Light" or "Dark" system theme send `ThemeChanged` on change.
2020-02-17 04:53:02 +11:00
- Fix `Event::to_static` returning `None` for user events.
2020-02-19 10:58:48 +11:00
- On Wayland, Hide CSD for fullscreen windows.
2020-03-07 08:15:49 +11:00
- On Windows, ignore spurious mouse move messages.
Move `ModifiersChanged` variant to `WindowEvent` (#1381)
* Move `ModifiersChanged` variant to `WindowEvent`
* macos: Fix flags_changed for ModifiersChanged variant move
I haven't look too deep at what this does internally, but at least
cargo-check is fully happy now. :)
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* macos: Fire a ModifiersChanged event on window_did_resign_key
From debugging, I determined that macOS' emission of a flagsChanged
around window switching is inconsistent. It is fair to assume, I think,
that when the user switches windows, they do not expect their former
modifiers state to remain effective; so I think it's best to clear that
state by sending a ModifiersChanged(ModifiersState::empty()).
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* windows: Fix build
I don't know enough about the code to implement the fix as it is done on
this branch, but this commit at least fixes the build.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* windows: Send ModifiersChanged(ModifiersState::empty) on KILLFOCUS
Very similar to the changes made in [1], as focus is lost, send an event
to the window indicating that the modifiers have been released.
It's unclear to me (without a Windows device to test this on) whether
this is necessary, but it certainly ensures that unfocused windows will
have at least received this event, which is an improvement.
[1]: f79f21641a31da3e4039d41be89047cdcc6028f7
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* macos: Add a hook to update stale modifiers
Sometimes, `ViewState` and `event` might have different values for their
stored `modifiers` flags. These are internally stored as a bitmask in
the latter and an enum in the former.
We can check to see if they differ, and if they do, automatically
dispatch an event to update consumers of modifier state as well as the
stored `state.modifiers`. That's what the hook does.
This hook is then called in the key_down, mouse_entered, mouse_exited,
mouse_click, scroll_wheel, and pressure_change_with_event callbacks,
which each will contain updated modifiers.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* Only call event_mods once when determining whether to update state
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* flags_changed: Memoize window_id collection
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* window_did_resign_key: Remove synthetic ModifiersChanged event
We no longer need to emit this event, since we are checking the state of
our modifiers before emitting most other events.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* mouse_motion: Add a call to update_potentially_stale_modifiers
Now, cover all events (that I can think of, at least) where stale
modifiers might affect how user programs behave. Effectively, every
human-interface event (keypress, mouse click, keydown, etc.) will cause
a ModifiersChanged event to be fired if something has changed.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* key_up: Add a call to update_potentially_stale_modifiers
We also want to make sure modifiers state is synchronized here, too.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* mouse_motion: Remove update_potentially_stale_modifiers invocation
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* Retry CI
* ViewState: Promote visibility of modifiers to the macos impl
This is so that we can interact with the ViewState directly from the
WindowDelegate.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* window_delegate: Synthetically set modifiers state to empty on resignKey
This logic is implemented similarly on other platforms, so we wish to
regain parity here. Originally this behavior was implemented to always
fire an event with ModifiersState::empty(), but that was not the best as
it was not necessarily correct and could be a duplicate event.
This solution is perhaps the most elegant possible to implement the
desired behavior of sending a synthetic empty modifiers event when a
window loses focus, trading some safety for interoperation between the
NSWindowDelegate and the NSView (as the objc runtime must now be
consulted in order to acquire access to the ViewState which is "owned"
by the NSView).
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
* Check for modifiers change in window events
* Fix modifier changed on macOS
Since the `mouse_entered` function was generating a mouse motion, which
updates the modifier state, a modifiers changed event was incorrectly
generated.
The updating of the modifier state has also been changed to make sure it
consistently happens before events that have a modifier state attached
to it, without happening on any other event.
This of course means that no `CursorMoved` event is generated anymore
when the user enters the window without it being focused, however I'd
say that is consistent with how winit should behave.
* Fix unused variable warning
* Move changelog entry into `Unreleased` section
Co-authored-by: Freya Gentz <zegentzy@protonmail.com>
Co-authored-by: Kristofer Rye <kristofer.rye@gmail.com>
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-03-07 09:43:55 +11:00
- **Breaking:** Move `ModifiersChanged` variant from `DeviceEvent` to `WindowEvent` .
2020-03-08 06:42:21 +11:00
- On Windows, add `IconExtWindows` trait which exposes creating an `Icon` from an external file or embedded resource
- Add `BadIcon::OsError` variant for when OS icon functionality fails
2020-03-08 05:56:33 +11:00
- On Windows, fix crash at startup on systems that do not properly support Windows' Dark Mode
2020-03-10 07:57:04 +11:00
- Revert On macOS, fix not sending ReceivedCharacter event for specific keys combinations.
- on macOS, fix incorrect ReceivedCharacter events for some key combinations.
2020-03-08 16:21:04 +11:00
- **Breaking:** Use `i32` instead of `u32` for position type in `WindowEvent::Moved` .
2020-04-27 06:42:45 +10:00
- On macOS, a mouse motion event is now generated before every mouse click.
2020-02-08 19:25:08 +11:00
2020-02-05 13:07:31 +11:00
# 0.21.0 (2020-02-04)
- On Windows, fixed "error: linking with `link.exe` failed: exit code: 1120" error on older versions of windows.
2020-02-01 02:07:36 +11:00
- On macOS, fix set_minimized(true) works only with decorations.
2020-01-20 10:38:52 +11:00
- On macOS, add `hide_application` to `EventLoopWindowTarget` via a new `EventLoopWindowTargetExtMacOS` trait. `hide_application` will hide the entire application by calling `-[NSApplication hide: nil]` .
2020-01-15 08:52:18 +11:00
- On macOS, fix not sending ReceivedCharacter event for specific keys combinations.
2020-01-13 04:50:34 +11:00
- On macOS, fix `CursorMoved` event reporting the cursor position using logical coordinates.
2020-01-11 11:02:42 +11:00
- On macOS, fix issue where unbundled applications would sometimes open without being focused.
2020-01-11 02:25:55 +11:00
- On macOS, fix `run_return` does not return unless it receives a message.
2020-01-07 07:28:58 +11:00
- On Windows, fix bug where `RedrawRequested` would only get emitted every other iteration of the event loop.
2020-01-07 14:54:22 +11:00
- On X11, fix deadlock on window state when handling certain window events.
2020-01-08 06:33:56 +11:00
- `WindowBuilder` now implements `Default` .
2020-01-10 15:19:50 +11:00
- **Breaking:** `WindowEvent::CursorMoved` changed to `f64` units, preserving high-precision data supplied by most backends
2020-01-11 19:45:52 +11:00
- On Wayland, fix coordinates in mouse events when scale factor isn't 1
2020-01-16 13:20:14 +11:00
- On Web, add the ability to provide a custom canvas
2020-01-27 13:56:54 +11:00
- **Breaking:** On Wayland, the `WaylandTheme` struct has been replaced with a `Theme` trait, allowing for extra configuration
2020-01-07 07:28:58 +11:00
2020-01-06 09:11:25 +11:00
# 0.20.0 (2020-01-05)
2020-01-04 16:11:00 +11:00
- On X11, fix `ModifiersChanged` emitting incorrect modifier change events
2020-01-06 08:57:32 +11:00
- **Breaking**: Overhaul how Winit handles DPI:
2022-03-27 02:43:13 +11:00
- Window functions and events now return `PhysicalSize` instead of `LogicalSize` .
- Functions that take `Size` or `Position` types can now take either `Logical` or `Physical` types.
- `hidpi_factor` has been renamed to `scale_factor` .
- `HiDpiFactorChanged` has been renamed to `ScaleFactorChanged` , and lets you control how the OS
2020-01-06 08:57:32 +11:00
resizes the window in response to the change.
2022-03-27 02:43:13 +11:00
- On X11, deprecate `WINIT_HIDPI_FACTOR` environment variable in favor of `WINIT_X11_SCALE_FACTOR` .
- `Size` and `Position` types are now generic over their exact pixel type.
2020-01-04 16:11:00 +11:00
2020-01-04 10:17:05 +11:00
# 0.20.0 Alpha 6 (2020-01-03)
2020-01-03 11:34:14 +11:00
- On macOS, fix `set_cursor_visible` hides cursor outside of window.
2019-12-31 07:32:37 +11:00
- On macOS, fix `CursorEntered` and `CursorLeft` events fired at old window size.
2019-12-25 05:56:56 +11:00
- On macOS, fix error when `set_fullscreen` is called during fullscreen transition.
2019-12-22 17:04:11 +11:00
- On all platforms except mobile and WASM, implement `Window::set_minimized` .
2019-12-22 11:47:29 +11:00
- On X11, fix `CursorEntered` event being generated for non-winit windows.
2019-12-20 12:03:41 +11:00
- On macOS, fix crash when starting maximized without decorations.
2020-01-11 11:02:42 +11:00
- On macOS, fix application not terminating on `run_return` .
2019-12-19 00:41:44 +11:00
- On Wayland, fix cursor icon updates on window borders when using CSD.
2019-12-20 11:08:28 +11:00
- On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when starting window in maximized mode.
2019-12-23 06:04:09 +11:00
- 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.
2019-12-29 08:22:51 +11:00
- **Breaking**: Changes to the `RedrawRequested` event (#1041):
2019-12-23 03:23:27 +11:00
- `RedrawRequested` has been moved from `WindowEvent` to `Event` .
- `EventsCleared` has been renamed to `MainEventsCleared` .
- `RedrawRequested` is now issued only after `MainEventsCleared` .
- `RedrawEventsCleared` is issued after each set of `RedrawRequested` events.
2019-12-28 08:28:06 +11:00
- Implement synthetic window focus key events on Windows.
2019-12-29 07:36:06 +11:00
- **Breaking**: Change `ModifiersState` to a `bitflags` struct.
2019-12-31 06:11:11 +11:00
- On Windows, implement `VirtualKeyCode` translation for `LWin` and `RWin` .
- On Windows, fix closing the last opened window causing `DeviceEvent` s to stop getting emitted.
2019-12-30 02:39:15 +11:00
- On Windows, fix `Window::set_visible` not setting internal flags correctly. This resulted in some weird behavior.
2019-12-31 06:11:11 +11:00
- Add `DeviceEvent::ModifiersChanged` .
- Deprecate `modifiers` fields in other events in favor of `ModifiersChanged` .
2020-01-04 10:15:47 +11:00
- On X11, `WINIT_HIDPI_FACTOR` now dominates `Xft.dpi` when picking DPI factor for output.
- On X11, add special value `randr` for `WINIT_HIDPI_FACTOR` to make winit use self computed DPI factor instead of the one from `Xft.dpi` .
2019-12-19 00:41:44 +11:00
2019-12-23 03:24:49 +11:00
# 0.20.0 Alpha 5 (2019-12-09)
2019-12-10 11:29:50 +11:00
2019-10-24 01:24:50 +11:00
- On macOS, fix application termination on `ControlFlow::Exit`
2019-11-30 07:49:43 +11:00
- On Windows, fix missing `ReceivedCharacter` events when Alt is held.
2019-11-27 20:14:36 +11:00
- On macOS, stop emitting private corporate characters in `ReceivedCharacter` events.
2019-11-11 07:55:29 +11:00
- On X11, fix misreporting DPI factor at startup.
2019-11-11 05:24:43 +11:00
- On X11, fix events not being reported when using `run_return` .
2019-11-10 18:16:44 +11:00
- On X11, fix key modifiers being incorrectly reported.
2019-11-23 11:11:04 +11:00
- On X11, fix window creation hanging when another window is fullscreen.
2019-11-27 14:49:15 +11:00
- On Windows, fix focusing unfocused windows when switching from fullscreen to windowed.
2019-12-05 04:18:20 +11:00
- On X11, fix reporting incorrect DPI factor when waking from suspend.
2019-12-08 04:22:03 +11:00
- Change `EventLoopClosed` to contain the original event.
2019-12-29 08:22:51 +11:00
- **Breaking**: Add `is_synthetic` field to `WindowEvent` variant `KeyboardInput` ,
2019-12-08 09:51:37 +11:00
indicating that the event is generated by winit.
- On X11, generate synthetic key events for keys held when a window gains or loses focus.
2019-12-12 11:23:55 +11:00
- On X11, issue a `CursorMoved` event when a `Touch` event occurs,
as X11 implicitly moves the cursor for such events.
2019-10-24 01:24:50 +11:00
2019-10-19 04:25:12 +11:00
# 0.20.0 Alpha 4 (2019-10-18)
2019-09-28 06:57:25 +10:00
- Add web support via the 'stdweb' or 'web-sys' features
2019-10-06 05:52:40 +11:00
- On Windows, implemented function to get HINSTANCE
2019-08-23 19:30:53 +10:00
- On macOS, implement `run_return` .
2019-08-27 09:56:10 +10:00
- On iOS, fix inverted parameter in `set_prefers_home_indicator_hidden` .
2019-08-27 12:06:59 +10:00
- On X11, performance is improved when rapidly calling `Window::set_cursor_icon` .
2019-08-28 09:20:24 +10:00
- On iOS, fix improper `msg_send` usage that was UB and/or would break if `!` is stabilized.
- On Windows, unset `maximized` when manually changing the window's position or size.
2019-09-10 04:15:49 +10:00
- On Windows, add touch pressure information for touch events.
2019-09-13 09:38:44 +10:00
- On macOS, differentiate between `CursorIcon::Grab` and `CursorIcon::Grabbing` .
2019-09-12 08:22:41 +10:00
- On Wayland, fix event processing sometimes stalling when using OpenGL with vsync.
2019-09-16 12:09:08 +10:00
- Officially remove the Emscripten backend.
- On Windows, fix handling of surrogate pairs when dispatching `ReceivedCharacter` .
2019-09-16 09:59:37 +10:00
- On macOS 10.15, fix freeze upon exiting exclusive fullscreen mode.
2019-10-17 09:52:10 +11:00
- On iOS, fix panic upon closing the app.
2019-09-24 00:10:33 +10:00
- On X11, allow setting mulitple `XWindowType` s.
2019-09-17 04:27:46 +10:00
- On iOS, fix null window on initial `HiDpiFactorChanged` event.
2019-09-20 01:48:20 +10:00
- On Windows, fix fullscreen window shrinking upon getting restored to a normal window.
2019-09-18 12:49:29 +10:00
- On macOS, fix events not being emitted during modal loops, such as when windows are being resized
by the user.
2019-09-18 01:34:48 +10:00
- On Windows, fix hovering the mouse over the active window creating an endless stream of CursorMoved events.
2019-10-18 01:59:07 +11:00
- Always dispatch a `RedrawRequested` event after creating a new window.
2019-09-24 04:45:29 +10:00
- On X11, return dummy monitor data to avoid panicking when no monitors exist.
2019-09-20 01:47:51 +10:00
- On X11, prevent stealing input focus when creating a new window.
Only steal input focus when entering fullscreen mode.
2019-12-22 17:04:11 +11:00
- On Wayland, fixed DeviceEvents for relative mouse movement is not always produced
2019-10-02 11:25:59 +10:00
- On Wayland, add support for set_cursor_visible and set_cursor_grab.
2019-10-04 06:19:10 +10:00
- On Wayland, fixed DeviceEvents for relative mouse movement is not always produced.
- Removed `derivative` crate dependency.
2019-10-03 23:02:59 +10:00
- On Wayland, add support for set_cursor_icon.
2019-10-06 00:49:24 +10:00
- Use `impl Iterator<Item = MonitorHandle>` instead of `AvailableMonitorsIter` consistently.
2019-10-06 07:23:06 +11:00
- On macOS, fix fullscreen state being updated after entering fullscreen instead of before,
resulting in `Window::fullscreen` returning the old state in `Resized` events instead of
reflecting the new fullscreen state
2019-10-06 06:00:54 +11:00
- On X11, fix use-after-free during window creation
2019-10-06 07:23:30 +11:00
- 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.
2019-10-19 02:51:06 +11:00
- Prevent `EventLoop::new` and `EventLoop::with_user_event` from 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 `EventLoop` outside the main thread.
2019-11-01 11:45:45 +11:00
- On Wayland, drop resize events identical to the current window size.
2019-10-17 02:59:06 +11:00
- On Windows, fix window rectangle not getting set correctly on high-DPI systems.
2019-08-23 19:30:53 +10:00
2019-08-15 01:09:47 +10:00
# 0.20.0 Alpha 3 (2019-08-14)
2019-07-24 06:44:07 +10:00
- On macOS, drop the run closure on exit.
2019-07-23 11:26:52 +10:00
- On Windows, location of `WindowEvent::Touch` are window client coordinates instead of screen coordinates.
- On X11, fix delayed events after window redraw.
2019-07-29 18:07:36 +10:00
- On macOS, add `WindowBuilderExt::with_disallow_hidpi` to have the option to turn off best resolution openGL surface.
2019-07-29 19:18:23 +10:00
- On Windows, screen saver won't start if the window is in fullscreen mode.
2019-07-30 00:58:16 +10:00
- Change all occurrences of the `new_user_event` method to `with_user_event` .
2019-07-30 04:16:14 +10:00
- On macOS, the dock and the menu bar are now hidden in fullscreen mode.
- `Window::set_fullscreen` now takes `Option<Fullscreen>` where `Fullscreen`
consists of `Fullscreen::Exclusive(VideoMode)` and
`Fullscreen::Borderless(MonitorHandle)` variants.
2022-03-27 02:43:13 +11:00
- Adds support for exclusive fullscreen mode.
2019-07-31 16:57:31 +10:00
- 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.
2019-08-01 17:30:05 +10:00
- On iOS, fix armv7-apple-ios compile target.
2019-08-06 06:51:42 +10:00
- Removed the `T: Clone` requirement from the `Clone` impl of `EventLoopProxy<T>` .
2019-08-07 06:47:00 +10:00
- On iOS, disable overscan compensation for external displays (removes black
bars surrounding the image).
2019-08-09 07:50:22 +10:00
- On Linux, the functions `is_wayland` , `is_x11` , `xlib_xconnection` and `wayland_display` have been moved to a new `EventLoopWindowTargetExtUnix` trait.
2019-08-09 09:10:54 +10:00
- On iOS, add `set_prefers_status_bar_hidden` extension function instead of
hijacking `set_decorations` for this purpose.
2019-08-09 10:13:14 +10:00
- On macOS and iOS, corrected the auto trait impls of `EventLoopProxy` .
2019-08-14 08:12:13 +10:00
- On iOS, add touch pressure information for touch events.
2019-08-14 21:57:16 +10:00
- Implement `raw_window_handle::HasRawWindowHandle` for `Window` type on all supported platforms.
2019-08-14 14:01:22 +10:00
- On macOS, fix the signature of `-[NSView drawRect:]` .
2019-09-05 07:23:11 +10:00
- 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.
2019-08-09 10:13:14 +10:00
2019-07-10 09:19:00 +10:00
# 0.20.0 Alpha 2 (2019-07-09)
2019-07-10 08:25:32 +10:00
2019-07-04 20:43:44 +10:00
- On X11, non-resizable windows now have maximize explicitly disabled.
2019-06-29 08:07:36 +10:00
- On Windows, support paths longer than MAX_PATH (260 characters) in `WindowEvent::DroppedFile`
and `WindowEvent::HoveredFile` .
2019-06-27 16:58:21 +10:00
- On Mac, implement `DeviceEvent::Button` .
2019-06-22 12:59:31 +10:00
- Change `Event::Suspended(true / false)` to `Event::Suspended` and `Event::Resumed` .
2019-06-23 16:39:26 +10:00
- 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.
2019-06-29 05:31:54 +10:00
- Revert the use of invisible surfaces in Wayland, which introduced graphical glitches with OpenGL (#835)
2019-06-28 10:40:27 +10:00
- On X11, implement `_NET_WM_PING` to allow desktop environment to kill unresponsive programs.
2019-06-26 14:04:49 +10:00
- On Windows, when a window is initially invisible, it won't take focus from the existing visible windows.
2019-07-05 06:14:15 +10:00
- On Windows, fix multiple calls to `request_redraw` during `EventsCleared` sending multiple `RedrawRequested events.`
- On Windows, fix edge case where `RedrawRequested` could be dispatched before input events in event loop iteration.
- On Windows, fix timing issue that could cause events to be improperly dispatched after `RedrawRequested` but before `EventsCleared` .
2019-07-04 04:19:07 +10:00
- On macOS, drop unused Metal dependency.
2019-07-07 03:29:15 +10:00
- On Windows, fix the trail effect happening on transparent decorated windows. Borderless (or un-decorated) windows were not affected.
2019-07-06 07:28:11 +10:00
- On Windows, fix `with_maximized` not properly setting window size to entire window.
2019-07-08 06:14:00 +10:00
- On macOS, change `WindowExtMacOS::request_user_attention()` to take an `enum` instead of a `bool` .
2019-06-22 12:59:31 +10:00
2019-07-10 08:25:32 +10:00
# 0.20.0 Alpha 1 (2019-06-21)
2019-06-22 01:33:44 +10:00
2019-02-06 02:30:33 +11:00
- Changes below are considered **breaking** .
- Change all occurrences of `EventsLoop` to `EventLoop` .
- Previously flat API is now exposed through `event` , `event_loop` , `monitor` , and `window` modules.
- `os` module changes:
- Renamed to `platform` .
- All traits now have platform-specific suffixes.
- Exposes new `desktop` module on Windows, Mac, and Linux.
- Changes to event loop types:
- `EventLoopProxy::wakeup` has been removed in favor of `send_event` .
- **Major:** New `run` method drives winit event loop.
- Returns `!` to ensure API behaves identically across all supported platforms.
- This allows `emscripten` implementation to work without lying about the API.
- `ControlFlow` 's variants have been replaced with `Wait` , `WaitUntil(Instant)` , `Poll` , and `Exit` .
- Is read after `EventsCleared` is processed.
- `Wait` waits until new events are available.
- `WaitUntil` waits until either new events are available or the provided time has been reached.
- `Poll` instantly resumes the event loop.
- `Exit` aborts the event loop.
- Takes a closure that implements `'static + FnMut(Event<T>, &EventLoop<T>, &mut ControlFlow)` .
- `&EventLoop<T>` is provided to allow new `Window` s to be created.
- **Major:** `platform::desktop` module exposes `EventLoopExtDesktop` trait with `run_return` method.
- Behaves identically to `run` , but returns control flow to the calling context and can take non-`'static` closures.
- `EventLoop` 's `poll_events` and `run_forever` methods have been removed in favor of `run` and `run_return` .
- Changes to events:
- Remove `Event::Awakened` in favor of `Event::UserEvent(T)` .
- Can be sent with `EventLoopProxy::send_event` .
- Rename `WindowEvent::Refresh` to `WindowEvent::RedrawRequested` .
- `RedrawRequested` can be sent by the user with the `Window::request_redraw` method.
- `EventLoop` , `EventLoopProxy` , and `Event` are now generic over `T` , for use in `UserEvent` .
- **Major:** Add `NewEvents(StartCause)` , `EventsCleared` , and `LoopDestroyed` variants to `Event` .
- `NewEvents` is emitted when new events are ready to be processed by event loop.
- `StartCause` describes why new events are available, with `ResumeTimeReached` , `Poll` , `WaitCancelled` , and `Init` (sent once at start of loop).
- `EventsCleared` is 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).
- `LoopDestroyed` is emitted when the `run` or `run_return` method is about to exit.
- Rename `MonitorId` to `MonitorHandle` .
- Removed `serde` implementations from `ControlFlow` .
2019-05-30 11:29:54 +10:00
- Rename several functions to improve both internal consistency and compliance with Rust API guidelines.
- Remove `WindowBuilder::multitouch` field, since it was only implemented on a few platforms. Multitouch is always enabled now.
2019-06-11 09:09:38 +10:00
- **Breaking:** On macOS, change `ns` identifiers to use snake_case for consistency with iOS's `ui` identifiers.
2019-06-13 04:07:25 +10:00
- Add `MonitorHandle::video_modes` method for retrieving supported video modes for the given monitor.
2019-06-14 02:50:02 +10:00
- On Wayland, the window now exists even if nothing has been drawn.
2019-06-14 05:17:56 +10:00
- On Windows, fix initial dimensions of a fullscreen window.
2019-06-21 13:59:27 +10:00
- On Windows, Fix transparent borderless windows rendering wrong.
2019-04-08 15:08:31 +10:00
# Version 0.19.1 (2019-04-08)
2019-04-08 15:07:47 +10:00
- On Wayland, added a `get_wayland_display` function to `EventsLoopExt` .
2019-03-20 13:19:41 +11:00
- On Windows, fix `CursorMoved(0, 0)` getting dispatched on window focus.
2019-03-26 05:05:07 +11:00
- On macOS, fix command key event left and right reverse.
2019-03-23 01:44:00 +11:00
- On FreeBSD, NetBSD, and OpenBSD, fix build of X11 backend.
2019-06-23 03:57:56 +10:00
- On Linux, the numpad's add, subtract and divide keys are now mapped to the `Add` , `Subtract` and `Divide` virtual key codes
- On macOS, the numpad's subtract key has been added to the `Subtract` mapping
- On Wayland, the numpad's home, end, page up and page down keys are now mapped to the `Home` , `End` , `PageUp` and `PageDown` virtual key codes
2019-04-08 15:07:12 +10:00
- On Windows, fix icon not showing up in corner of window.
2019-04-08 02:48:21 +10:00
- On X11, change DPI scaling factor behavior. First, winit tries to read it from "Xft.dpi" XResource, and uses DPI calculation from xrandr dimensions as fallback behavior.
2019-03-20 13:19:41 +11:00
2019-03-07 13:50:13 +11:00
# Version 0.19.0 (2019-03-06)
2019-03-06 12:58:14 +11:00
- On X11, we will use the faster `XRRGetScreenResourcesCurrent` function instead of `XRRGetScreenResources` when available.
2019-02-24 07:41:55 +11:00
- On macOS, fix keycodes being incorrect when using a non-US keyboard layout.
2019-02-23 01:30:59 +11:00
- On Wayland, fix `with_title()` not setting the windows title
2019-01-29 21:04:15 +11:00
- On Wayland, add `set_wayland_theme()` to control client decoration color theme
2019-01-16 04:30:02 +11:00
- Added serde serialization to `os::unix::XWindowType` .
2019-02-24 12:59:00 +11:00
- **Breaking:** Remove the `icon_loading` feature and the associated `image` dependency.
2019-02-25 10:02:55 +11:00
- On X11, make event loop thread safe by replacing XNextEvent with select(2) and XCheckIfEvent
2019-02-05 03:52:00 +11:00
- On Windows, fix malformed function pointer typecast that could invoke undefined behavior.
- Refactored Windows state/flag-setting code.
- On Windows, hiding the cursor no longer hides the cursor for all Winit windows - just the one `hide_cursor` was called on.
- On Windows, cursor grabs used to get perpetually canceled when the grabbing window lost focus. Now, cursor grabs automatically get re-initialized when the window regains focus and the mouse moves over the client area.
2019-02-23 01:31:16 +11:00
- On Windows, only vertical mouse wheel events were handled. Now, horizontal mouse wheel events are also handled.
2019-03-06 09:55:01 +11:00
- On Windows, ignore the AltGr key when populating the `ModifersState` type.
2019-01-16 04:30:02 +11:00
2019-01-10 01:16:41 +11:00
# Version 0.18.1 (2018-12-30)
2018-12-20 05:32:14 +11:00
- On macOS, fix `Yen` (JIS) so applications receive the event.
2018-12-19 14:20:31 +11:00
- On X11 with a tiling WM, fixed high CPU usage when moving windows across monitors.
2018-11-11 05:54:50 +11:00
- On X11, fixed panic caused by dropping the window before running the event loop.
2018-12-19 15:07:33 +11:00
- on macOS, added `WindowExt::set_simple_fullscreen` which does not require a separate space
2018-11-16 08:59:56 +11:00
- Introduce `WindowBuilderExt::with_app_id` to allow setting the application ID on Wayland.
2018-11-18 06:20:04 +11:00
- On Windows, catch panics in event loop child thread and forward them to the parent thread. This prevents an invocation of undefined behavior due to unwinding into foreign code.
2018-11-17 14:17:32 +11:00
- On Windows, fix issue where resizing or moving window combined with grabbing the cursor would freeze program.
- On Windows, fix issue where resizing or moving window would eat `Awakened` events.
2018-11-21 07:57:06 +11:00
- On Windows, exiting fullscreen after entering fullscreen with disabled decorations no longer shrinks window.
2018-11-18 07:51:39 +11:00
- On X11, fixed a segfault when using virtual monitors with XRandR.
2018-11-20 08:59:04 +11:00
- Derive `Ord` and `PartialOrd` for `VirtualKeyCode` enum.
2018-11-20 19:28:26 +11:00
- On Windows, fix issue where hovering or dropping a non file item would create a panic.
2018-11-21 07:21:58 +11:00
- On Wayland, fix resizing and DPI calculation when a `wl_output` is removed without sending a `leave` event to the `wl_surface` , such as disconnecting a monitor from a laptop.
2018-12-11 06:55:40 +11:00
- On Wayland, DPI calculation is handled by smithay-client-toolkit.
2018-12-01 08:19:50 +11:00
- On X11, `WindowBuilder::with_min_dimensions` and `WindowBuilder::with_max_dimensions` now correctly account for DPI.
2018-12-22 03:51:48 +11:00
- Added support for generating dummy `DeviceId` s and `WindowId` s to better support unit testing.
2018-12-28 06:22:00 +11:00
- On macOS, fixed unsoundness in drag-and-drop that could result in drops being rejected.
2018-12-28 07:16:58 +11:00
- On macOS, implemented `WindowEvent::Refresh` .
2018-12-29 07:29:29 +11:00
- On macOS, all `MouseCursor` variants are now implemented and the cursor will no longer reset after unfocusing.
2018-12-30 13:02:02 +11:00
- Removed minimum supported Rust version guarantee.
2018-11-11 05:54:50 +11:00
2018-11-07 16:43:15 +11:00
# Version 0.18.0 (2018-11-07)
2018-10-24 11:29:11 +11:00
- **Breaking:** `image` crate upgraded to 0.20. This is exposed as part of the `icon_loading` API.
2018-10-18 13:34:02 +11:00
- On Wayland, pointer events will now provide the current modifiers state.
2018-10-18 13:03:26 +11:00
- On Wayland, titles will now be displayed in the window header decoration.
- On Wayland, key repetition is now ended when keyboard loses focus.
2018-10-15 10:15:43 +11:00
- On Wayland, windows will now use more stylish and modern client side decorations.
2018-09-21 03:48:36 +10:00
- On Wayland, windows will use server-side decorations when available.
2018-11-07 16:43:15 +11:00
- **Breaking:** Added support for F16-F24 keys (variants were added to the `VirtualKeyCode` enum).
2018-08-25 03:48:57 +10:00
- Fixed graphical glitches when resizing on Wayland.
- On Windows, fix freezes when performing certain actions after a window resize has been triggered. Reintroduces some visual artifacts when resizing.
2018-09-12 05:03:42 +10:00
- Updated window manager hints under X11 to v1.5 of [Extended Window Manager Hints ](https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html#idm140200472629520 ).
2018-09-21 07:00:04 +10:00
- Added `WindowBuilderExt::with_gtk_theme_variant` to X11-specific `WindowBuilder` functions.
2018-09-21 07:59:37 +10:00
- Fixed UTF8 handling bug in X11 `set_title` function.
2018-09-23 11:03:38 +10:00
- On Windows, `Window::set_cursor` now applies immediately instead of requiring specific events to occur first.
2018-10-25 05:40:12 +11:00
- On Windows, the `HoveredFile` and `HoveredFileCancelled` events are now implemented.
2018-10-18 13:03:26 +11:00
- On Windows, fix `Window::set_maximized` .
2018-10-18 14:20:12 +11:00
- On Windows 10, fix transparency (#260).
2018-10-20 07:32:57 +11:00
- On macOS, fix modifiers during key repeat.
2018-10-18 14:20:12 +11:00
- Implemented the `Debug` trait for `Window` , `EventsLoop` , `EventsLoopProxy` and `WindowBuilder` .
2018-10-20 07:32:57 +11:00
- On X11, now a `Resized` event will always be generated after a DPI change to ensure the window's logical size is consistent with the new DPI.
- Added further clarifications to the DPI docs.
2018-10-22 09:12:51 +11:00
- On Linux, if neither X11 nor Wayland manage to initialize, the corresponding panic now consists of a single line only.
2018-11-01 19:24:56 +11:00
- Add optional `serde` feature with implementations of `Serialize` /`Deserialize` for DPI types and various event types.
- Add `PartialEq` , `Eq` , and `Hash` implementations on public types that could have them but were missing them.
2018-11-03 08:41:51 +11:00
- On X11, drag-and-drop receiving an unsupported drop type can no longer cause the WM to freeze.
2018-11-06 06:34:54 +11:00
- Fix issue whereby the OpenGL context would not appear at startup on macOS Mojave (#1069).
2018-11-06 10:54:22 +11:00
- **Breaking:** Removed `From<NSApplicationActivationPolicy>` impl from `ActivationPolicy` on macOS.
2018-11-07 15:50:40 +11:00
- On macOS, the application can request the user's attention with `WindowExt::request_user_attention` .
2018-08-24 03:20:02 +10:00
2018-08-20 08:27:57 +10:00
# Version 0.17.2 (2018-08-19)
2018-08-16 09:42:57 +10:00
- On macOS, fix `<C-Tab>` so applications receive the event.
- On macOS, fix `<Cmd-{key}>` so applications receive the event.
2018-08-20 07:17:40 +10:00
- On Wayland, key press events will now be repeated.
2018-08-16 09:42:57 +10:00
2018-08-08 04:24:43 +10:00
# Version 0.17.1 (2018-08-05)
- On X11, prevent a compilation failure in release mode for versions of Rust greater than or equal to 1.30.
- Fixed deadlock that broke fullscreen mode on Windows.
2018-08-05 16:24:49 +10:00
2018-08-03 06:26:30 +10:00
# Version 0.17.0 (2018-08-02)
- Cocoa and core-graphics updates.
- Fixed thread-safety issues in several `Window` functions on Windows.
2018-07-26 03:36:33 +10:00
- On MacOS, the key state for modifiers key events is now properly set.
2018-07-14 05:10:12 +10:00
- On iOS, the view is now set correctly. This makes it possible to render things (instead of being stuck on a black screen), and touch events work again.
2018-07-17 00:25:27 +10:00
- Added NetBSD support.
2018-07-26 04:49:46 +10:00
- **Breaking:** On iOS, `UIView` is now the default root view. `WindowBuilderExt::with_root_view_class` can be used to set the root view objective-c class to `GLKView` (OpenGLES) or `MTKView` (Metal/MoltenVK).
- On iOS, the `UIApplication` is not started until `Window::new` is called.
2018-07-27 07:14:16 +10:00
- Fixed thread unsafety with cursor hiding on macOS.
2018-07-27 09:27:26 +10:00
- On iOS, fixed the size of the `JmpBuf` type used for `setjmp` /`longjmp` calls. Previously this was a buffer overflow on most architectures.
2018-08-03 03:03:15 +10:00
- On Windows, use cached window DPI instead of repeatedly querying the system. This fixes sporadic crashes on Windows 7.
2018-07-14 05:10:12 +10:00
2018-07-08 07:21:53 +10:00
# Version 0.16.2 (2018-07-07)
2018-07-04 10:15:19 +10:00
- On Windows, non-resizable windows now have the maximization button disabled. This is consistent with behavior on macOS and popular X11 WMs.
2018-07-06 01:52:25 +10:00
- Corrected incorrect `unreachable!` usage when guessing the DPI factor with no detected monitors.
2018-07-04 10:15:19 +10:00
2018-07-03 10:14:38 +10:00
# Version 0.16.1 (2018-07-02)
2018-07-02 01:01:46 +10:00
- Added logging through `log` . Logging will become more extensive over time.
2022-03-27 02:43:13 +11:00
- On X11 and Windows, the window's DPI factor is guessed before creating the window. This _greatly_ cuts back on unsightly auto-resizing that would occur immediately after window creation.
2018-07-03 01:05:25 +10:00
- Fixed X11 backend compilation for environments where `c_char` is unsigned.
2018-07-02 01:01:46 +10:00
2018-06-26 06:47:10 +10:00
# Version 0.16.0 (2018-06-25)
2018-06-22 11:33:29 +10:00
- Windows additionally has `WindowBuilderExt::with_no_redirection_bitmap` .
2018-06-14 03:24:33 +10:00
- **Breaking:** Removed `VirtualKeyCode::LMenu` and `VirtualKeyCode::RMenu` ; Windows now generates `VirtualKeyCode::LAlt` and `VirtualKeyCode::RAlt` instead.
2018-06-15 09:42:18 +10:00
- On X11, exiting fullscreen no longer leaves the window in the monitor's top left corner.
- **Breaking:** `Window::hidpi_factor` has been renamed to `Window::get_hidpi_factor` for better consistency. `WindowEvent::HiDPIFactorChanged` has been renamed to `WindowEvent::HiDpiFactorChanged` . DPI factors are always represented as `f64` instead of `f32` now.
- The Windows backend is now DPI aware. `WindowEvent::HiDpiFactorChanged` is implemented, and `MonitorId::get_hidpi_factor` and `Window::hidpi_factor` return accurate values.
- Implemented `WindowEvent::HiDpiFactorChanged` on X11.
- On macOS, `Window::set_cursor_position` is now relative to the client area.
- On macOS, setting the maximum and minimum dimensions now applies to the client area dimensions rather than to the window dimensions.
- On iOS, `MonitorId::get_dimensions` has been implemented and both `MonitorId::get_hidpi_factor` and `Window::get_hidpi_factor` return accurate values.
- On Emscripten, `MonitorId::get_hidpi_factor` now returns the same value as `Window::get_hidpi_factor` (it previously would always return 1.0).
- **Breaking:** The entire API for sizes, positions, etc. has changed. In the majority of cases, winit produces and consumes positions and sizes as `LogicalPosition` and `LogicalSize` , respectively. The notable exception is `MonitorId` methods, which deal in `PhysicalPosition` and `PhysicalSize` . See the documentation for specifics and explanations of the types. Additionally, winit automatically conserves logical size when the DPI factor changes.
- **Breaking:** All deprecated methods have been removed. For `Window::platform_display` and `Window::platform_window` , switch to the appropriate platform-specific `WindowExt` methods. For `Window::get_inner_size_points` and `Window::get_inner_size_pixels` , use the `LogicalSize` returned by `Window::get_inner_size` and convert as needed.
- HiDPI support for Wayland.
2018-06-17 00:14:12 +10:00
- `EventsLoop::get_available_monitors` and `EventsLoop::get_primary_monitor` now have identical counterparts on `Window` , so this information can be acquired without an `EventsLoop` borrow.
- `AvailableMonitorsIter` now implements `Debug` .
2018-06-18 05:08:26 +10:00
- Fixed quirk on macOS where certain keys would generate characters at twice the normal rate when held down.
2018-06-18 10:44:38 +10:00
- On X11, all event loops now share the same `XConnection` .
2018-06-19 02:32:18 +10:00
- **Breaking:** `Window::set_cursor_state` and `CursorState` enum removed in favor of the more composable `Window::grab_cursor` and `Window::hide_cursor` . As a result, grabbing the cursor no longer automatically hides it; you must call both methods to retain the old behavior on Windows and macOS. `Cursor::NoneCursor` has been removed, as it's no longer useful.
2018-06-20 00:30:15 +10:00
- **Breaking:** `Window::set_cursor_position` now returns `Result<(), String>` , thus allowing for `Box<Error>` conversion via `?` .
2018-06-14 03:24:33 +10:00
2018-06-14 02:06:22 +10:00
# Version 0.15.1 (2018-06-13)
2018-05-29 21:48:47 +10:00
- On X11, the `Moved` event is no longer sent when the window is resized without changing position.
- `MouseCursor` and `CursorState` now implement `Default` .
2018-06-14 01:18:44 +10:00
- `WindowBuilder::with_resizable` implemented for Windows, X11, Wayland, and macOS.
- `Window::set_resizable` implemented for Windows, X11, Wayland, and macOS.
2018-06-04 03:11:54 +10:00
- On X11, if the monitor's width or height in millimeters is reported as 0, the DPI is now 1.0 instead of +inf.
2018-06-04 02:41:47 +10:00
- On X11, the environment variable `WINIT_HIDPI_FACTOR` has been added for overriding DPI factor.
2018-06-04 03:11:54 +10:00
- On X11, enabling transparency no longer causes the window contents to flicker when resizing.
- On X11, `with_override_redirect` now actually enables override redirect.
2018-06-07 01:30:26 +10:00
- macOS now generates `VirtualKeyCode::LAlt` and `VirtualKeyCode::RAlt` instead of `None` for both.
- On macOS, `VirtualKeyCode::RWin` and `VirtualKeyCode::LWin` are no longer switched.
2018-06-08 03:29:23 +10:00
- On macOS, windows without decorations can once again be resized.
2018-06-08 04:08:19 +10:00
- Fixed race conditions when creating an `EventsLoop` on X11, most commonly manifesting as "[xcb] Unknown sequence number while processing queue".
2018-06-12 01:16:39 +10:00
- On macOS, `CursorMoved` and `MouseInput` events are only generated if they occurs within the window's client area.
- On macOS, resizing the window no longer generates a spurious `MouseInput` event.
2018-05-29 21:48:47 +10:00
2018-05-23 04:17:41 +10:00
# Version 0.15.0 (2018-05-22)
2018-05-11 08:42:41 +10:00
- `Icon::to_cardinals` is no longer public, since it was never supposed to be.
2018-05-12 21:58:11 +10:00
- Wayland: improve diagnostics if initialization fails
2018-05-13 12:10:57 +10:00
- Fix some system event key doesn't work when focused, do not block keyevent forward to system on macOS
2018-05-13 22:44:23 +10:00
- On X11, the scroll wheel position is now correctly reset on i3 and other WMs that have the same quirk.
2018-05-14 22:14:57 +10:00
- On X11, `Window::get_current_monitor` now reliably returns the correct monitor.
- On X11, `Window::hidpi_factor` returns values from XRandR rather than the inaccurate values previously queried from the core protocol.
- On X11, the primary monitor is detected correctly even when using versions of XRandR less than 1.5.
- `MonitorId` now implements `Debug` .
2018-05-16 22:51:56 +10:00
- Fixed bug on macOS where using `with_decorations(false)` would cause `set_decorations(true)` to produce a transparent titlebar with no title.
2018-05-16 23:41:45 +10:00
- Implemented `MonitorId::get_position` on macOS.
- On macOS, `Window::get_current_monitor` now returns accurate values.
2018-05-17 00:16:36 +10:00
- Added `WindowBuilderExt::with_resize_increments` to macOS.
- **Breaking:** On X11, `WindowBuilderExt::with_resize_increments` and `WindowBuilderExt::with_base_size` now take `u32` values rather than `i32` .
2018-05-18 11:28:30 +10:00
- macOS keyboard handling has been overhauled, allowing for the use of dead keys, IME, etc. Right modifier keys are also no longer reported as being left.
- Added the `Window::set_ime_spot(x: i32, y: i32)` method, which is implemented on X11 and macOS.
- **Breaking**: `os::unix::WindowExt::send_xim_spot(x: i16, y: i16)` no longer exists. Switch to the new `Window::set_ime_spot(x: i32, y: i32)` , which has equivalent functionality.
2018-05-19 08:48:19 +10:00
- Fixed detection of `Pause` and `Scroll` keys on Windows.
2018-05-23 04:17:41 +10:00
- On Windows, alt-tabbing while the cursor is grabbed no longer makes it impossible to re-grab the cursor.
2018-05-20 02:02:57 +10:00
- On Windows, using `CursorState::Hide` when the cursor is grabbed now ungrabs the cursor first.
- Implemented `MouseCursor::NoneCursor` on Windows.
2018-05-21 00:24:05 +10:00
- Added `WindowBuilder::with_always_on_top` and `Window::set_always_on_top` . Implemented on Windows, macOS, and X11.
2018-05-21 00:47:22 +10:00
- On X11, `WindowBuilderExt` now has `with_class` , `with_override_redirect` , and `with_x11_window_type` to allow for more control over window creation. `WindowExt` additionally has `set_urgent` .
- More hints are set by default on X11, including `_NET_WM_PID` and `WM_CLIENT_MACHINE` . Note that prior to this, the `WM_CLASS` hint was automatically set to whatever value was passed to `with_title` . It's now set to the executable name to better conform to expectations and the specification; if this is undesirable, you must explicitly use `WindowBuilderExt::with_class` .
2018-05-11 08:42:41 +10:00
2018-05-10 00:58:06 +10:00
# Version 0.14.0 (2018-05-09)
2018-05-03 09:18:52 +10:00
- Created the `Copy` , `Paste` and `Cut` `VirtualKeyCode` s and added support for them on X11 and Wayland
2018-04-30 08:51:57 +10:00
- Fix `.with_decorations(false)` in macOS
2018-04-29 02:10:06 +10:00
- On Mac, `NSWindow` and supporting objects might be alive long after they were `closed` which resulted in apps consuming more heap then needed. Mainly it was affecting multi window applications. Not expecting any user visible change of behaviour after the fix.
2018-04-28 14:12:50 +10:00
- Fix regression of Window platform extensions for macOS where `NSFullSizeContentViewWindowMask` was not being correctly applied to `.fullsize_content_view` .
Windows: Position fixes (#479)
* Remove executable flag from os/macos.rs
This was causing me some grief while working on Windows, and it
doesn't belong here to begin with.
* Windows: get_position returns screen coordinates instead of workspace coordinates
Previously, get_position used GetWindowPlacement. As per the
documentation of WINDOWSTRUCT, the returned coordinates are in
workspace space, meaning they're relative to the taskbar. It's
also explicitly remarked that these coordinates should only be
used in conjunction with SetWindowPlacement, as mixing them with
functions expecting screen coordinates can cause unpleasantness.
Since our set_position (correctly) uses SetWindowPos, this meant
that passing the return of get_position to set_position would
cause the window to move.
We now use GetWindowRect, which returns screen coordinates. This
gives us both better consistency within the Windows backend and
across platforms.
Note that this only makes a difference if the taskbar is visible.
With the taskbar hidden, the values are exactly the same as before.
* Windows: Moved event position values are consistent with get_position
The old Moved values had two problems:
* They were obtained by casting a WORD (u16) straight to an i32.
This meant wrap-around would never be interpreted as negative,
thus negative positions (which are ubiquitous when using multiple
monitors) would result in positions around u16::MAX.
* WM_MOVE supplies client area positions, not window positions.
Switching to handling WM_WINDOWPOSCHANGED solves both of these
problems.
* Better documentation for Moved and Resized
2018-04-27 10:09:33 +10:00
- Corrected `get_position` on Windows to be relative to the screen rather than to the taskbar.
- Corrected `Moved` event on Windows to use position values equivalent to those returned by `get_position` . It previously supplied client area positions instead of window positions, and would additionally interpret negative values as being very large (around `u16::MAX` ).
2018-04-28 10:46:20 +10:00
- Implemented `Moved` event on macOS.
X11: General cleanup (#491)
* X11: General cleanup
This is almost entirely internal changes, and as usual, doesn't actually
fix any problems people have complained about.
- `XSetInputFocus` can't be called before the window is visible. This
was previously handled by looping (with a sleep) and querying for the
window's state until it was visible. Now we use `XIfEvent`, which blocks
until we receive `VisibilityNotify`. Note that this can't be replaced
with an `XSync` (I tried).
- We now call `XSync` at the end of window creation and check for
errors, assuring that broken windows are never returned. When creating
invisible windows, this is the only time the output buffer is flushed
during the entire window creation process (AFAIK). For visible windows,
`XIfEvent` will generally flush, but window creation has overall been
reduced to the minimum number of flushes.
- `check_errors().expect()` has been a common pattern throughout the
backend, but it seems that people (myself included) didn't make a
distinction between using it after synchronous requests and asynchronous
requests. Now we only use it after async requests if we flush first,
though this still isn't correct (since the request likely hasn't been
processed yet). The only real solution (besides forcing a sync *every
time*) is to handle asynchronous errors *asynchronously*. For future
work, I plan on adding logging, though I don't plan on actually
*handling* those errors; that's more of something to hope for in the
hypothetical async/await XCB paradise.
- We now flush whenever it makes sense to. `util::Flusher` was added to
force contributors to be aware of the output buffer.
- `Window::get_position`, `Window::get_inner_position`,
`Window::get_inner_size`, and `Window::get_outer_size` previously all
required *several* round-trips. On my machine, it took an average of
around 80µs. They've now been reduced to one round-trip each, which
reduces my measurement to 16µs. This was accomplished simply by caching
the frame extents, which are expensive to calculate (due to various
queries and heuristics), but change infrequently and predictably. I
still recommend that application developers use these methods sparingly
and generally prefer storing the values from `Resized`/`Moved`, as
that's zero overhead.
- The above change enabled me to change the `Moved` event to supply
window positions, rather than client area positions. Additionally, we no
longer generate `Moved` for real (as in, not synthetic)
`ConfigureNotify` events. Real `ConfigureNotify` events contain
positions relative to the parent window, which are typically constant
and useless. Since that position would be completely different from the
root-relative positions supplied by synthetic `ConfigureNotify` events
(which are the vast majority of them), that meant real `ConfigureNotify`
events would *always* be detected as the position having changed, so the
resultant `Moved` was multiple levels of misleading. In practice, this
meant a garbage `Moved` would be sent every time the window was resized;
now a resize has to actually change the window's position to be
accompanied by `Moved`.
- Every time we processed an `XI_Enter` event, we would leak 4 bytes via
`util::query_pointer` (`XIQueryPointer`). `XIButtonState` contains a
dynamically-allocated mask field which we weren't freeing. As this event
occurs with fairly high frequency, long-running applications could
easily accumulate substantial leaks. `util::PointerState::drop` now
takes care of this.
- The `util` module has been split up into several sub-modules, as it
was getting rather lengthy. This accounts for a significant part of this
diff, unfortunately.
- Atoms are now cached. Xlib caches them too, so `XInternAtom` wouldn't
typically be a round-trip anyway, but the added complexity is
negligible.
- Switched from `std::sync::Mutex` to `parking_lot::Mutex` (within this
backend). There appears to be no downside to this, but if anyone finds
one, this would be easy to revert.
- The WM name and supported hints are now global to the application, and
are updated upon `ReparentNotify`, which should detect when the WM was
replaced (assuming a reparenting WM was involved, that is). Previously,
these values were per-window and would never update, meaning replacing
the WM could potentially lead to (admittedly very minor) problems.
- The result of `Window2::create_empty_cursor` will now only be used if
it actually succeeds.
- `Window2::load_cursor` no longer re-allocates the cursor name.
- `util::lookup_utf8` previously allocated a 16-byte buffer on the heap.
Now it allocates a 1024-byte buffer on the stack, and falls back to
dynamic allocation if the buffer is too small. This base buffer size is
admittedly gratuitous, but less so if you're using IME.
- `with_c_str` was finally removed.
- Added `util::Format` enum to help prevent goofs when dealing with
format arguments.
- `util::get_property`, something I added way back in my first winit PR,
only calculated offsets correctly for `util::Format::Char`. This was
concealed by the accomodating buffer size, as it would be very rare for
the offset to be needed; however, testing with a buffer size of 1,
`util::Format::Long` would read from the same offset multiple times, and
`util::Format::Short` would miss data. This function now works correctly
for all formats, relying on the simple fact that the offset increases by
the buffer size on each iteration. We also account for the extra byte
that `XGetWindowProperty` allocates at the end of the buffer, and copy
data from the buffer instead of moving it and taking ownership of the
pointer.
- Drag and drop now reliably works in release mode. This is presumably
related to the `util::get_property` changes.
- `util::change_property` now exists, which should make it easier to add
features in the future.
- The `EventsLoop` device map is no longer in a mutex.
- `XConnection` now implements `Debug`.
- Valgrind no longer complains about anything related to winit (with
either the system allocator or jemalloc, though "not having valgrind
complain about jemalloc" isn't something to strive for).
* X11: Add better diagnostics when initialization fails
* X11: Handle XIQueryDevice failure
* X11: Use correct types in error handler
2018-05-03 23:15:49 +10:00
- On X11, the `Moved` event correctly use window positions rather than client area positions. Additionally, a stray `Moved` that unconditionally accompanied `Resized` with the client area position relative to the parent has been eliminated; `Moved` is still received alongside `Resized` , but now only once and always correctly.
Windows: Implement DeviceEvents (#482)
Fixes #467
All variants other than Text have been implemented. While Text can
be implemented using ToUnicode, that doesn't play nice with dead
keys, IME, etc.
Most of the mouse DeviceEvents were already implemented, but due
to the flags that were used when registering for raw input events,
they only worked when the window was in the foreground.
This is also a step forward for #338, as DeviceIds are no longer
useless on Windows. On DeviceEvents, the DeviceId contains that
device's handle. While that handle could ostensibly be used by
developers to query device information, my actual reason for
choosing it is because it's simply a very easy way to handle this.
As a fun bonus, this enabled me to create this method:
DevideIdExt::get_persistent_identifier() -> Option<String>
Using this gives you a unique identifier for the device that
persists across replugs/reboots/etc., so it's ideal for something
like device-specific configuration.
There's a notable caveat to the new DeviceIds, which is that the
value will always be 0 for a WindowEvent. There doesn't seem to be
any straightforward way around this limitation.
I was concerned that multi-window applications would receive n
copies of every DeviceEvent, but Windows only sends them to one
window per application.
Lastly, there's a chance that these additions will cause
antivirus/etc. software to detect winit applications as keyloggers.
I don't know how likely that is to actually happen to people, but
if it does become an issue, the raw input code is neatly
sequestered and would be easy to make optional during compilation.
2018-04-29 02:42:33 +10:00
- On Windows, implemented all variants of `DeviceEvent` other than `Text` . Mouse `DeviceEvent` s are now received even if the window isn't in the foreground.
- `DeviceId` on Windows is no longer a unit struct, and now contains a `u32` . For `WindowEvent` s, this will always be 0, but on `DeviceEvent` s it will be the handle to that device. `DeviceIdExt::get_persistent_identifier` can be used to acquire a unique identifier for that device that persists across replugs/reboots/etc.
2018-04-29 09:03:06 +10:00
- Corrected `run_forever` on X11 to stop discarding `Awakened` events.
X11: General cleanup (#491)
* X11: General cleanup
This is almost entirely internal changes, and as usual, doesn't actually
fix any problems people have complained about.
- `XSetInputFocus` can't be called before the window is visible. This
was previously handled by looping (with a sleep) and querying for the
window's state until it was visible. Now we use `XIfEvent`, which blocks
until we receive `VisibilityNotify`. Note that this can't be replaced
with an `XSync` (I tried).
- We now call `XSync` at the end of window creation and check for
errors, assuring that broken windows are never returned. When creating
invisible windows, this is the only time the output buffer is flushed
during the entire window creation process (AFAIK). For visible windows,
`XIfEvent` will generally flush, but window creation has overall been
reduced to the minimum number of flushes.
- `check_errors().expect()` has been a common pattern throughout the
backend, but it seems that people (myself included) didn't make a
distinction between using it after synchronous requests and asynchronous
requests. Now we only use it after async requests if we flush first,
though this still isn't correct (since the request likely hasn't been
processed yet). The only real solution (besides forcing a sync *every
time*) is to handle asynchronous errors *asynchronously*. For future
work, I plan on adding logging, though I don't plan on actually
*handling* those errors; that's more of something to hope for in the
hypothetical async/await XCB paradise.
- We now flush whenever it makes sense to. `util::Flusher` was added to
force contributors to be aware of the output buffer.
- `Window::get_position`, `Window::get_inner_position`,
`Window::get_inner_size`, and `Window::get_outer_size` previously all
required *several* round-trips. On my machine, it took an average of
around 80µs. They've now been reduced to one round-trip each, which
reduces my measurement to 16µs. This was accomplished simply by caching
the frame extents, which are expensive to calculate (due to various
queries and heuristics), but change infrequently and predictably. I
still recommend that application developers use these methods sparingly
and generally prefer storing the values from `Resized`/`Moved`, as
that's zero overhead.
- The above change enabled me to change the `Moved` event to supply
window positions, rather than client area positions. Additionally, we no
longer generate `Moved` for real (as in, not synthetic)
`ConfigureNotify` events. Real `ConfigureNotify` events contain
positions relative to the parent window, which are typically constant
and useless. Since that position would be completely different from the
root-relative positions supplied by synthetic `ConfigureNotify` events
(which are the vast majority of them), that meant real `ConfigureNotify`
events would *always* be detected as the position having changed, so the
resultant `Moved` was multiple levels of misleading. In practice, this
meant a garbage `Moved` would be sent every time the window was resized;
now a resize has to actually change the window's position to be
accompanied by `Moved`.
- Every time we processed an `XI_Enter` event, we would leak 4 bytes via
`util::query_pointer` (`XIQueryPointer`). `XIButtonState` contains a
dynamically-allocated mask field which we weren't freeing. As this event
occurs with fairly high frequency, long-running applications could
easily accumulate substantial leaks. `util::PointerState::drop` now
takes care of this.
- The `util` module has been split up into several sub-modules, as it
was getting rather lengthy. This accounts for a significant part of this
diff, unfortunately.
- Atoms are now cached. Xlib caches them too, so `XInternAtom` wouldn't
typically be a round-trip anyway, but the added complexity is
negligible.
- Switched from `std::sync::Mutex` to `parking_lot::Mutex` (within this
backend). There appears to be no downside to this, but if anyone finds
one, this would be easy to revert.
- The WM name and supported hints are now global to the application, and
are updated upon `ReparentNotify`, which should detect when the WM was
replaced (assuming a reparenting WM was involved, that is). Previously,
these values were per-window and would never update, meaning replacing
the WM could potentially lead to (admittedly very minor) problems.
- The result of `Window2::create_empty_cursor` will now only be used if
it actually succeeds.
- `Window2::load_cursor` no longer re-allocates the cursor name.
- `util::lookup_utf8` previously allocated a 16-byte buffer on the heap.
Now it allocates a 1024-byte buffer on the stack, and falls back to
dynamic allocation if the buffer is too small. This base buffer size is
admittedly gratuitous, but less so if you're using IME.
- `with_c_str` was finally removed.
- Added `util::Format` enum to help prevent goofs when dealing with
format arguments.
- `util::get_property`, something I added way back in my first winit PR,
only calculated offsets correctly for `util::Format::Char`. This was
concealed by the accomodating buffer size, as it would be very rare for
the offset to be needed; however, testing with a buffer size of 1,
`util::Format::Long` would read from the same offset multiple times, and
`util::Format::Short` would miss data. This function now works correctly
for all formats, relying on the simple fact that the offset increases by
the buffer size on each iteration. We also account for the extra byte
that `XGetWindowProperty` allocates at the end of the buffer, and copy
data from the buffer instead of moving it and taking ownership of the
pointer.
- Drag and drop now reliably works in release mode. This is presumably
related to the `util::get_property` changes.
- `util::change_property` now exists, which should make it easier to add
features in the future.
- The `EventsLoop` device map is no longer in a mutex.
- `XConnection` now implements `Debug`.
- Valgrind no longer complains about anything related to winit (with
either the system allocator or jemalloc, though "not having valgrind
complain about jemalloc" isn't something to strive for).
* X11: Add better diagnostics when initialization fails
* X11: Handle XIQueryDevice failure
* X11: Use correct types in error handler
2018-05-03 23:15:49 +10:00
- Various safety and correctness improvements to the X11 backend internals.
- Fixed memory leak on X11 every time the mouse entered the window.
- On X11, drag and drop now works reliably in release mode.
2018-05-03 23:41:11 +10:00
- Added `WindowBuilderExt::with_resize_increments` and `WindowBuilderExt::with_base_size` to X11, allowing for more optional hints to be set.
2018-05-06 03:36:34 +10:00
- Rework of the wayland backend, migrating it to use [Smithay's Client Toolkit ](https://github.com/Smithay/client-toolkit ).
2018-05-08 07:36:21 +10:00
- Added `WindowBuilder::with_window_icon` and `Window::set_window_icon` , finally making it possible to set the window icon on Windows and X11. The `icon_loading` feature can be enabled to allow for icons to be easily loaded; see example program `window_icon.rs` for usage.
- Windows additionally has `WindowBuilderExt::with_taskbar_icon` and `WindowExt::set_taskbar_icon` .
2018-05-08 22:16:49 +10:00
- On Windows, fix panic when trying to call `set_fullscreen(None)` on a window that has not been fullscreened prior.
Windows: Position fixes (#479)
* Remove executable flag from os/macos.rs
This was causing me some grief while working on Windows, and it
doesn't belong here to begin with.
* Windows: get_position returns screen coordinates instead of workspace coordinates
Previously, get_position used GetWindowPlacement. As per the
documentation of WINDOWSTRUCT, the returned coordinates are in
workspace space, meaning they're relative to the taskbar. It's
also explicitly remarked that these coordinates should only be
used in conjunction with SetWindowPlacement, as mixing them with
functions expecting screen coordinates can cause unpleasantness.
Since our set_position (correctly) uses SetWindowPos, this meant
that passing the return of get_position to set_position would
cause the window to move.
We now use GetWindowRect, which returns screen coordinates. This
gives us both better consistency within the Windows backend and
across platforms.
Note that this only makes a difference if the taskbar is visible.
With the taskbar hidden, the values are exactly the same as before.
* Windows: Moved event position values are consistent with get_position
The old Moved values had two problems:
* They were obtained by casting a WORD (u16) straight to an i32.
This meant wrap-around would never be interpreted as negative,
thus negative positions (which are ubiquitous when using multiple
monitors) would result in positions around u16::MAX.
* WM_MOVE supplies client area positions, not window positions.
Switching to handling WM_WINDOWPOSCHANGED solves both of these
problems.
* Better documentation for Moved and Resized
2018-04-27 10:09:33 +10:00
2018-04-27 08:53:16 +10:00
# Version 0.13.1 (2018-04-26)
- Ensure necessary `x11-dl` version is used.
2018-04-26 01:43:32 +10:00
# Version 0.13.0 (2018-04-25)
2018-04-18 04:07:54 +10:00
- Implement `WindowBuilder::with_maximized` , `Window::set_fullscreen` , `Window::set_maximized` and `Window::set_decorations` for MacOS.
2018-04-13 03:12:15 +10:00
- Implement `WindowBuilder::with_maximized` , `Window::set_fullscreen` , `Window::set_maximized` and `Window::set_decorations` for Windows.
2018-04-26 01:43:32 +10:00
- On Windows, `WindowBuilder::with_fullscreen` no longer changing monitor display resolution.
2018-04-08 05:36:10 +10:00
- Overhauled X11 window geometry calculations. `get_position` and `set_position` are more universally accurate across different window managers, and `get_outer_size` actually works now.
2018-04-10 05:58:47 +10:00
- Fixed SIGSEGV/SIGILL crashes on macOS caused by stabilization of the `!` (never) type.
2018-04-11 11:42:22 +10:00
- Implement `WindowEvent::HiDPIFactorChanged` for macOS
2018-04-11 12:18:30 +10:00
- On X11, input methods now work completely out of the box, no longer requiring application developers to manually call `setlocale` . Additionally, when input methods are started, stopped, or restarted on the server end, it's correctly handled.
2018-04-11 23:29:01 +10:00
- Implemented `Refresh` event on Windows.
2018-04-14 04:15:30 +10:00
- Properly calculate the minimum and maximum window size on Windows, including window decorations.
2018-04-14 03:53:01 +10:00
- Map more `MouseCursor` variants to cursor icons on Windows.
2018-04-17 11:40:30 +10:00
- Corrected `get_position` on macOS to return outer frame position, not content area position.
- Corrected `set_position` on macOS to set outer frame position, not content area position.
- Added `get_inner_position` method to `Window` , which gets the position of the window's client area. This is implemented on all applicable platforms (all desktop platforms other than Wayland, where this isn't possible).
2018-04-25 06:20:40 +10:00
- **Breaking:** the `Closed` event has been replaced by `CloseRequested` and `Destroyed` . To migrate, you typically just need to replace all usages of `Closed` with `CloseRequested` ; see example programs for more info. The exception is iOS, where `Closed` must be replaced by `Destroyed` .
2018-04-08 05:36:10 +10:00
2018-04-06 19:19:12 +10:00
# Version 0.12.0 (2018-04-06)
2018-04-03 09:12:38 +10:00
- Added subclass to macos windows so they can be made resizable even with no decorations.
2018-04-06 02:58:24 +10:00
- Dead keys now work properly on X11, no longer resulting in a panic.
2018-04-06 03:21:50 +10:00
- On X11, input method creation first tries to use the value from the user's `XMODIFIERS` environment variable, so application developers should no longer need to manually call `XSetLocaleModifiers` . If that fails, fallbacks are tried, which should prevent input method initialization from ever outright failing.
2018-04-06 04:58:10 +10:00
- Fixed thread safety issues with input methods on X11.
2018-04-06 05:25:37 +10:00
- Add support for `Touch` for win32 backend.
2018-04-06 05:51:15 +10:00
- Fixed `Window::get_inner_size` and friends to return the size in pixels instead of points when using HIDPI displays on OSX.
2018-04-03 09:12:38 +10:00
2018-03-28 22:32:46 +11:00
# Version 0.11.3 (2018-03-28)
- Added `set_min_dimensions` and `set_max_dimensions` methods to `Window` , and implemented on Windows, X11, Wayland, and OSX.
x11: Destroy dropped windows; handle WM_DELETE_WINDOW (#416)
Fixes #79 #414
This changes the implementation of Drop for Window to send a WM_DELETE_WINDOW ClientMessage,
offloading all the cleanup and window destruction to the event loop. Unsurprisingly, this
entails that the event loop now handles WM_DELETE_WINDOW using the behavior that was
previously contained in Window's Drop implementation, along with destroying the Window.
Not only does this mean that dropped windows are closed, but also that clicking the × button
on the window actually closes it now.
The previous implemention of Drop was also broken, as the event loop would be (seemingly
permenanently) frozen after its invocation. That was caused specifically by the mutex
locking, and is no longer an issue now that the locking is done in the event loop.
While I don't have full confidence that it makes sense for the Drop implementation to behave
this way, this is nonetheless a significant improvement. The previous behavior led to
inconsistent state, panics, and event loop breakage, along with not actually destroying the
window.
This additionally makes the assumption that users don't need Focused or CursorLeft events
for the destroyed window, as Closed is adequate to indicate unfocus, and users may not
expect to receive events for closed/dropped windows. In my testing, those specific events
were sent immediately after the window was destroyed, though this sort of behavior could be
WM-specific. I've opted to explicitly suppress those events in the case of the window no
longer existing.
2018-03-23 20:31:31 +11:00
- On X11, dropping a `Window` actually closes it now, and clicking the window's × button (or otherwise having the WM signal to close it) will result in the window closing.
2018-03-23 20:25:02 +11:00
- Added `WindowBuilderExt` methods for macos: `with_titlebar_transparent` ,
`with_title_hidden` , `with_titlebar_buttons_hidden` ,
`with_fullsize_content_view` .
2018-03-23 20:36:04 +11:00
- Mapped X11 numpad keycodes (arrows, Home, End, PageUp, PageDown, Insert and Delete) to corresponding virtual keycodes
2018-03-07 04:07:18 +11:00
# Version 0.11.2 (2018-03-06)
2018-02-23 04:15:56 +11:00
- Impl `Hash` , `PartialEq` , and `Eq` for `events::ModifiersState` .
2018-03-06 19:35:04 +11:00
- Implement `MonitorId::get_hidpi_factor` for MacOS.
- Added method `os::macos::MonitorIdExt::get_nsscreen() -> *mut c_void` that gets a `NSScreen` object matching the monitor ID.
2018-03-07 04:06:56 +11:00
- Send `Awakened` event on Android when event loop is woken up.
2018-02-23 04:15:56 +11:00
2018-02-21 02:18:17 +11:00
# Version 0.11.1 (2018-02-19)
2018-02-14 20:31:25 +11:00
- Fixed windows not receiving mouse events when click-dragging the mouse outside the client area of a window, on Windows platforms.
2018-02-21 02:18:17 +11:00
- Added method `os::android::EventsLoopExt:set_suspend_callback(Option<Box<Fn(bool) -> ()>>)` that allows glutin to register a callback when a suspend event happens
2018-02-14 20:31:25 +11:00
2018-02-09 22:07:19 +11:00
# Version 0.11.0 (2018-02-09)
2018-02-06 04:50:13 +11:00
2018-02-09 22:07:19 +11:00
- Implement `MonitorId::get_dimensions` for Android.
2018-01-23 05:07:51 +11:00
- Added method `os::macos::WindowBuilderExt::with_movable_by_window_background(bool)` that allows to move a window without a titlebar - `with_decorations(false)`
2018-01-13 16:38:12 +11:00
- Implement `Window::set_fullscreen` , `Window::set_maximized` and `Window::set_decorations` for Wayland.
2018-01-25 23:32:30 +11:00
- Added `Caret` as VirtualKeyCode and support OSX ^-Key with german input.
2018-01-13 16:38:12 +11:00
2018-02-09 22:07:19 +11:00
# Version 0.10.1 (2018-02-05)
2022-03-27 02:43:13 +11:00
_Yanked_
2018-02-09 22:07:19 +11:00
2017-12-28 05:44:53 +11:00
# Version 0.10.0 (2017-12-27)
2017-12-02 00:00:09 +11:00
- Add support for `Touch` for emscripten backend.
2017-12-13 22:22:03 +11:00
- Added support for `DroppedFile` , `HoveredFile` , and `HoveredFileCancelled` to X11 backend.
2017-12-17 20:17:26 +11:00
- **Breaking:** `unix::WindowExt` no longer returns pointers for things that aren't actually pointers; `get_xlib_window` now returns `Option<std::os::raw::c_ulong>` and `get_xlib_screen_id` returns `Option<std::os::raw::c_int>` . Additionally, methods that previously returned `libc::c_void` have been changed to return `std::os::raw::c_void` , which are not interchangeable types, so users wanting the former will need to explicitly cast.
2017-12-22 23:50:46 +11:00
- Added `set_decorations` method to `Window` to allow decorations to be toggled after the window is built. Presently only implemented on X11.
2017-12-28 05:44:53 +11:00
- Raised the minimum supported version of Rust to 1.20 on MacOS due to usage of associated constants in new versions of cocoa and core-graphics.
2017-12-27 08:46:28 +11:00
- Added `modifiers` field to `MouseInput` , `MouseWheel` , and `CursorMoved` events to track the modifiers state (`ModifiersState`).
2017-12-28 05:44:53 +11:00
- Fixed the emscripten backend to return the size of the canvas instead of the size of the window.
2017-12-02 00:00:09 +11:00
2017-12-01 20:58:48 +11:00
# Version 0.9.0 (2017-12-01)
2017-09-22 16:00:19 +10:00
2017-10-17 22:56:38 +11:00
- Added event `WindowEvent::HiDPIFactorChanged` .
- Added method `MonitorId::get_hidpi_factor` .
- Deprecated `get_inner_size_pixels` and `get_inner_size_points` methods of `Window` in favor of
`get_inner_size` .
2017-10-19 05:40:21 +11:00
- **Breaking:** `EventsLoop` is `!Send` and `!Sync` because of platform-dependant constraints,
but `Window` , `WindowId` , `DeviceId` and `MonitorId` guaranteed to be `Send` .
2017-10-20 04:08:05 +11:00
- `MonitorId::get_position` now returns `(i32, i32)` instead of `(u32, u32)` .
2017-10-20 18:46:42 +11:00
- Rewrite of the wayland backend to use wayland-client-0.11
- Support for dead keys on wayland for keyboard utf8 input
2017-10-26 02:12:39 +11:00
- Monitor enumeration on Windows is now implemented using `EnumDisplayMonitors` instead of
`EnumDisplayDevices` . This changes the value returned by `MonitorId::get_name()` .
- On Windows added `MonitorIdExt::hmonitor` method
2017-10-26 05:03:57 +11:00
- Impl `Clone` for `EventsLoopProxy`
2017-10-29 00:24:37 +11:00
- `EventsLoop::get_primary_monitor()` on X11 will fallback to any available monitor if no primary is found
2017-11-11 20:03:42 +11:00
- Support for touch event on wayland
2017-11-13 07:56:57 +11:00
- `WindowEvent` s `MouseMoved` , `MouseEntered` , and `MouseLeft` have been renamed to
`CursorMoved` , `CursorEntered` , and `CursorLeft` .
- New `DeviceEvent` s added, `MouseMotion` and `MouseWheel` .
2017-12-01 20:58:48 +11:00
- Send `CursorMoved` event after `CursorEntered` and `Focused` events.
- Add support for `ModifiersState` , `MouseMove` , `MouseInput` , `MouseMotion` for emscripten backend.
2017-10-17 22:56:38 +11:00
2017-10-12 18:39:41 +11:00
# Version 0.8.3 (2017-10-11)
2017-10-04 18:42:35 +11:00
- Fixed issue of calls to `set_inner_size` blocking on Windows.
2017-10-08 22:59:45 +11:00
- Mapped `ISO_Left_Tab` to `VirtualKeyCode::Tab` to make the key work with modifiers
2017-10-08 06:20:37 +11:00
- Fixed the X11 backed on 32bit targets
2017-10-04 18:42:35 +11:00
2017-09-29 03:04:26 +10:00
# Version 0.8.2 (2017-09-28)
2017-09-25 15:25:36 +10:00
- Uniformize keyboard scancode values accross Wayland and X11 (#297).
2017-09-28 00:31:46 +10:00
- Internal rework of the wayland event loop
- Added method `os::linux::WindowExt::is_ready`
2017-09-25 15:25:36 +10:00
2017-09-23 17:36:30 +10:00
# Version 0.8.1 (2017-09-22)
- Added various methods to `os::linux::EventsLoopExt` , plus some hidden items necessary to make
glutin work.
2017-09-22 16:00:19 +10:00
# Version 0.8.0 (2017-09-21)
- Added `Window::set_maximized` , `WindowAttributes::maximized` and `WindowBuilder::with_maximized` .
- Added `Window::set_fullscreen` .
2017-09-23 17:36:21 +10:00
- Changed `with_fullscreen` to take a `Option<MonitorId>` instead of a `MonitorId` .
2017-09-22 16:00:19 +10:00
- Removed `MonitorId::get_native_identifer()` in favor of platform-specific traits in the `os`
module.
- Changed `get_available_monitors()` and `get_primary_monitor()` to be methods of `EventsLoop`
instead of stand-alone methods.
- Changed `EventsLoop` to be tied to a specific X11 or Wayland connection.
- Added a `os::linux::EventsLoopExt` trait that makes it possible to configure the connection.
- Fixed the emscripten code, which now compiles.
- Changed the X11 fullscreen code to use `xrandr` instead of `xxf86vm` .
- Fixed the Wayland backend to produce `Refresh` event after window creation.
- Changed the `Suspended` event to be outside of `WindowEvent` .
- Fixed the X11 backend sometimes reporting the wrong virtual key (#273).