Commit graph

243 commits

Author SHA1 Message Date
Antonio Scandurra
be73dd852d Move Arena to a thread-local and use it to allocate AnyElement 2023-12-15 16:18:05 +01:00
Antonio Scandurra
e1ca8e81bb Use an Arena to reuse allocations for listeners 2023-12-15 15:13:32 +01:00
Julia
de523c2d80 Give correct focus handle when project search has no matches 2023-12-14 23:49:44 -05:00
Julia
4be84f3db0 Merge branch 'main' into focus-handlers-on-draw 2023-12-14 23:08:23 -05:00
Nathan Sobo
02606d1fb9 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 16:56:36 -07:00
Julia
bbbdb9ff3e Render panel in this test to make sure it can receive focus 2023-12-14 17:11:00 -05:00
Mikayla
8791f7cefc Enable dragging from project panel to panes
Rework gpui2 drag API so that receivers need not specify the dragged view type.

co-authored-by: Max <max@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:20:48 -08:00
Nathan Sobo
fb3382bcc5 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 14:16:59 -07:00
Nathan Sobo
0dd6c50a20 Use FxHashMap for element state 2023-12-14 14:06:19 -07:00
Nathan Sobo
3d1dae9a06 Make z_indices bigger in StackingOrder 2023-12-14 11:37:48 -07:00
Nathan Sobo
0d30b698a4 Don't allocate interactive bounds 2023-12-14 11:28:52 -07:00
Nathan Sobo
1ae25f52a1 WIP 2023-12-14 10:31:45 -07:00
Nathan Sobo
6f17cf7337 WIP 2023-12-14 09:25:14 -07:00
Julia
cd08d349a5 Quick and dirty attempt to immediately apply focus change in tests
Doesn't quite work yet
2023-12-13 21:48:05 -05:00
Mikayla
53b1948c44
Remove inconsistency with how GPUI used to handle these events 2023-12-13 18:32:42 -08:00
Mikayla
0dd84924e4
add cmd-click-to-jump-to-element 2023-12-13 18:19:25 -08:00
Nathan Sobo
c863227dc2 Log frame timings 2023-12-13 18:44:21 -07:00
Nathan Sobo
1e4a7e6ef1 Don't notify when drawing 2023-12-13 16:05:34 -07:00
Max Brunsfeld
26a31b41b9 frame time 2023-12-13 14:22:34 -07:00
Mikayla
bfbbec0b01
Add fluent quad API 2023-12-13 13:21:48 -08:00
Julia
cfc050e3fe Fire focus handlers on draw to avoid timing with newly created item
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-13 12:16:39 -05:00
Antonio Scandurra
5018072203 Automatically transfer focus on mouse down in Interactivity::paint 2023-12-13 09:57:18 +01:00
Antonio Scandurra
c0846d6f74
Set cursor style only if we're the active window (#3607)
Release Notes:

- N/A
2023-12-12 16:56:32 +01:00
Antonio Scandurra
b87c45e6f5 Set cursor style only if we're the active window 2023-12-12 16:32:45 +01:00
Kirill Bulatov
ca8e8d1065 Finish removing all dangerous focus APIs 2023-12-12 16:11:14 +02:00
Kirill Bulatov
2cde1a2e15 Re-focus window on workspace on corresponding window blur
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 15:36:20 +02:00
Kirill Bulatov
717b2885f8 Attempt to remove the dangeous element focus API 2023-12-12 15:07:27 +02:00
Antonio Scandurra
43b8d65fee Transfer focus to the workspace when window focus is lost 2023-12-12 15:07:27 +02:00
Max Brunsfeld
6f5b1064ee Fix detection of topmost region under the dragged item
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-12-11 16:50:44 -08:00
Conrad Irwin
149e90c3d9
vim2 (#3597)
- MOAR TESTS

[[PR Description]]

Release Notes:

- N/A
2023-12-11 16:42:03 -07:00
Conrad Irwin
d12eb0581a
vim2 (#3594)
- First round of vim tests

Add `observe_keystrokes` back to gpui2
Allow multiple actions to match a given key event

[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2023-12-11 15:06:51 -07:00
Conrad Irwin
1e89092d62 MOAR TESTS 2023-12-11 15:06:33 -07:00
Mikayla Maki
927d18b0f3
Add support for resizing splits and docks, as well as utilities (#3595)
Making this PR to upstream changes to util and GPUI2, resizing exists
but isn't working yet.

Release Notes:

- N/A
2023-12-11 13:32:06 -08:00
Conrad Irwin
d1805d8ada First round of vim tests 2023-12-11 14:16:25 -07:00
Max Brunsfeld
fbfe108317 Avoid double borrow in tests by drawing windows explicitly in flush_effects
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-11 12:37:10 -08:00
Antonio Scandurra
9b94f1483a Redraw the window at the end of flush_effects in tests
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-11 20:10:27 +01:00
Antonio Scandurra
f1ebad22db Defer drawing the scene until macOS's display_layer callback
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-11 19:55:55 +01:00
Mikayla
fd34d1da31
Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Max Brunsfeld
282e4398a0 In titlebar, render followers and allow following people 2023-12-07 13:09:18 -08:00
Kirill Bulatov
6c653b9c05 Activate Zed window on external file drop 2023-12-07 16:08:47 +02:00
Kirill Bulatov
b692b4c9c2 Do not expand terminal selections on active drag 2023-12-07 16:08:47 +02:00
Kirill Bulatov
f829120f51 Convert OS file drag and drop enter event into a mouse move, not mouse click 2023-12-07 16:08:47 +02:00
Antonio Scandurra
a40515dbb3 Rework frame rendering
This commit replaces the old `previous_frame` and `current_frame` with
a new pair of `rendered_frame` and `next_frame` that are swapped once
we are ready to draw a finished frame.

This makes it clearer when to use which: `rendered_frame` should be used
to query the existing state, whereas `next_frame` should be used and mutated when
redrawing a dirty window.

The change was prompted by a bug I encountered in `FocusHandle::contains`. The
implementation was reading `current_frame`, but that was the wrong field to
access if e.g. we were reading it inside of a `render` function or any other
time while drawing the window.
2023-12-07 12:10:49 +01:00
Mikayla
22cd62213b
Tear out drag event listener 2023-12-06 16:22:25 -08:00
Mikayla
c092cfbfb3
Fix bug with IME
Adjust how IME works in the terminal

co-authored-by: nathan <nathan@zed.dev>
2023-12-06 15:54:08 -08:00
Mikayla
fd31e429f5
Merge branch 'main' into terminal-element 2023-12-06 15:20:04 -08:00
Nathan Sobo
d7473ad6e7
Document geometry module and replace zero method with default (#3515)
Nothing earth-shattering here, but all our geometry types are now fully
documented.

Release Notes:

- N/A
2023-12-06 12:52:41 -07:00
Nathan Sobo
ac07e230fa Document geometry 2023-12-06 12:28:44 -07:00
Antonio Scandurra
2aee3e3192 Make Node::context optional as well
This was an oversight in d09dfe0.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 18:02:45 +01:00
Piotr Osiewicz
6549a9a091 Let WindowContext::dispatch_action handle global actions
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-06 16:52:52 +01:00