Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge winit 0.22.2 #1

Open
wants to merge 59 commits into
base: wasm
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
28023d9
upgrades x11-dl to 2.18.5 to fix #376 (#1517)
Mar 26, 2020
0bc58f6
Fix warnings (#1530)
murarth Apr 10, 2020
a8e777a
Fix a possible double-borrow during event handling (#1512)
ryanisaacg Apr 11, 2020
1f24a09
Implement `requestAnimationFrame` for web (#1519)
chemicstry Apr 11, 2020
d560972
Bump version to 0.22.1 (#1537)
ryanisaacg Apr 17, 2020
4c4d091
control_flow example: fix wait_cancelled logic again (#1511)
filnet Apr 19, 2020
6dae994
Mention raw-window-handle in library docs (#1528)
Ralith Apr 19, 2020
78a62ec
Added more docs.rs targets (#1521)
simlay Apr 19, 2020
aabe42d
Preserve with_maximized on windows (#1515)
yanchith Apr 19, 2020
849b8f5
Clarify when RedrawRequested is useful (#1529)
Ralith Apr 19, 2020
47ff8d6
Document that platforms will display garbage data in the window by de…
Osspial Apr 20, 2020
54bc41f
Implement `Drop` for `Proxy` on macOS platform (#1526)
hecrj Apr 20, 2020
114fe9d
wayland: rework scale factor handling (#1538)
Matthias-Fauconneau Apr 22, 2020
26775fa
Report mouse motion before click (#1490)
chrisduerr Apr 26, 2020
9975ced
update macos libs
j4qfrost Apr 27, 2020
36ab890
modify dependency
j4qfrost May 2, 2020
f3b4992
changelog
j4qfrost May 2, 2020
b4c6cdf
Fix several crashes on Windows by heavily simplifying the event loop …
Osspial May 4, 2020
007b195
iOS: convert touch positions to physical (#1551)
francesca64 May 4, 2020
b882810
add android NDK event loop (#1556)
JasperDeSutter May 6, 2020
8f230f4
update core-video-sys version
j4qfrost May 6, 2020
3c38afd
Update macOS dependencies (#1554)
j4qfrost May 8, 2020
aeb4866
Merge remote-tracking branch 'upstream/master'
j4qfrost May 8, 2020
501341d
move changelog line
j4qfrost May 8, 2020
c7a33f9
Fixed a couple of typos in repo description (#1568)
May 15, 2020
bc19c04
Fixed changelog line for core-* dependencies (#1561)
j4qfrost May 15, 2020
878c179
Implement Clone for 'static events (#1478)
semtexzv May 15, 2020
49bcec1
Release 0.22.2 (#1570)
Osspial May 16, 2020
6cfddfe
Prevent the default browser behavior of events (#1576)
ryanisaacg May 21, 2020
ff66bdd
On Wayland, fix deadlock when calling set_inner_size from event loop
kchibisov May 22, 2020
03335ce
macOS: add function to hide other applications
freamon May 24, 2020
a4121a2
platform_impl/linux/x11: fix deadlock in fn set_fullscreen_inner (#1579)
May 27, 2020
5a6cfc3
Macos fullscreen & dialog support with `run_return` (#1581)
VZout Jun 9, 2020
c1ea0dd
On Unix, add option to pick backends
ogoffart Jun 15, 2020
4b1b314
Test x11 and wayland features on CI
murarth Jun 15, 2020
bf62103
Android run return (#1604)
VZout Jun 17, 2020
2191e9e
macOS: Support click-dragging out of a window (#1607)
ozkriff Jun 20, 2020
b1e22aa
Make drag and drop optional (fixes OleInitialize failure #1255) (#1524)
chemicstry Jun 28, 2020
dd866a7
On Windows, fix bug where we'd try to emit `MainEventsCleared` events…
Osspial Jul 2, 2020
3d5d05e
Move available_monitors and primary_monitor to EventLoopWindowTarget …
AdminXVII Jul 4, 2020
6919c2f
Fix misspellings in comments (#1618)
kraai Jul 9, 2020
55dff53
Fix Window platform support documentation
chrisduerr Jul 26, 2020
40232d4
Use `PhysicalPosition` in `PixelDelta` event
chrisduerr Jul 26, 2020
7a49c88
Fix with_fullscreen signature
chrisduerr Aug 1, 2020
05fdcb5
Web: Use mouse events instead of pointer events if the latter isn't s…
hayashi-stl Aug 5, 2020
6810010
android: fix event loop polling (#1638)
msiglreith Aug 12, 2020
514ab04
[macos] add NSWindow.hasShadow support (#1637)
TakWolf Aug 13, 2020
412bd94
Renamed NSString to NSStringRust to support Debug View Heirarchy in X…
simlay Aug 14, 2020
9c72cc2
Fix HiDPI vs. set_cursor_icon for web (#1652)
michaelkirk Aug 17, 2020
89d4c06
Fix crash on NetBSD
chrisduerr Aug 20, 2020
6ba583d
Fix vertical scroll being inverted on web targets (#1665)
alvinhochun Aug 21, 2020
0f7c82d
Send CursorMove before mouse press event and note that touch is unimp…
alvinhochun Aug 22, 2020
bea6093
Use send_events instead of send_event in web backend (#1681)
alvinhochun Aug 26, 2020
02a34a1
Impl. mouse capturing on web target (#1672)
alvinhochun Aug 29, 2020
a2db4c0
Unify Minus/Subtract virtual keycodes
chrisduerr Aug 29, 2020
658a9a4
Handle scale factor change on web-sys backend (#1690)
alvinhochun Aug 30, 2020
4a1939c
Merge branch 'wasm' of github.com:amethyst/winit into wasm
j4qfrost Sep 4, 2020
a764327
Merge branch 'master' into wasm
j4qfrost Sep 4, 2020
c142719
housekeeping
j4qfrost Sep 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Impl. mouse capturing on web target (rust-windowing#1672)
* 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
alvinhochun authored Aug 29, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 02a34a167ab281d7cca9908f67928b659d428b39
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
- On Android, fix `ControlFlow::Poll` not polling the Android event queue.
- On macOS, add `NSWindow.hasShadow` support.
- On Web, fix vertical mouse wheel scrolling being inverted.
- On Web, implement mouse capturing for click-dragging out of the canvas.
- **Breaking:** On Web, `set_cursor_position` and `set_cursor_grab` will now always return an error.
- **Breaking:** `PixelDelta` scroll events now return a `PhysicalPosition`.
- On NetBSD, fixed crash due to incorrect detection of the main thread.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -97,6 +97,7 @@ version = "0.3.22"
optional = true
features = [
'console',
"AddEventListenerOptions",
'CssStyleDeclaration',
'BeforeUnloadEvent',
'Document',
4 changes: 4 additions & 0 deletions src/platform_impl/web/stdweb/canvas.rs
Original file line number Diff line number Diff line change
@@ -202,13 +202,17 @@ impl Canvas {
where
F: 'static + FnMut(i32, PhysicalPosition<f64>, MouseButton, ModifiersState),
{
let canvas = self.raw.clone();
self.on_mouse_press = Some(self.add_user_event(move |event: PointerDownEvent| {
handler(
event.pointer_id(),
event::mouse_position(&event).to_physical(super::scale_factor()),
event::mouse_button(&event),
event::mouse_modifiers(&event),
);
canvas
.set_pointer_capture(event.pointer_id())
.expect("Failed to set pointer capture");
}));
}

Loading