1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 14:22:37 +03:00
Commit Graph

1020 Commits

Author SHA1 Message Date
Timmy Xiao
25c123af75
Implement adding keymap 2024-02-03 14:55:31 -07:00
Timmy Xiao
136a043008
Implement enter + emit_focus -> need to impl keymap 2024-02-03 14:55:31 -07:00
Timmy Xiao
c66b1855fc
Implement pressing a key 2024-02-03 14:55:29 -07:00
Timmy Xiao
8382c370f1
Refactor windows to WaylandState 2024-02-03 14:54:46 -07:00
Timmy Xiao
2ed805af6b
Wayland refactor: Put handlers for windows in windows.rs, and separate WaylandState 2024-02-03 14:54:46 -07:00
Timmy Xiao
34bb2bb61d
Store OutputState, CompositorState, XdgShell in WaylandState instead of binding them during new_window 2024-02-03 14:54:46 -07:00
Timmy Xiao
57d9320000
Handle window close -> no more crashes 2024-02-03 14:54:46 -07:00
Timmy Xiao
62b2f32e20
Handle scale factor changes: do nothing 2024-02-03 14:54:45 -07:00
Timmy Xiao
ad55daebc3
Implement getting screens 2024-02-03 14:54:45 -07:00
Timmy Xiao
21136d2647
Fix delegate dispatch for SurfaceUserData
Without this change, the event dispatch would go on forever and cause a
stack overflow
2024-02-03 14:54:45 -07:00
Timmy Xiao
b01e32b606
Implement most of dispatch pending_event 2024-02-03 14:54:45 -07:00
Timmy Xiao
3496aff490
Need to look into window frames 2024-02-03 14:54:45 -07:00
Timmy Xiao
4ce398bc19
A window renders now 2024-02-03 14:54:45 -07:00
Timmy Xiao
9e14a4c929
Implement do_paint -> renders window and then panics at frame() 2024-02-03 14:54:45 -07:00
Timmy Xiao
92e83b1ac5
Handle panics after handling window configuration 2024-02-03 14:54:45 -07:00
Timmy Xiao
0348a584c7
Implement handling window configuration 2024-02-03 14:54:45 -07:00
Timmy Xiao
d429fe1a7d
Have user data associated with a surface 2024-02-03 14:54:44 -07:00
Timmy Xiao
877e5bdf27
I give up 😭, it's not worth my time 2024-02-03 14:54:44 -07:00
Timmy Xiao
4170f238bd
Save the window: no more segfault + wgpu works too 2024-02-03 14:54:44 -07:00
Timmy Xiao
0071064e79
Trying to debug why WSurface has no good object id 2024-02-03 14:54:44 -07:00
Timmy Xiao
c694176bef
Attempt on Implementing EGL for windows
- wgpu gives segfault so move to EGL
- implement terminating message loop to match prev implementation
- still gives error but no segfault or panic right now
2024-02-03 14:54:44 -07:00
Timmy Xiao
2ff3b665ab
Don't block ReadGuard after getting fd -> segfaulting webgpu 2024-02-03 14:54:44 -07:00
Timmy Xiao
2096bc5439
No more todos! but I don't see a window 2024-02-03 14:54:44 -07:00
Timmy Xiao
d63d8fdecd
WaylandWindowInner 2024-02-03 14:54:44 -07:00
Timmy Xiao
6911ed0943
Window progress: no WindowInner though 2024-02-03 14:54:44 -07:00
Timmy Xiao
d49a27d5a7
Implement the epoll stuff 2024-02-03 14:54:43 -07:00
Timmy Xiao
2705e66121
No termination 2024-02-03 14:54:43 -07:00
Timmy Xiao
a3eee407c7
Wow a message loop, but it does nothing... 2024-02-03 14:54:43 -07:00
Timmy Xiao
618d7beede
Compiles after nuking connection and window 2024-02-03 14:54:40 -07:00
Timmy Xiao
3308cb578b
Connections compile without complaining; time for window 2024-02-03 14:52:45 -07:00
Timmy Xiao
3eaba4e3d6
Nuke Wayland 2024-02-03 14:52:42 -07:00
Wez Furlong
8536d1313c
Revert "x11: scope the cyrillic ctrl-c workaround to cyrillic"
This reverts commit 15da2e64c2.

Let's back this out; I think I was too hasty and didn't fully
compare behavior with xterm prior to working on this.

refs: https://github.com/wez/wezterm/issues/4933
2024-02-02 10:59:40 -07:00
Wez Furlong
15da2e64c2
x11: scope the cyrillic ctrl-c workaround to cyrillic
The workaround was to allow ctrl-c to behave as expected for users
of cyrillic layouts, but it was scoped too broadly, as it impacted
eg: pressing ctrl-grave; in a spanish layout that is expected to
expand to º

This commit adjusts the scope of the workaround to only activate
when the original expansion is itself cyrillic.

I doubt this is the last we'll hear of this, but let's see
how it goes!

