1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-18 10:52:16 +03:00
Commit Graph

3397 Commits

Author SHA1 Message Date
Wez Furlong
51e22d4c90 remove ConfigBridge, Windows edition 2021-03-23 22:17:44 -07:00
Wez Furlong
e294123215 window: remove ConfigBridge on x11/wayland 2021-03-23 22:11:41 -07:00
Wez Furlong
b876fbabd6 remove the config bridge and have window -> config directly 2021-03-23 21:56:57 -07:00
Wez Furlong
dfca18db02 add hostname to ssh config map 2021-03-23 21:18:03 -07:00
Wez Furlong
eefdb667d5 changelog for #508
closes: https://github.com/wez/wezterm/issues/508
2021-03-23 20:01:27 -07:00
Wez Furlong
b0572bbf1f Add ssh_config parser
refs: https://github.com/wez/wezterm/issues/457
2021-03-23 12:58:41 -07:00
Wez Furlong
8d4138bca6 fix X10 mouse encoding issue
This manifests under GNU screen when the window is large.

cc: @babar
2021-03-23 11:09:56 -07:00
Wez Furlong
317077123f mux: adjust error logs down to warn + info
Unhandled unknown sequences aren't errors per-se
2021-03-23 08:16:32 -07:00
Wez Furlong
f301fc6ecc avoid potential panic when processing double wide cells 2021-03-23 08:13:26 -07:00
Wez Furlong
be8c3be910 clear no_glyphs cache when font scale changes
refs: https://github.com/wez/wezterm/issues/508
2021-03-22 22:49:31 -07:00
Wez Furlong
d350709d2f maybe fix build on freebsd 2021-03-22 22:14:55 -07:00
Wez Furlong
6ea24e7516 fixup build on win32 2021-03-22 21:57:00 -07:00
Wez Furlong
3cf7c9c3c2 refine skip_close_confirmation_for_processes_named to look at proc tree
That means that we won't be fooled by a shell with a backgrounded
editor.

refs: https://github.com/wez/wezterm/issues/562
2021-03-22 21:34:10 -07:00
Wez Furlong
5d96db3349 fix tests 2021-03-22 20:54:01 -07:00
Wez Furlong
8f856d0b81 font: make system fallback async wrt. rendering
If shaping can't resolve some glyphs, queue the font locator
fallback resolution to another thread; meanwhile, a last resort
glyph is used.

That thread can trigger an invalidation once the fallback resolve
is complete, the window is invalidated and the last resort glyph
is replaced by the resolve glyph.

refs: https://github.com/wez/wezterm/issues/559
refs: https://github.com/wez/wezterm/issues/508
2021-03-22 20:42:03 -07:00
Wez Furlong
e69485d3ca avoid hang if several glyphs fail to resolve in quick succession
The channel to the connui was bounded to 16 and could easily be
saturated from the main thread.  The saturated queue would block
the main thread.
2021-03-22 15:53:56 -07:00
Wez Furlong
6b92cf7539 fonts: show config error window when glyphs cannot be resolved
Keep track of the glyphs we've already advised about (until the
config is reloaded) so that we don't keep spamming the user.

refs: https://github.com/wez/wezterm/issues/559
2021-03-22 15:29:03 -07:00
Wez Furlong
f7b0ea2eb7 fonts: tune up fallback font resolution
* Check built-in fonts before asking the system for codepoint coverage
* If one of the earlier stages resolved some fonts, skip the remaining
  stages and speculatively shape what we have.  This avoids triggering
  the system font lookup for fonts that are present in the font_dirs
  or that are built-in, such as powerline symbols.

