While winit was always using dlopen for opening system libs, it
provides a way now to disable dlopen feature helping with linking
on some targets.
Fixes#2037.
* Fix X11 memory leak and remove mio-misc
I also fixed a couple of clippy lints.
Fixes#1984
* Send the redraw event before waking up the main event
* Use .map instead of a match, and remove comments saved by git
* Remove unnecessary pub keywords on `WakeSender` in x11/mod.rs
This commit also drops 'Theme' trait with its support types
in favor of 'FallbackFrame' meaning that winit will use some
predefined frame for the time being, since porting 'ConceptFrame'
will require adding font rendering librarires right into winit,
which is not desired.
Fixes#1889.
* Enable to show text when IME is active
* Remove unnecessary variable
* Enable to use IME
* fmt
* Remove println! for debug
* Fix handling of utf-8 string
* clear_marked_text should be rust function, not member function
* Store state information in ViewState
* Remove unnecessary function
* format
* Remove mut
* format
* Remove duplicate marked text
* Remove unused `is_preediting` field
Co-authored-by: Artúr Kovács <kovacs.artur.barnabas@gmail.com>
* Remove support for `stdweb`
* Expunge `stdweb`; make `web-sys` the default
* Mark this change as a breaking change
* Re-insert accidental removal of space
* Use the correct cargo feature syntax
* Re-add some `cfg` attributes
* Remove `web-sys` feature from CI
* Fix for #1850
* Update changelog
* Fix for compilation warnings
* Apply suggestions from code review
Co-authored-by: Markus Røyset <maroider@protonmail.com>
* Improve code quality
* Change Arc<Mutex> to Rc<RefCell>
* Panicking in the user callback is now well defined
* Address feedback
* Fix nightly warning
* The panic info is now not a global.
* Apply suggestions from code review
Co-authored-by: Francesca Lovebloom <francesca@brainiumstudios.com>
* Address feedback
Co-authored-by: Markus Røyset <maroider@protonmail.com>
Co-authored-by: Francesca Lovebloom <francesca@brainiumstudios.com>
Following the changes in [1] this bumps ndk and ndk-glue to 0.3 and uses
the new constants. The minor version has been bumped to prevent
applications from running an older winit (without #1826) with a newer
ndk/ndk-glue that does not pass this `ident` through the `data` pointer
anymore.
[1]: https://github.com/rust-windowing/android-ndk-rs/pull/112
This commit forwards "unknown" Wayland mouse buttons downstream via
'MouseButton::Other'. Possible values for those could be found in
<linux/input-event-codes.h>.
Also, since Wayland just forwards buttons from the kernel, which are
'u16', we must adjust 'MouseButton::Other' to take 'u16' instead of
'u8'.
* 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.
* Impl. mouse capturing for web-sys with PointerEvent
* Impl. mouse capturing for web-sys with MouseEvent by manual tracking
* Reorganize web-sys backend mouse and pointer handling code
* Impl. mouse capturing for stdweb with PointerEvent
* Add mouse capturing for web target to changelog
x11-dl was using std::mem::uninitialized incorrectly and when
rustlang added MaybeUninit and intrinsic panics on UB caused
by improper use of uninitialized (see rust-lang/rust/pull/69922)
it caused issues with X11 initialization. x11-dl pr
erlepereira/x11-rs/pull/101 updated x11-dl to use MaybeUninit
correctly
There are two PRs I'm aware of that should be relatively trivial to get
merged, which would fix some issues. Other than those, I don't think it
makes sense to wait on anything.
- Fix Windows crash: https://github.com/rust-windowing/winit/pull/1459
- Fix macOS mouse reports: https://github.com/rust-windowing/winit/pull/1490
While #1459 seems pretty essential to actually make winit run, #1490 is
much less important and can probably be ignored if there aren't any
resources to merge it.
* Fix bug causing RedrawRequested events to only get emitted every other iteration of the event loop.
* Initialize simple_logger in examples.
This PR's primary bug was discovered because a friend of mine reported
that winit was emitting concerning log messages, which I'd never seen
since none of the examples print out the log messages. This addresses
that, to hopefully reduce the chance of bugs going unnoticed in the
future.
* Add changelog entry
* Format
* fix: use a 'static lifetime for the web backend's `Event` types
* implement hidpi for stdweb (web-sys wip?)
* fix: make all canvas resizes go through backend::set_canvas_size
* update Window docs for web, make `inner/outer_position` return the position in the viewport
* WIP - Make EL2 DPI changes and implement on Windows (#895)
* Modify DPI API publicly and on Windows
* Add generic Position and make dpi creation functions const
* Make examples work
* Fix fullscreen windows not appearing
* Replace Logical coordinates in window events with Physical coordinates
* Update HiDpiFactorChanged
* Document to_static
* fix app_state errors
* fixes hidpi related errors in window_delegate
* fix bad merge
* dpi_factor edits in window_delegate
* fixes type and lifetime errors in window and window_delegate
* applies fmt
* complies with @aleksijuvani requested changes
* modifies Handler lifetimes
* fixes lifetime isues, adds propper handling for HiDpiChanged
* applies fmt
* restore original lifetimes
* solution is somewhere out there
* applies fmt
* pass as references
* resolves issue with HANDLER
* crate visible type error
* fixes visibility issues
* applies fmt
* deals with warnings
* simplifies new_inner_size setting algorthm
* moves proxy instead of referencing it and removes double deref from proxy.ns_window
* makes @Osspial tests (https://github.com/rust-windowing/winit/pull/997\#discussion_r301852354) pass
* complies with @aleksijuvani suggested changes
* makes max window size std::f32::MAX
Changes from rebasing:
* fixes compile errors
* applies fmt
* reimplements HiDpiFactorChanged after #1173 merge
* uses EventWrappers
* Fix compile errors
* Use `mio` for the X11 event loop
* Removes `calloop` from the X11 event loop, as the method of draining a
source using a closure provided to the `calloop::EventLoop` instance
conflicts with the need to deliver events directly to the callback
provided to `EventLoop::run`, in order to respond to the value provided by
`WindowEvent::HiDpiFactorChanged`.
* Implement interactive `HiDpiFactorChanged` event for X11
* Implement interactive `HiDpiFactorChanged` event for Wayland
* Run cargo fmt
* Fix Wayland not processing events from EventQueue
* Backport #981