mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 23:00:05 -04:00
unix::WindowExt no longer returns pointers for things that aren't actually pointers (#364)
Fixes #256 `get_xlib_window` and `get_xlib_screen_id` previously returned `Option<*mut c_void>` by casting integer IDs into pointers, which while producing no functionality issues, is semantically incorrect and rather surprising. Worse still, the docs for `get_xlib_window` stated that it was in fact a valid pointer. Additionally, now all `unix::WindowExt` methods return `std::os::raw` types rather than `libc` types; note that the two versions of `c_void` are not interchangeable in the eyes of the compiler, so those wanting the `libc` type will need to explicitly cast. This is a breaking change, and will require some trivial changes to glutin.
This commit is contained in:
committed by
Pierre Krieger
parent
8f18dab061
commit
23e4293179
@@ -2,6 +2,7 @@
|
||||
|
||||
- Add support for `Touch` for emscripten backend.
|
||||
- Added support for `DroppedFile`, `HoveredFile`, and `HoveredFileCancelled` to X11 backend.
|
||||
- **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.
|
||||
|
||||
# Version 0.9.0 (2017-12-01)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user