24 Commits

Author SHA1 Message Date
bjorn3
f5e20bd7da orbital: Merge TextInputEvent and KeyEvent together (#4663)
They were split at some point for whatever reason, yet should result in
a single application level event. The current hack of emitting an IME
event for TextInputEvent breaks with applications that don't handle IME
and it would cause applications that both handle physical key events and
IME events to get double key presses.

Co-authored-by: Jeremy Soller <jackpot51@gmail.com>
2026-08-08 14:16:03 -06:00
bjorn3
332224c92f orbital: Handle window closes during app drop 2026-08-08 12:48:35 -06:00
bjorn3
4e6525b4b7 orbital: Fix EventLoop::run_app_on_demand
Previously event_loop.exit() would persist and cause all future
run_app_on_demand() calls to immediately exit.
2026-08-07 14:48:23 -06:00
Kirill Chibisov
42366231b0 chore: implement EventLoopProvider in each winit-* crate 2026-08-04 01:30:40 +09:00
Olivier Goffart
ea5d7b68c0 Warn on exhaustive exported enums
Enable clippy::exhaustive_enums in every crate so new exported enums
are either #[non_exhaustive] or explicitly allowed as a closed set.
2026-07-29 12:23:49 +02:00
Olivier Goffart
37d8a503e4 Mark extensible enums in winit-core as #[non_exhaustive]
Event, input source, error, data transfer, native key, IME request,
scroll delta and fullscreen enums can now gain variants without a
breaking change. Backends and examples get wildcard arms where they
matched exhaustively; unknown IME requests are reported as
ImeRequestError::NotSupported and unknown fullscreen modes behave
like Fullscreen::Borderless(None).
2026-07-29 12:23:49 +02:00
Till Adam
6a8a334426 macOS: add WindowEvent::PointerButton::is_macos_activation_click
Apps need per-click decisions to follow the macOS convention of accepting
first mouse for low-risk actions (selection, scrolling) but rejecting it
for buttons and destructive actions. Motivated by slint-ui/slint#10451.

Always return `true` from `acceptsFirstMouse:`, and tag the resulting
`PointerButton` events with `is_macos_activation_click: true` (on both
the activating left press and its matching release) so the app can
short-circuit the whole gesture with a single check:

    WindowEvent::PointerButton { is_macos_activation_click: true, .. } => return,

Replaces an earlier callback-based design (`accepts_first_mouse` on
`ApplicationHandlerExtMacOS`) that mapped more closely to AppKit but
didn't fit winit's event-driven model and required re-entrancy handling.

Also removes `WindowAttributesMacOS::with_accepts_first_mouse`, which is
now redundant — apps that want to reject activation clicks check the
flag on the per-event instead.
2026-07-28 15:16:14 +02:00
Martin Marmsoler
9674d8ceef Wayland, Windows, MacOS: Popup Implementation (#4543)
Implement proper decorationless popups by specifying the type of the child window with with_type()

With this commit, different kind of child windows can be created

-  Popups: Special windows without any decoration which can be positioned relative to the parent
-  Window: Normal window with a parent or not

The type can be specified during creation of the Window using the window_attributes and the with_type() function. As default a normal Window is used. If Popup is choosen a parent must be specified, otherwise the Popup creation fails with an Error returned by the new() function.

Related issues: #403 and #4256
2026-07-27 15:43:51 +02:00
Wildan M
d84ec647d8 winit-orbital: Implement pump_app_events 2026-07-19 06:27:29 -06:00
Jeremy Soller
47dada25e4 winit-orbital: provide last mouse position with button events 2026-07-18 16:09:29 -06:00
Wildan M
6616906647 winit-orbital: Fix i586 build 2026-07-18 15:55:06 -06:00
bjorn3
5a0a4ec2a3 winit-orbital: Respect ORBITAL_DISPLAY 2026-07-18 15:19:03 -06:00
Ali
7a11ff8766 Add missing scancodes for orbital (#4515)
add missing keymaps
2026-03-17 03:29:27 +01:00
isan
5218e11e55 reafactor(orbital): Reimplement Orbital support using std::fs and redox_event (#4470)
Implemented Send and Sync for EventQueue
2026-02-03 16:23:40 +01:00
Anhad Singh
50f9b84f6b fix(winit-orbital): handle EINTR when reading from event_socket
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-12-18 18:42:54 +09:00
Mads Marquart
cc23fbf3be winit/event_loop: Add register_app and run_app_never_return
To allow users to explicitly choose the run semantics that they want.
2025-11-16 16:25:44 +09:00
Kirill Chibisov
c333003514 Bump MSRV to 1.85 and edition to 2024 2025-10-20 00:01:36 +09:00
Jeremy Soller
4d9302b33c Add borderless fullscreen mode for orbital (#4343) 2025-09-04 22:14:41 +02:00
DorotaC
08907148ec winit-core/window: add Window::request_ime_update
Allow updating IME state atomically to make it easier for platforms
where it's atomic by its nature, like Wayland. The old API is marked
as deprecated and is routed to the new atomic API.

Co-authored-by: dcz <gilapfco.dcz@porcupinefactory.org>
2025-06-28 13:14:20 +09:00
Jeremy Soller
50c0180af3 winit-orbital: update to new path format 2025-06-17 14:46:09 +09:00
Mads Marquart
e1bccb68d8 chore: use a shared version number for all winit-* crates 2025-06-08 09:22:58 +09:00
Kirill Chibisov
3a84da6951 Move winit itself to crate
That way we use top-level Cargo.toml only for the workspace management
purposes.
2025-06-07 13:07:12 +09:00
Mads Marquart
8ad016362a chore: move event loop recreation check into backends themselves 2025-05-26 13:48:52 +09:00
Mads Marquart
47b938dbe7 Split Orbital backend out into winit-orbital (#4243) 2025-05-21 13:12:55 +02:00