zed/crates/gpui
Antonio Scandurra 74aa9c1320 Capture mouse events when rendering disconnected overlay
We do so by replacing `EventHandler::capture` with a new `::capture_all` method.
After switching to mouse regions as part of zed-industries/zed#1081, overriding
`dispatch_event` on `EventHandler` wasn't enough anymore because mouse interactions
take place on a privileged code path that runs *before* dispatching any event.

With this change, `EventHandler` will now push a mouse region that intercepts all
mouse interactions, as well as pushing a cursor region that resets the cursor style
to `Arrow`.

One interesting change as part of this is that we've removed the ability to see which
event we are capturing: we were not using this capability anyway and `capture_all` provides
a simpler interface, so I went with that. In the future, we can opt into capturing specific
events or mouse interactions if there's a code path that needs that.
2022-06-04 10:41:29 +02:00
..
examples Pass visible bounds to Element::dispatch_event 2022-04-07 15:10:09 +02:00
grammars/context-predicate Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
src Capture mouse events when rendering disconnected overlay 2022-06-04 10:41:29 +02:00
build.rs Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
Cargo.toml Upgrade deps to avoid multiple versions of transitive deps 2022-06-02 17:38:33 -07:00