refs: https://github.com/wez/wezterm/issues/4933
2024-02-02 09:38:33 -07:00
Wez Furlong
b8d93edce6
xkeyboard: maybe workaround next_group weirdness
I'm not sure if this is the right way to go about this, but it doesn't
immediately break some simple tests with non-us layouts for me, so
I'm willing to push it and see what people say.

refs: https://github.com/wez/wezterm/issues/4910
2024-02-01 09:23:28 -07:00
Wez Furlong
eeea92a4d3
x11: improve keyboard trace diagnostics
add selected/fallback label and show how the xkb state overrides
are being applied
2024-02-01 09:23:28 -07:00
Jeffrey Knockel
178f35a496 wayland: consider base in resize increment calc
This corrects the calculation so that the # of terminal cells will not
change on a scale change.
2024-01-26 12:26:53 -07:00
Wez Furlong
d82283364a
x11/wayland: fixup altgr in eg: azerty layout
It's important not to clobber the layout number, and we need to
pass through more of the modifier bits from the X event, so we
just pass them all through wholesale.

refs: https://github.com/wez/wezterm/issues/4864
2024-01-26 06:51:50 -07:00
Wez Furlong
750b7ae849
x11: refactor selection logic in the spirit of DRY
This also will fulfil the promise in an error case which may help
things to be a bit more robust.

refs: https://github.com/wez/wezterm/issues/4402
2024-01-25 07:31:23 -07:00
Wez Furlong
2afa36d9b1
x11: more actively try to fallback to STRING for selection
If we get NONE back in response to our request for a utf8 selection,
repeat the request but for STRING.

refs: https://github.com/wez/wezterm/issues/4402
2024-01-25 07:21:51 -07:00
Jeffrey Knockel
642bfbb69a macos: set minimum increment size to 1x1 cells 2024-01-24 22:04:16 -07:00
Jeffrey Knockel
4546133d35 wayland: set minimum increment size to 1x1 cells 2024-01-24 22:04:16 -07:00
Jeffrey Knockel
b0193850be x11: set minimum increment size to 1x1 cells
Depending on the amount of padding, we could previously resize to get a
negative size displayed by the window manager's overlay (e.g., 80x-1 for
a very short window displaying zero terminal lines and only partially
showing the top of the tabs).  We would also like to avoid 80x0 or 0x24
dimensions as these can render funny.  For example, when there is a lot
of padding, an 80x0 size can still show part of the top of the first
line despite it being a cell height of zero.
2024-01-24 22:04:16 -07:00
Jeffrey Knockel
0462f318d7 Set base_width/height in set_resize_increments
On X11, this information is set as part of the hints given to the window
manager. When resizing the terminal, many X11 window managers will now
correctly report the current cell size of the terminal (e.g., 80x24) as
an overlay when resizing the window.
2024-01-24 22:04:16 -07:00
Jeffrey Knockel
f204f0f1a9 Refactor set_resize_increment() args into struct 2024-01-24 22:04:16 -07:00
Wez Furlong
46732d049a
x11: speculatively allow pasting latin-1 data
refs: https://github.com/wez/wezterm/issues/4402
2024-01-24 16:31:56 -07:00
fortuneteller2k
328b1f3b15 macos/clipboard: use try_quote instead of quote 2024-01-24 11:57:03 -07:00
Wez Furlong
223ba32de2
x11: fix handling of high-speed key events
test scenario is:

```
bash -c "sleep 5; for((i=0;i<30;i++)); do xdotool keydown --delay 0 Shift_L keydown --delay 0 9 keyup --delay 0 Shift_L keyup --delay 0 9; done"
```

That should cause a series of `(` characters to be emitted, but prior to
this commit is was usually mostly `9`'s.

What's changing here is:
* We copy the pertinent fields from the last xcb StateNotify event.
  That ostensibly has the current modifier and layout state, but
  because it comes from the X server, it doesn't factor in knowledge
  from the IME.
* When processing an XCB key event, compute the current modifier
  mask and override the XKB state with it.
* Now XKB will produce correct information about the key syms
* Restore the modifier state from the saved StateNotify information.

refs: https://github.com/wez/wezterm/pull/4151
refs: https://github.com/wez/wezterm/issues/4615
refs: https://github.com/fcitx/fcitx5/issues/893
refs: https://github.com/ibus/ibus/issues/2600
refs: https://github.com/wez/wezterm/issues/3840
2024-01-24 08:04:39 -07:00
Wez Furlong
079e87d62e
fixup issue with compose key
this partially reverts eb3a78b0cb and
should hopefully resolve the underlying problem, which is that
the composition cursor is stuck at an empty string when using
a compose key on its own.

refs: https://github.com/wez/wezterm/issues/4841
2024-01-24 06:58:07 -07:00
Wez Furlong
9bae5b4158
switch wholesale to my fork xcb-imdkit, as it is not actively maintained
My branch includes my own fixes, as well as this PR:

refs: https://github.com/H-M-H/xcb-imdkit-rs/pull/3

which should enable this PR that's been blocked on it for a while:
refs: https://github.com/wez/wezterm/pull/2056
2024-01-23 17:50:04 -07:00
Wez Furlong
f6aba4b0d6
deps: update zbus 2024-01-23 17:14:47 -07:00