* Add Copy/Paste keys This is only a tiny update which introduces the `Copy` and `Paste` keys which are present on X11/Wayland/Windows. I'm not sure if this exists on MacOS too, but I'm not able to test that and it doesn't have names but just matches on the hex key values. The "Copy" element is a reserved keyword in Rust but shouldn't cause any conflicts in this scenario, this behavior falls in line with https://docs.rs/winit/0.13.1/winit/enum.MouseCursor.html#variant.Copy, but it would be possible to rename it. However `Copy` seems like the most intuitive choice. * Add Cut key, fix windows and update CHANGELOG This introduces a bunch of minor fixes: * The changes introduced by this branch have been added to the changelog * Since related, the `Cut` key has also been added * An attempt has been made to fix Windows * Fix position of fallback comment The new keys have been inserted at the wrong position, so the fallback comment has been moved to the `_ => ...` section again. * Fix windows build Apparently there are no keys for Cut/Paste on Windows, so for now those have been removed on Windows and only the `Copy` key has been added on Windows, the changelog has been updated to reflect that. Linux still implements Copy/Clone/Paste, but `Copy` is now working properly on Wayland. MacOS still does not have any of these keys. * Remove Windows changes Because the Windows design wasn't completely clear the VirtualKeyCode variants are now only used on Linux with X11 and Wayland and ignored on both MacOS and Windows. The CHANGELOG has also been updated. Windows has been removed from it and the Linux section has been clarified a bit.
9.8 KiB
9.8 KiB
Unreleased
- Created the
Copy,PasteandCutVirtualKeyCodes and added support for them on X11 and Wayland - Fix
.with_decorations(false)in macOS - On Mac,
NSWindowand supporting objects might be alive long after they wereclosedwhich 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. - Fix regression of Window platform extensions for macOS where
NSFullSizeContentViewWindowMaskwas not being correctly applied to.fullsize_content_view. - Corrected
get_positionon Windows to be relative to the screen rather than to the taskbar. - Corrected
Movedevent on Windows to use position values equivalent to those returned byget_position. It previously supplied client area positions instead of window positions, and would additionally interpret negative values as being very large (aroundu16::MAX). - Implemented
Movedevent on macOS. - On Windows, implemented all variants of
DeviceEventother thanText. MouseDeviceEvents are now received even if the window isn't in the foreground. DeviceIdon Windows is no longer a unit struct, and now contains au32. ForWindowEvents, this will always be 0, but onDeviceEvents it will be the handle to that device.DeviceIdExt::get_persistent_identifiercan be used to acquire a unique identifier for that device that persists across replugs/reboots/etc.- Corrected
run_foreveron X11 to stop discardingAwakenedevents.
Version 0.13.1 (2018-04-26)
- Ensure necessary
x11-dlversion is used.
Version 0.13.0 (2018-04-25)
- Implement
WindowBuilder::with_maximized,Window::set_fullscreen,Window::set_maximizedandWindow::set_decorationsfor MacOS. - Implement
WindowBuilder::with_maximized,Window::set_fullscreen,Window::set_maximizedandWindow::set_decorationsfor Windows. - On Windows,
WindowBuilder::with_fullscreenno longer changing monitor display resolution. - Overhauled X11 window geometry calculations.
get_positionandset_positionare more universally accurate across different window managers, andget_outer_sizeactually works now. - Fixed SIGSEGV/SIGILL crashes on macOS caused by stabilization of the
!(never) type. - Implement
WindowEvent::HiDPIFactorChangedfor macOS - 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. - Implemented
Refreshevent on Windows. - Properly calculate the minimum and maximum window size on Windows, including window decorations.
- Map more
MouseCursorvariants to cursor icons on Windows. - Corrected
get_positionon macOS to return outer frame position, not content area position. - Corrected
set_positionon macOS to set outer frame position, not content area position. - Added
get_inner_positionmethod toWindow, 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). - Breaking: the
Closedevent has been replaced byCloseRequestedandDestroyed. To migrate, you typically just need to replace all usages ofClosedwithCloseRequested; see example programs for more info. The exception is iOS, whereClosedmust be replaced byDestroyed.
Version 0.12.0 (2018-04-06)
- Added subclass to macos windows so they can be made resizable even with no decorations.
- Dead keys now work properly on X11, no longer resulting in a panic.
- On X11, input method creation first tries to use the value from the user's
XMODIFIERSenvironment variable, so application developers should no longer need to manually callXSetLocaleModifiers. If that fails, fallbacks are tried, which should prevent input method initialization from ever outright failing. - Fixed thread safety issues with input methods on X11.
- Add support for
Touchfor win32 backend. - Fixed
Window::get_inner_sizeand friends to return the size in pixels instead of points when using HIDPI displays on OSX.
Version 0.11.3 (2018-03-28)
- Added
set_min_dimensionsandset_max_dimensionsmethods toWindow, and implemented on Windows, X11, Wayland, and OSX. - On X11, dropping a
Windowactually closes it now, and clicking the window's × button (or otherwise having the WM signal to close it) will result in the window closing. - Added
WindowBuilderExtmethods for macos:with_titlebar_transparent,with_title_hidden,with_titlebar_buttons_hidden,with_fullsize_content_view. - Mapped X11 numpad keycodes (arrows, Home, End, PageUp, PageDown, Insert and Delete) to corresponding virtual keycodes
Version 0.11.2 (2018-03-06)
- Impl
Hash,PartialEq, andEqforevents::ModifiersState. - Implement
MonitorId::get_hidpi_factorfor MacOS. - Added method
os::macos::MonitorIdExt::get_nsscreen() -> *mut c_voidthat gets aNSScreenobject matching the monitor ID. - Send
Awakenedevent on Android when event loop is woken up.
Version 0.11.1 (2018-02-19)
- Fixed windows not receiving mouse events when click-dragging the mouse outside the client area of a window, on Windows platforms.
- Added method
os::android::EventsLoopExt:set_suspend_callback(Option<Box<Fn(bool) -> ()>>)that allows glutin to register a callback when a suspend event happens
Version 0.11.0 (2018-02-09)
- Implement
MonitorId::get_dimensionsfor Android. - Added method
os::macos::WindowBuilderExt::with_movable_by_window_background(bool)that allows to move a window without a titlebar -with_decorations(false) - Implement
Window::set_fullscreen,Window::set_maximizedandWindow::set_decorationsfor Wayland. - Added
Caretas VirtualKeyCode and support OSX ^-Key with german input.
Version 0.10.1 (2018-02-05)
Yanked
Version 0.10.0 (2017-12-27)
- Add support for
Touchfor emscripten backend. - Added support for
DroppedFile,HoveredFile, andHoveredFileCancelledto X11 backend. - Breaking:
unix::WindowExtno longer returns pointers for things that aren't actually pointers;get_xlib_windownow returnsOption<std::os::raw::c_ulong>andget_xlib_screen_idreturnsOption<std::os::raw::c_int>. Additionally, methods that previously returnedlibc::c_voidhave been changed to returnstd::os::raw::c_void, which are not interchangeable types, so users wanting the former will need to explicitly cast. - Added
set_decorationsmethod toWindowto allow decorations to be toggled after the window is built. Presently only implemented on X11. - 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.
- Added
modifiersfield toMouseInput,MouseWheel, andCursorMovedevents to track the modifiers state (ModifiersState). - Fixed the emscripten backend to return the size of the canvas instead of the size of the window.
Version 0.9.0 (2017-12-01)
- Added event
WindowEvent::HiDPIFactorChanged. - Added method
MonitorId::get_hidpi_factor. - Deprecated
get_inner_size_pixelsandget_inner_size_pointsmethods ofWindowin favor ofget_inner_size. - Breaking:
EventsLoopis!Sendand!Syncbecause of platform-dependant constraints, butWindow,WindowId,DeviceIdandMonitorIdguaranteed to beSend. MonitorId::get_positionnow returns(i32, i32)instead of(u32, u32).- Rewrite of the wayland backend to use wayland-client-0.11
- Support for dead keys on wayland for keyboard utf8 input
- Monitor enumeration on Windows is now implemented using
EnumDisplayMonitorsinstead ofEnumDisplayDevices. This changes the value returned byMonitorId::get_name(). - On Windows added
MonitorIdExt::hmonitormethod - Impl
CloneforEventsLoopProxy EventsLoop::get_primary_monitor()on X11 will fallback to any available monitor if no primary is found- Support for touch event on wayland
WindowEventsMouseMoved,MouseEntered, andMouseLefthave been renamed toCursorMoved,CursorEntered, andCursorLeft.- New
DeviceEvents added,MouseMotionandMouseWheel. - Send
CursorMovedevent afterCursorEnteredandFocusedevents. - Add support for
ModifiersState,MouseMove,MouseInput,MouseMotionfor emscripten backend.
Version 0.8.3 (2017-10-11)
- Fixed issue of calls to
set_inner_sizeblocking on Windows. - Mapped
ISO_Left_TabtoVirtualKeyCode::Tabto make the key work with modifiers - Fixed the X11 backed on 32bit targets
Version 0.8.2 (2017-09-28)
- Uniformize keyboard scancode values accross Wayland and X11 (#297).
- Internal rework of the wayland event loop
- Added method
os::linux::WindowExt::is_ready
Version 0.8.1 (2017-09-22)
- Added various methods to
os::linux::EventsLoopExt, plus some hidden items necessary to make glutin work.
Version 0.8.0 (2017-09-21)
- Added
Window::set_maximized,WindowAttributes::maximizedandWindowBuilder::with_maximized. - Added
Window::set_fullscreen. - Changed
with_fullscreento take aOption<MonitorId>instead of aMonitorId. - Removed
MonitorId::get_native_identifer()in favor of platform-specific traits in theosmodule. - Changed
get_available_monitors()andget_primary_monitor()to be methods ofEventsLoopinstead of stand-alone methods. - Changed
EventsLoopto be tied to a specific X11 or Wayland connection. - Added a
os::linux::EventsLoopExttrait that makes it possible to configure the connection. - Fixed the emscripten code, which now compiles.
- Changed the X11 fullscreen code to use
xrandrinstead ofxxf86vm. - Fixed the Wayland backend to produce
Refreshevent after window creation. - Changed the
Suspendedevent to be outside ofWindowEvent. - Fixed the X11 backend sometimes reporting the wrong virtual key (#273).