Commit graph

3675 commits

Author SHA1 Message Date
Ashley Wulber
6c9a2d4e9b
fix: if the new configure matches, don't overwrite state with None 2026-01-28 11:46:14 -05:00
Ashley Wulber
ec30b8004f
fix: window state events 2026-01-28 11:44:28 -05:00
Ashley Wulber
43f4760b0e
fix: scaling 2026-01-13 13:55:24 -05:00
Ashley Wulber
66dc0eab25
feat: SuggestedBounds event 2026-01-13 13:54:55 -05:00
Ashley Wulber
b961e4877d
feat: xdg surface handle 2026-01-13 13:52:05 -05:00
Kirill Chibisov
f98ccf8efc Winit version 0.31.0-beta.2 2025-11-16 17:23:28 +09:00
Kirill Chibisov
b961e8e941 winit-core: fix set_ime_allowed always panicing 2025-11-16 17:23:28 +09:00
Mads Marquart
4c5bf0ee08 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 17:23:28 +09:00
Mads Marquart
f69b601abb winit-web: return immediately from run_app on web
This avoids using JavaScript exceptions to support `EventLoop::run_app`
on the web, which is a huge hack, and doesn't work with the Exception
Handling Proposal for WebAssembly:
https://github.com/WebAssembly/exception-handling

