daxpedda
5289b4f206
On Web, fix context menu not being disabled
2023-12-24 23:55:50 +04:00
Diggory Hardy
6b445219c1
Revise Key and KeyCode enums
...
Split `Key` into clear categories, like `Named`, `Dead`, Character`, `Unidentified`
removing the `#[non_exhaustive]` from the `Key` itself.
Similar action was done for the `KeyCode`.
Fixes : #2995
Co-authored-by: Kirill Chibisov <contact@kchibisov.com >
2023-10-21 11:40:41 +04:00
Kirill Chibisov
d06deeecf6
Make WindowBuilder Send + Sync
...
Window builder is always accessed by winit on the thread event loop
is on, thus it's safe to mark the data it gets as `Send + Sync`.
Each unsafe object is marked individually as `Send + Sync` instead
of just implementing `Send` and `Sync` for the whole builder.
2023-10-21 11:40:41 +04:00
daxpedda
70e6ddd210
Web Async Rework ( #3082 )
2023-10-21 11:40:41 +04:00
daxpedda
8339ddf368
Web: fix ControlFlow::WaitUntil to never wake up **before** the given time ( #3133 )
2023-10-21 11:40:41 +04:00
daxpedda
570f3101e5
Web: remove unnecessary usage of once_cell::unsync::Lazy ( #3134 )
2023-10-21 11:40:41 +04:00
daxpedda
c744b9aea5
Rename PollType to PollStrategy ( #3089 )
2023-10-21 11:40:41 +04:00
daxpedda
dda8053bd3
Add Window.requestIdleCallback() support ( #3084 )
2023-10-21 11:40:41 +04:00
daxpedda
84d9bfd59e
Remove T from EventLoopTargetWindow ( #3081 )
...
Co-authored-by: nerditation <12248559+nerditation@users.noreply.github.com >
2023-10-21 11:40:41 +04:00
daxpedda
4b30f9ce22
Web: Fullscreen Overhaul ( #3063 )
2023-10-21 11:40:41 +04:00
daxpedda
2428224c09
Enable event propagation ( #3062 )
2023-10-21 11:40:41 +04:00
daxpedda
a24d092fa1
Use setTimeout() trick instead of Window.requestIdleCallback() ( #3044 )
2023-10-21 11:40:41 +04:00
Mads Marquart
4e6ce00ec5
Improve macOS/iOS/Web thread safety
...
Co-authored-by: daxpedda <daxpedda@gmail.com >
2023-08-15 13:10:02 +04:00
dAxpeDDa
794d0c1f73
On Web, use requestAnimationFrame for RedrawRequested
2023-08-15 13:10:02 +04:00
Kirill Chibisov
281077a0d8
Remove lifetime from the Event
...
Lifetimes don't work nicely when dealing with multithreaded environments
in the current design of the existing winit's event handling model, so
remove it in favor of `InnerSizeWriter` fences passed to client, so they
could try to update the size.
Fixes #1387 .
2023-08-15 13:10:02 +04:00
daxpedda
692f15c49f
On Web, add WindowBuilderExtWebSys::with_append() ( #2953 )
2023-08-15 13:10:02 +04:00
daxpedda
78b5f2feb8
On Web, remove Window::is_dark_mode() ( #2951 )
2023-08-15 13:10:02 +04:00
daxpedda
79385ecd1f
On Web, implement and fix missing methods on Window(Builder) ( #2949 )
2023-08-15 13:10:02 +04:00
daxpedda
8d18043a3c
Add Fullscreen API compatibility for Safari ( #2948 )
2023-08-15 13:10:02 +04:00
daxpedda
297c3f80eb
On Web, cache commonly used values ( #2947 )
2023-08-15 13:10:02 +04:00
daxpedda
1d80005b91
Increase accuracy of various Web APIs ( #2946 )
2023-08-15 13:10:02 +04:00
daxpedda
b9d89e97ed
Fix touch location accuracy ( #2944 )
2023-08-15 13:10:02 +04:00
daxpedda
5fa4b8f003
On Web, implement WindowEvent::Occluded ( #2940 )
2023-08-15 13:10:02 +04:00
daxpedda
08fe32eac3
Don't unnecessarily clone canvas on Web ( #2934 )
2023-08-15 13:10:02 +04:00
Fredrik Fornwall
924f3323b5
On Web, map bfcache load/unload to suspend/resume
2023-06-28 15:38:49 +02:00
Josh Groves
864a1d5924
Fix some typos ( #2901 )
2023-06-23 10:10:36 +03:00
bbb651
4748890935
Add MouseButton::{Back, Forward} to MouseInput
...
Add named variants for physical back and forward keys which could
be found on some mice. The macOS bits may not work on all the
hardware given that apple doesn't directly support such a thing.
Co-authored-by: daxpedda <daxpedda@gmail.com >
2023-06-16 08:51:09 +00:00
daxpedda
6300cf915e
On Web, implement DeviceEvents ( #2871 )
2023-06-14 10:26:26 +02:00
daxpedda
9a9c9b15ba
Implement ResizeObserver ( #2859 )
...
Co-authored-by: Liam Murphy <43807659+Liamolucko@users.noreply.github.com >
2023-06-14 09:43:53 +02:00
dAxpeDDa
7ce86c3d2a
Use Window.requestIdleCallback()
2023-06-14 00:03:23 +02:00
daxpedda
f0d88c52a3
Fix pointer deltas on Firefox and send coalesced events together ( #2878 )
2023-06-13 15:49:27 +02:00
dAxpeDDa
a7a8ff0bbb
Drop pointerrawupdate support
2023-06-13 10:23:48 +02:00
dAxpeDDa
fc046add78
Resume propagation of events
2023-06-12 00:48:14 +02:00
dAxpeDDa
ab4a4a89e6
Remove unused EventListenerOptions
2023-06-11 19:44:52 +02:00
dAxpeDDa
f7a400ddf6
Improve media queries take 2
2023-06-09 20:38:54 +02:00
dAxpeDDa
b5785ba785
Revert "Fix Window::set_inner_size()"
...
This reverts commit e220a75556 .
2023-06-08 09:09:46 +02:00
dAxpeDDa
e220a75556
Fix Window::set_inner_size()
2023-06-07 14:53:59 +02:00
dAxpeDDa
ab46aa5b79
Replace beforeunload with pagehide
2023-06-05 16:40:53 +02:00
dAxpeDDa
12fb37d827
Make media queries more robust
2023-06-05 16:11:22 +02:00
dAxpeDDa
c88a4ab221
Use correct canvas size for scale factor change
2023-06-05 15:39:17 +02:00
daxpedda
8f7f3efc0d
On Web, implement Send and Sync where appropriate ( #2834 )
2023-06-05 02:44:54 +02:00
dAxpeDDa
3f4f580181
Add pointerrawupdate support
2023-06-05 02:04:37 +02:00
dAxpeDDa
d3aeff8838
Remove unnecessary preventDefault() calls
2023-06-05 02:04:37 +02:00
dAxpeDDa
b4b2389d0a
Split modifier handling in all pointer events
2023-06-05 02:04:37 +02:00
dAxpeDDa
964e342f69
Prevent text selection
2023-06-05 02:04:37 +02:00
dAxpeDDa
a134a59917
Remove MouseEvent fallback support
2023-06-05 02:04:37 +02:00
dAxpeDDa
61bd8b8254
Send position on button release
2023-06-05 02:04:37 +02:00
dAxpeDDa
587fa67571
Split cursor move handlers
2023-06-05 02:04:37 +02:00
dAxpeDDa
82d0380ea6
Ignore pen input on Web
2023-06-04 00:23:47 +02:00
dAxpeDDa
4f3eacf01e
On Web, handle coalesced events
2023-06-02 18:48:34 +02:00