1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-21 12:21:32 +03:00
Commit Graph

1423 Commits

Author SHA1 Message Date
Wez Furlong
8da5584a52 add fallback font with replacement character on windows 2019-11-02 16:42:03 -07:00
Wez Furlong
f88fed9dfb don't swallow things like ctrl+ 2019-11-02 13:42:10 -07:00
Wez Furlong
2120b1e2ee fix shift-insert paste on windows
... by filling out the complete mapping between the keycode enums
2019-11-02 13:24:31 -07:00
Wez Furlong
da58b36881 Improve? IME on Windows
This isn't perfect, but is sufficient to allow using the IME to enter
eg: the heart emoji with cmd.exe.

We have some issues locating and rendering chinese characters that
make it difficult to prove/disprove that the IME is working 100%
because we just can't see the glyphs.

In addition, there appears to be something a bit wonky with conpty and
emoji.  If we use eg: `wezterm ssh HOST` to log in to a remote system,
and use the IME to pick eg: the pig face emoji, this renders correctly.
In that scenario we don't use conpty at all.

The IME window is always placed in the top left corner of the window
at the moment, which isn't great, but is better than the system default
which is outside of the window.  I need to introduce a way to set the
IME position in the window layer so that the front end gui can set it
to the current cursor position.
2019-11-02 12:39:05 -07:00
Wez Furlong
a2f2438a73 improve error reporting for font related errors 2019-11-02 09:20:17 -07:00
Wez Furlong
61b27c8089 teach build.rs to init submodules if needed
Forgetting to update the submodules is a commonly reported build
issue with an obscure error message:

```
CMake Error: The source directory "/home/USER/wezterm/target/debug/build/freetype-430fe24cb64c561c/out/zlib-src/zlib" does not appear to contain CMakeLists.txt.
```

this teaches the build.rs machinery to run the submodule update
if it looks like it is needed.
2019-10-29 08:42:38 -07:00
Wez Furlong
d0f2204bdd factor out color conversion to match software renderer 2019-10-29 08:42:38 -07:00
Wez Furlong
7ecee7a5d6 defer calling window.show until after probing/enabling opengl 2019-10-29 08:42:38 -07:00
Wez Furlong
7c844e8924 probably fixup build on windows for executor changes 2019-10-28 21:51:46 -07:00
Wez Furlong
a9940ca56f remap Char codes to termwiz input codes
refs: https://github.com/wez/wezterm/issues/53
2019-10-28 14:31:10 -07:00
Wez Furlong
61fe33fbf6 remove unused rayon dep from the promise crate 2019-10-28 14:31:10 -07:00
Wez Furlong
c8f39b9adf simplify executor acquisition 2019-10-28 08:16:36 -07:00
Wez Furlong
29e4843517 move away from explicit executor.clone_executor() calls
call the gui_executor() function instead
2019-10-28 08:11:06 -07:00
Wez Furlong
30c6ac7831 fix formatting 2019-10-28 07:37:10 -07:00
Wez Furlong
e8dbf18bb6 avoid ambiguous resolution in cargo test --all 2019-10-28 00:18:46 -07:00
Wez Furlong
c3d8f26e3e fix test case
refs: https://github.com/wez/wezterm/issues/52
2019-10-28 00:14:19 -07:00
Wez Furlong
d80169ceff Avoid accidental application mode delete output in key processing
I thought that I'd broken something with the DEL processing in vim with
the new frontend but it turned out that the other frontend was emitting
BS always and that I'd actuall unbroken passing DEL through and that
other layers were translating DEL into an application cursor mode output
for DEL that emits a totally different sequence.

This diff preserves DEL and disables that other sequence.

Will follow up with some explicit configuration to control this
behavior, but in the short term, the default behavior should be much
closer to what people actually want and expect!