This needs the application handler passed to `run_app` to be `'static`,
but that works better on iOS too anyhow (since you can't accidentally
forget to pass in state that then wouldn't be dropped when terminating).
2025-11-16 17:23:28 +09:00
Kirill Chibisov
e8bccfff4f Winit version 0.31.0-beta.1 2025-11-16 13:32:44 +09:00
Kirill Chibisov
0a59e4b905
chore: fix clippy on X11 2025-11-16 13:07:23 +09:00
ShikiSuen
d837c88855
winit-appkit: fix tests on systems without MonitorId(1)
Use `CGMainDisplayID` instead of `1` to make tests pass on systems
without `MonitorId(1)`.
2025-11-06 14:46:28 +09:00
Dan Harris
82eab465e0
macOS: fix a crash when dragging non-file content onto window
Winit only supports text, thus we should ignore the rest
instead of crashing.
2025-11-05 13:20:01 +09:00
Diggory Hardy
a9c189a423
winit-win32: prevent inner size reported as (0,0) when minimized 2025-11-01 23:39:57 +09:00
Diggory Hardy
9d9d21cfdb winit-core: revise MouseButton type
Unify the values of `MouseButton` and thus remove `Other` variant in
limit possible buttons to 32, which was picked based on platform
capabilities, where 32 is the highest.

For the reference, SDL has identical limit.
2025-11-01 21:00:39 +09:00
Kirill Chibisov
779f52a21f chore: latest typos 2025-11-01 21:00:39 +09:00
mfluehr
7a21858d29
windows: don't confine hidden cursor 2025-11-01 13:03:11 +09:00
Kirill Chibisov
a3f7e6566a
ci: fix eslint version to 9.38.0
9.39.0 has an issue with unified-signatures.

Links: https://github.com/eslint/eslint/issues/20272
2025-11-01 12:52:30 +09:00
DorotaC
f41897cfa4
examples/ime: fix crash on wayland
When pressing Ctrl+Space, KeyEvent::text_with_all_modifiers would return
\0. That would get included in the text-input text. When an input method
gets activated, the invalid string returning \0 would get sent as
surrounding text, resulting in a Wayland protocol error and crashing the
application.
2025-10-29 13:40:30 +09:00
Timon
bd6fef1d80
wayland: add prefer_csd attribute 2025-10-24 21:35:51 +09:00
Kirill Chibisov
42d256e926
ci: fix version of smol_str 2025-10-24 21:01:20 +09:00
Pavel Strakhov
03dad26c43
x11: ignore mouse scroll button release events 2025-10-24 20:07:10 +09:00
Kirill Chibisov
1e7ab0cd25 wayland: handle wl_seat v10 repeated state
Fixes #4382.
2025-10-20 00:01:36 +09:00
Kirill Chibisov
c333003514 Bump MSRV to 1.85 and edition to 2024 2025-10-20 00:01:36 +09:00
Arthur Cosentino
10f21090ce
x11: fix deadlock in request_ime_update 2025-10-09 16:57:20 +09:00
Timon
5575f51483
wayland: add wayland-csd-adwaita-notitlebar feature
Addition to already present `notitle` feature.
2025-10-08 12:11:55 +09:00
Ian Douglas Scott
2ede84ab2f
wayland: handle axis_value120 scroll events
This can be tested with the `application` example, looking at the events
shown for mouse wheel movement.

`wl_pointer::axis_discrete` isn't sent in version 8 or higher of
`wl_pointer`. And `sctk` doesn't convert the `value120` events, so
on compositors advertising version 8, only pixel scroll events were
being sent.

This sends `MouseScrollDelta::LineDelta` with a fractional value,
without doing any accumulation. Given `LineDelta` contains `f32` values,
this presumably is expected?

Though it might be good to change the definition of `MouseScrollDelta`
to include both discrete and pixel values, when the compositor sends
both. I'm not familiar with how this works on non-Wayland backends
though.
2025-10-08 11:53:57 +09:00
Kirill Chibisov
f046e778aa
winit-core:winit: add tablet input support
The API is integrated into the `WindowEvent::Pointer*` API and is
present in form of `TabletTool` variant on corresponding data entries.

For now implemented for Web, Windows, and with limitations for Wayland.

Fixes #99.

Co-authored-by: daxpedda <daxpedda@gmail.com>
2025-10-07 21:42:36 +09:00
sachharine
ffcdf80192
chore: fix typos causing dead links 2025-10-07 19:25:41 +09:00
Mads Marquart
b811e9d878 chore: update to objc2 frameworks v0.3.2 2025-10-07 17:56:05 +09:00
Kirill Chibisov
d815bc089c chore: fix nightly clippy 2025-10-07 17:56:05 +09:00
Kirill Chibisov
66283a79bd
wayland: reduce amount of empty preedits
If we send empty preedit before, don't send it again.
2025-09-13 06:53:29 +09:00
Alan Everett
3be30affe4
wayland: support for pinch, rotation, and pan gestures
Co-Authored-By: linkmauve <linkmauve@linkmauve.fr>
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
2025-09-07 11:45:35 +09:00
Kirill Chibisov
a68f1a664b
winit-wayland: bump sctk and sctk-adwaita 2025-09-06 22:25:24 +09:00
DorotaC
6de5041a94
winit-core/ime: add more purposes and content hints
Also move IME example into `ime.rs` thus making IME integrations more
easily comprehendible.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
2025-09-06 13:27:55 +09:00
Mads Marquart
014fb68a26
Fix using Rust-Analyzer on non-macOS platforms (#4347) 2025-09-05 22:32:20 +02:00
Mads Marquart
9a03dacbde
linux: align scancode conversions with Chromium 2025-09-05 10:17:34 +09:00
Jeremy Soller
4d9302b33c
Add borderless fullscreen mode for orbital (#4343) 2025-09-04 22:14:41 +02:00
moooozi
488c036a05
win32: disable DPI re-adjustments on Windows 11
For earlier Windows 10 builds (pre-22000), a workaround was necessary
to fix dragging window onto a monitor with different DPI. This commit makes
the old DPI workaround  to only apply conditionally on affected Windows versions.

Fixes #4041.
2025-08-24 12:57:31 +09:00
Tony
a4af50ec13
win32: refresh title bar on Window::set_theme 2025-08-23 21:55:54 +09:00
Tony
317d62fb93
win32: account for mouse wheel speed setting
Also adds a method to toggle this behavior during runtime.
2025-08-23 21:38:56 +09:00
dependabot[bot]
b13b39aa0b
chore: bump ci deps versions 2025-08-23 21:19:46 +09:00
Sanjay
abea6e64e4
macOS: default menu uses bundle name
Use the bundle name in the default menu or fall back
to using the process name as before.
2025-08-23 20:35:45 +09:00
Jeremiah S
d6f7a28499
macOS: fix crash due during window drop
On macOS 26+ the window drop was leading to unwrap, since
events were coming after the window was already destroyed,
while it sounds rather strange, guard against such things just
in case.

Fixes #4333.
2025-08-15 09:52:23 +09:00
Kirill Chibisov
bd98561b38
chore: fix typos from recent typos-cli (#4329) 2025-08-12 16:30:34 +09:00
John Nunley
ca6f523924
m: remove self from CODEOWNERS
This is making official what's basically been the
case for the past few months at this point. I no
longer have the capacity to effectively review
and merge PRs for the Windows and X11 backends.

Thanks again for having me.

Signed-off-by: John Nunley <dev@notgull.net>
2025-08-04 02:50:06 +09:00
DorotaC
d7fdfb1bca
winit-core: add Ime::DeleteSurroundingText API
This completes the basic API required for e.g. Wayland.
2025-08-02 19:17:27 +09:00
Kirill Chibisov
120f21a010
Bump version on master
This commit does not represent a release and only synchronizes CHANGELOG
from the latest release.
2025-07-27 22:13:06 +09:00
Robert Wallis
5904529ba1
macOS: fix runtime crash on macos26 "type code 'q', but found 'Q'"
Fixes #4299.
2025-07-20 17:04:04 +09:00
DorotaC
e7a6034b55
winit-core: add surrounding_text for IME
Allow communicating surrounding text to IME to better handle user input
and account for content around for preedit.
2025-07-13 14:57:10 +09:00