refs: https://github.com/wez/wezterm/issues/559
2021-03-22 15:03:50 -07:00
Wez Furlong
961e4ef9f7 fonts: improve FontDataHandle ordering/comparison
Don't include in-memory data in these operations
2021-03-22 14:49:00 -07:00
Wez Furlong
785645cd86 changelog for https://github.com/wez/wezterm/issues/572
closes: https://github.com/wez/wezterm/issues/572
2021-03-22 14:10:17 -07:00
dependabot[bot]
f032c5202a build(deps): bump windows from 0.4.0 to 0.5.0
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Changelog](https://github.com/microsoft/windows-rs/blob/master/docs/changelog.md)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 13:55:43 -07:00
Wez Furlong
4d4fa35557 skip_close_confirmation_for_processes_named now also works on macos
refs: https://github.com/wez/wezterm/issues/562
2021-03-22 12:57:36 -07:00
Wez Furlong
1b7c980646 fonts: avoid querying macos fallback list multiple times 2021-03-22 12:46:58 -07:00
Wez Furlong
ad4b3b4648 add skip_close_confirmation_for_processes_named option
Currently only respected on linux.

refs: https://github.com/wez/wezterm/issues/562
2021-03-22 12:42:46 -07:00
Wez Furlong
7ace4d1efb docs: clarify how to disable per-tab close prompts
https://github.com/wez/wezterm/issues/562
2021-03-22 11:51:56 -07:00
Wez Furlong
b27e4ce2b2 keys: CMD-Q for QuitApplication is now a default on macos 2021-03-22 11:43:53 -07:00
Wez Furlong
22522dc39e render more symbol/icon/emoji at double width by default
Default `allow_square_glyphs_to_overflow_width="WhenFollowedBySpace"`,
and expand its meaning from mostly square glyphs to glyphs that are
also wider than they are tall.

refs: https://github.com/wez/wezterm/issues/565
2021-03-22 11:36:45 -07:00
Wez Furlong
4fa85e7037 gui: avoid closing pty pane when double-activating search overlay
This is another variation on dcb6fec28f

refs: #572
2021-03-22 08:35:10 -07:00
Wez Furlong
a5f4803b0b fix panic when egl doesn't have OPENGL_API
refs: #566
2021-03-21 20:51:02 -07:00
Wez Furlong
a7c9d9123b window: fix compilation warning when wayland feature disabled 2021-03-21 20:20:24 -07:00
Wez Furlong
8dbcb3e00c cargo update 2021-03-21 20:18:02 -07:00
Wez Furlong
510580bc48 docs: changelog updates
closes: https://github.com/wez/wezterm/issues/506
Refs: https://github.com/wez/wezterm/issues/546
2021-03-21 20:12:46 -07:00
Wez Furlong
70d2351b7d docs: changelog for https://github.com/wez/wezterm/issues/542
closes: https://github.com/wez/wezterm/issues/542
2021-03-21 20:05:48 -07:00
Wez Furlong
a0d39989df simplify Color data type
There's something fishy with colorspaces and blending.
This commit removes the `window::Color` type and replaces
it and the confusing array of color types exposed by the
`palette` crate with a pair of much simpler types:

`LinearRgb` - a tuple of f32 linear color components
`SrgbaPixel` - the u32 sRGBA pixel representation

This doesn't change anything about rendering, it just
makes it a bit simpler and makes the SrgbaPixel -> LinearRgb
conversion happen slightly earlier which shaves off some
ad-hoc conversions.

Refs: https://github.com/wez/wezterm/issues/544
2021-03-21 16:54:22 -07:00
Wez Furlong
59ec969a26 gui: micro-optimize some aspects of rendering
hoist the underlyine glyph retrieval out of the loop.
Precompute some color conversions (less effective until
the gamma branch is merged).

refs: https://github.com/wez/wezterm/issues/546
2021-03-21 13:40:24 -07:00
Wez Furlong
20e3d4d982 gui: use triple-buffering of vertexbuffers
The internet says that this is a recommended way to avoid stalling
when updating the vertex data.

refs: https://github.com/wez/wezterm/issues/546
2021-03-21 12:01:30 -07:00
Wez Furlong
1994a2ea2d gui: improve vertex buffer map/write/release performance
Switches from using a dynamic vertex buffer to an immutable
vertex buffer.  This feels counter-intuitive to me; the purpose
of dynamic is to sustain frequent updates, but mapping the buffer
needs to synchronize with the GPU, and if we are rapidly invalidating
the window that can stall painting by tens of milliseconds.

Switching to an immutable buffer avoids the stall and makes
quad mapping more consistently < 10ms, but its still not
ideal.

refs: https://github.com/wez/wezterm/issues/546
2021-03-21 10:28:17 -07:00
Wez Furlong
4767fcc28c windows: some minor performance improvements
* Make window invalidation more efficient by avoiding spawning a call
  that spawns a call to invalidate the window.  Just directly mark as
  invalidated.

* Suppress default background erase

* hoist the bg_color calc for quads that don't have Cells outside of
  its loop.

refs: https://github.com/wez/wezterm/issues/546
2021-03-21 10:06:43 -07:00
Wez Furlong
08797e77b5 docs: changelog for https://github.com/wez/wezterm/issues/558 2021-03-21 08:30:57 -07:00
Wez Furlong
af84d1ee7f fonts: prefer dwrote over gdi so that we can get OnDisk handles
The dwrote crate offers functions that can extract the underlying
font file name(s) from the system, so let's use those to get
OnDisk font handles and save some memory.

refs: https://github.com/wez/wezterm/issues/559
2021-03-21 01:44:41 -07:00
Wez Furlong
f3d01c4d19 windows: fix window_background_opacity
I'm not sure what exactly changed (perhaps it was a Windows updated?)
but window_background_opacity was only taking effect for windows
with no title bar.

I found that explicitly configuring a region makes transparency
work again.

refs: #553
2021-03-21 00:57:09 -07:00
Wez Furlong
2c37d2eeb5 fonts: fixup win32 build
refs: https://github.com/wez/wezterm/issues/559
2021-03-20 23:32:19 -07:00
Wez Furlong
70c4cd1a53 fonts: use Cow instead of making a Vec copy for Memory handles
This doesn't change much, just makes things slightly tidier.

refs: https://github.com/wez/wezterm/issues/559
2021-03-20 23:15:33 -07:00
Wez Furlong
eafe01e946 fonts: avoid making an in-memory copy of OnDisk font handles
In an earlier incarnation of both wezterm and freetype, FT_New_Face
would lead file descriptors into child processes because it didn't
set O_CLOEXEC.  That led to the slightly pessimistic approach of
loading the font into memory for the lifetime of the wezterm process.

With the improved fallback handling on macos, this can result in
hundreds of MB of font data being loaded, in some cases multiple
times.

Since those days, freetype now sets O_CLOEXEC and wezterm has some
logic to close other random fds, so the descriptor leaking problem
is gone and we can now let freetype manage a file handle instead
of a memory-baked font.

This reduces the memory utilization by at least 1GB in the case
that a glyphs need to be resolved from the system fallback fonts.

refs: https://github.com/wez/wezterm/issues/559
2021-03-20 23:00:53 -07:00
Wez Furlong
72f2ff850f fonts: avoid making copies of Memory font handles
refs: https://github.com/wez/wezterm/issues/559
2021-03-20 22:49:27 -07:00
Wez Furlong
5eb6a15312 macos: reduce memory utilization in font fallback case
refs: https://github.com/wez/wezterm/issues/559
2021-03-20 22:27:08 -07:00
Wez Furlong
f4a8b14a2c tidy up the error message when no fallback is found
on macos there's no guarantee that the fallback set has glyphs
for the requested range.
2021-03-20 22:09:23 -07:00
Wez Furlong
1e6754b65d fixup wt-record on darwin 2021-03-20 20:14:17 -07:00
Wez Furlong
8015791dd0 fixup initial pty dimensions to account for font/dpi size
refs: https://github.com/wez/wezterm/issues/563
2021-03-20 13:17:32 -07:00
Wez Furlong
1cf335cb45 fonts: handle bitmap-only fonts better
terminus-bold.otb reports 0 height!

Detect and force that case to go through the bitmap strike loading
code path.

Improve the size selection heuristic for bitmap strikes: previously,
we would just pick the largest bitmap and allow it to be scaled down,
which was OK for emoji fonts that just had 128px square glyphs, but
is not ok for pre-rendered pixel strikes like terminus.

Note that IncreaseFontSize works in terms of percentages only,
so using a font like this may have "gaps" when ctrl-+ or - to change
the font size.

refs: https://github.com/wez/wezterm/issues/560
2021-03-20 12:52:20 -07:00