refs: https://github.com/wez/wezterm/issues/52
2019-10-27 23:59:15 -07:00
Wez Furlong
d5b02edad2 update core-text dep 2019-10-27 23:31:44 -07:00
Wez Furlong
01669266f2 rename SoftwareFrontend to GuiFrontend
It started out as a software only cpu renderer but grew into the
current gui frontend; rename to reflect that.
2019-10-27 23:31:44 -07:00
Wez Furlong
728df5662d move localtab out from old guicommon module 2019-10-27 23:31:44 -07:00
Wez Furlong
8bfd92bbfc move clipboard out from old guicommon module 2019-10-27 23:31:44 -07:00
Wez Furlong
4cb74e68dd remove winit/glutin based frontend 2019-10-27 23:31:44 -07:00
Wez Furlong
66f5f6842d implement window size changing when the font scaling is changed on windows 2019-10-27 18:13:02 -07:00
Wez Furlong
c5d9766d50 x11: implement window resizing when font scaling changes 2019-10-27 17:58:37 -07:00
Wez Furlong
4e01dec636 font scaling now also resizes the window for opengl+software frontend 2019-10-27 17:48:02 -07:00
Wez Furlong
fd8738ea0e window: macos: rewrite Del to Backspace
this is more appropriate for vim
2019-10-27 16:33:48 -07:00
Wez Furlong
91b56abb3a confirmed that the descender emoji thing is macos specific
so let's avoid doing it on linux and windows
2019-10-27 15:20:18 -07:00
Wez Furlong
a0f6db85cb tweak color emoji descender handling 2019-10-27 13:44:06 -07:00
Wez Furlong
4116d7d523 remove byte-swapping workaround for opengl
We handle this with a temporary buffer for the upload, which is
a little gross but avoids leaking that implementation aspect
out to the rest of the code.
2019-10-27 10:07:14 -07:00
Wez Furlong
3a7f4cdff2 explicitly select a 24-bit visual on x11 2019-10-27 09:07:52 -07:00
Wez Furlong
04d6fed848 fixup tests for recent api changes 2019-10-27 09:04:42 -07:00
Wez Furlong
b0438bd533 fix bgra vs rgba for opengl vs software render for iterm2 style images 2019-10-27 00:21:58 -07:00
Wez Furlong
1ea9f305e2 hook up iterm2 style images to the opengl renderer 2019-10-27 00:14:36 -07:00
Wez Furlong
12e71a594a teach the terminalstate about pixel sizes
This allows more accurate slicing of images when processing
iterm2 image sequences
2019-10-26 23:58:39 -07:00
Wez Furlong
d97a84f984 render iterm2 image protocol in the software renderer
This is still a bit rough because the terminal parser doesn't
understand the pixel sizes, so it relies on the hard coded
cell dimensions being accurate.
2019-10-26 23:30:39 -07:00
Wez Furlong
0170d1623a clarify vertex indices 2019-10-26 17:39:46 -07:00
Wez Furlong
d4bfdce8c4 DRY with DrawParameters 2019-10-26 17:15:36 -07:00
Wez Furlong
f1172c6272 fix issue where resizing can lead to stair effect
The column count didn't match the pty size col count for some partial
cell width sizes.
2019-10-26 17:11:22 -07:00
Wez Furlong
833d76185f factor quad out of termwindow.rs 2019-10-26 17:02:59 -07:00
Wez Furlong
3ce3399bde move renderstate out of termwindow.rs 2019-10-26 16:59:53 -07:00
Wez Furlong
e69ad44dcb move utilsprites out of termwindow.rs 2019-10-26 16:39:58 -07:00
Wez Furlong
412be60e2e move glyphcache out of termwindow.rs 2019-10-26 16:31:53 -07:00
Wez Furlong
4ce8e1dfc9 remove empty file that was accidentally committed 2019-10-26 16:06:38 -07:00
Wez Furlong
aff6016493 remove force-fontconfig feature 2019-10-26 14:43:30 -07:00
Wez Furlong
55dd7acad3 remove x11 frontend
It has been superseded by the newer opengl->software frontend
2019-10-26 14:42:27 -07:00
Wez Furlong
4a798d241e fix bottom adjust calculation 2019-10-26 14:09:40 -07:00
Wez Furlong
6692302d1f eliminate a local variable 2019-10-26 13:26:14 -07:00
Wez Furlong
71b4f52e5e clippy 2019-10-26 13:22:16 -07:00
Wez Furlong
9189014fc9 simplify glyph scaling computation 2019-10-26 13:06:52 -07:00
Wez Furlong
702fff7ab7 opengl uses different byteorder than our software renderer
so we need to byte swap depending on whether we are using opengl
or not.
2019-10-26 12:57:20 -07:00