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

981 Commits

Author SHA1 Message Date
Wez Furlong
17101b182e fix build on linux 2019-12-09 00:50:19 -08:00
Wez Furlong
b5a59a18fa fonts: extract the shaper concept 2019-12-09 00:06:47 -08:00
Wez Furlong
41d10811a6 fonts: break out the rasterizer concept 2019-12-08 23:27:10 -08:00
Wez Furlong
6f867ac3e2 fonts: start breaking out the loader/locator concept 2019-12-08 22:48:47 -08:00
Wez Furlong
151a915128 Improve FontKit rendering, but it is still bad
I don't think font-kit has enough data available for to make things
work the way we're used to.  In addition, the implementation of
the loader for core text has a lot of TODO's.

The state of the FontKit variant is that it basically renders glyphs
and they are aligned to the same baseline, but both the vert and
horz metrics are off; for example, `-` doesn't render.  The glyphs
are also under-sized.
2019-12-08 21:35:37 -08:00
Wez Furlong
ab86eb1c75 font-kit: enable its use on macos
FontKit is still broken, but FontKitAndFreeType works
2019-12-08 17:51:01 -08:00
Wez Furlong
55f2016683 fix subtraction underflow 2019-12-08 17:49:27 -08:00
Wez Furlong
6ea837fc14 TODONE 2019-12-08 16:41:28 -08:00
Wez Furlong
1e9d3571ba font-kit: add font_dirs configuration option
This is another option to help with the portable wezterm on a flash
drive use case.

When the font system is set to FontKitAndFreeType, the set of
directories specified by the `font_dirs` configuration option will
be scanned for fonts and used as a source for fonts.

In addition, any relative paths in the the `font_dirs` list will
be expanded relative to the configuration file path.

That allows deploying the following set of files to the root of
a flash drive:

* wezterm.exe
* wezterm.toml
* fonts/myfont.ttf

and with this config snippet:

```
font_system = "FontKitAndFreeType"
font_dir = ["fonts"]
```

wezterm will now consider myfont.ttf when loading fonts.

Refs: https://github.com/wez/wezterm/issues/73
2019-12-08 16:34:17 -08:00
Wez Furlong
8ae136e616 fonts: allow using font-kit as a source for fonts
This commit adds two new font system variants that are currently
implemented only on Windows:

* FontKit - uses fontkit both for font discovery and rasterizing
* FontKitAndFreeType - uses fontkit for font discovery but freetype
  for rasterizing

To a certain extent, FontKitAndFreeType obsoletes FontLoaderAndFreeType
and I'll be looking at removing it once I can test the build on macOS.

The FontKit impl has bad metrics and also crashes during shaping
on Windows, so it's not ready to be used by default.
2019-12-08 16:02:04 -08:00
Wez Furlong
b47cd72853 Windows: show toast notification if config reload encounters error
This gives us a way to show notifs on windows, which is a feature
that isn't supported by the notify-rust crate.
2019-12-08 11:14:02 -08:00
Wez Furlong
500b880b97 load config from executable dir first on Windows
This is to support the portable-tools use case for roaming admins.

Refs: https://github.com/wez/wezterm/issues/73
2019-12-07 20:51:30 -08:00
Jeremy Fitzhardinge
0558662813 Convert chit-chat into info
I assume it was being printed as error from a mass conversion to the logging framework.
2019-12-06 15:11:42 -08:00
Jeremy Fitzhardinge
0ba11a8bbd Clean up FontAttributes bold and italic
There doesn't seem to be a need for a tristate Option<bool>, since we always treat unset as false.
2019-12-06 15:11:42 -08:00
Jeremy Fitzhardinge
b751c6590b Small cleanup in fontconfigandfreetype 2019-12-06 15:11:42 -08:00
Jeremy Fitzhardinge
6420a47ad2 font: add Debug implementation for Pattern and FontSet 2019-12-06 15:11:42 -08:00
Wez Furlong
5b6bad2c51 downrev notify-rust dependency
SOmething on the CI doesn't like it and it looks like a problem
with that alpha version, so let's go back to their stable rev.
2019-12-04 20:40:32 -08:00
Wez Furlong
66861ff8f7 improve handling of deleted config files in the reloader
The NoticeXXX variants are emitted at the trigger point, but
we should wait for the debounced XXX variants instead.  We
were doing this for write but not for delete.  This should
improve the chances that we'll pick up a new version of a
config file.
2019-12-04 20:38:29 -08:00
Wez Furlong
598c2d8c26 notifications: set the resident hint
Even with setting this, I'm 0 for 4 different systems in having the
notifications actually stay on the screen until dismissed.

This was successful at displaying a notification on the pixelbook
desktop though, so that's 1/3 linux systems that have had success.
2019-12-04 19:55:43 -08:00
Wez Furlong
09840dd011 notifications: fixup formatting and add to get-deps script 2019-12-04 18:33:36 -08:00
Wez Furlong
c547b03b8b add basic notifications if the config is broken during reload 2019-12-04 18:26:47 -08:00
Wez Furlong
b3f23bbf4a fixup some build and test warnings 2019-12-01 13:35:34 -08:00
Wez Furlong
901dc9c395 re-structure clipboard handling for mux
The wayland changes rendered clipboard handling for remote multiplexers
broken, and this commit makes it work again.

It removes the clipboard concept from the the TerminalHost and
keeps it separated as the term::Clipboard concept.

The muxer now has plumbing for passing the Clipboard to its idea
of Windows and Tabs and this is hooked up at window creation and
domain attach time.
2019-12-01 13:31:12 -08:00
Wez Furlong
7d510f4f7e reduce log verbosity for compute vertices 2019-12-01 11:43:22 -08:00
Wez Furlong
420903662d reduce verbosity for config reload messages 2019-12-01 11:40:55 -08:00
Wez Furlong
dfe98f46f9 ssh: disable nagle 2019-12-01 11:25:04 -08:00
Wez Furlong
0edceea972 fix compilation on macos 2019-12-01 10:16:14 -08:00
Wez Furlong
f15f556054 wayland: add config option to avoid using it
Just in case!
2019-12-01 07:56:41 -08:00
Wez Furlong
58cb696593 make pty size consistent with tab bar dimensions
This fixes up a series of "we're confused about the screen size"
messages that showed up on startup.
2019-11-30 23:22:37 -08:00
Wez Furlong
68f819e737 avoid resizing terminal tab when scaling changes 2019-11-30 22:03:57 -08:00
Wez Furlong
70f09ef1b4 fix window size calculation when scaling changes
I noticed that we were relatively undersized for newly created
windows; there were two problems:

1. We weren't propagating the old rows and cols counts through
   to the speculative resize.
2. The speculative resize wasn't implemented on wayland, and
   needs a surprising amout of work to actually make the resize
   take effect.
2019-11-30 21:27:03 -08:00
Wez Furlong
ea61e8c57d wayland: don't allow clicks in titlebar to go to tabbar 2019-11-30 13:21:37 -08:00
Wez Furlong
4ef20480c5 wayland: implement clipboard
This was honestly a PITA because of its complexity.  The `clipboard`
crate (now dropped as a dep) didn't support wayland, so I looked at
the `smithay-clipboard` crate, which caused all of my input to become
laggy just by enabling it--even without actually copying or pasting!

Both of those crates try to hide a number of details of working with
the clipboard from the embedding application, but that works against
our window crate implementation, so I decided to integrate it into
the window crate using Futures so that the underlying IPC timing and
potential for the peer to flake out are not completely hidden.

This first commit removes the SystemClipboard type from wezterm
and instead bridges the window crate clipboard to the term crate
Clipboard concept.

The clipboard must be associated with a window in order to function
at all on Wayland, to we place the get/set operations in WindowOps.

This commit effectively breaks the keyboard on the other window
environments; will fix those up in follow on commits.
2019-11-29 12:17:52 -08:00
Wez Furlong
7b461c1580 software: don't fill the bottom two lines in bg color
Fix the math so that we correctly calculate the size of the the
marginal fill area at the bottom when in software rendering mode.
2019-11-28 07:16:46 -08:00
Wez Furlong
cb9fd7db5b respect enable_tab_bar on config reload 2019-11-24 20:33:14 -08:00
Wez Furlong
80719f419d changes to ratelimits now take effect on config reload 2019-11-24 20:24:58 -08:00
Wez Furlong
1ba720b28c automatically reload config when the file changes 2019-11-24 19:20:14 -08:00
Wez Furlong
95c957564a reload keymap when config is reloaded 2019-11-24 17:25:28 -08:00
Wez Furlong
fd78a0b3ce Allow reloading hyperlink rules from the config at runtime 2019-11-24 13:12:54 -08:00
Wez Furlong
7c7825c070 term: extract configuration to a trait
This isn't complete but begins the process of extracting
the embedding application configuration into a trait provided
by the application rather than passing the values in at
construction.

This allows the application to change configuration at
runtime.

The first option to handle this is the scrollback size.
2019-11-24 12:43:41 -08:00
Wez Furlong
e56dfa9875 config reloading now also applies to fonts
This change also causes any/all windows to pick up the reloaded config
2019-11-24 10:24:33 -08:00
Wez Furlong
88cd29213f Add hotkey (defaults: SUPER-R, and CTRL+SHIFT-R) to reload config
The effects are most noticeable when spawning a new tab;
try changing the background color in the config file,
reloading it and spawning a tab!
2019-11-24 09:27:31 -08:00
Wez Furlong
d06c08e0f3 config: expose configuration generation number 2019-11-24 09:19:14 -08:00
Wez Furlong
8996f897b9 remove Mux::config in favor of config::configuration()
The idea is to centralize accessing the config to that
function so that we can implement config reloading.
2019-11-24 09:07:46 -08:00
Wez Furlong
72b55d3982 config: lay foundation for config reloading 2019-11-24 08:28:30 -08:00
Wez Furlong
07c6ca94da move some code around in config/mod.rs 2019-11-24 07:56:38 -08:00
Wez Furlong
eed6049902 tidy up config imports a little 2019-11-24 07:55:13 -08:00
Wez Furlong
0f64357203 change default font size to 10pts
I realized that I had set this to 10pts in my configs, and after running
with the default for a bit today, I agree with @chadaustin that we
should be smaller by default!
2019-11-24 07:51:10 -08:00
Wez Furlong
1d5e36a97c split more config into separate modules 2019-11-24 07:50:13 -08:00
Wez Furlong
955361433d split daemon options out of config/mod.rs 2019-11-24 07:37:42 -08:00
Wez Furlong
2960b9186c config.rs -> config/mod.rs + config/keys.rs 2019-11-24 07:35:12 -08:00
Wez Furlong
517084ff2f clippy 2019-11-24 07:20:41 -08:00
Wez Furlong
385b3bedbd move some config defaults into the config module 2019-11-24 06:56:41 -08:00
Wez Furlong
e904e11e58 tab bar: default to enabled 2019-11-23 16:58:37 -08:00
Wez Furlong
f3f61b47dc tab bar: add new tab button to tab bar 2019-11-23 14:57:17 -08:00
Wez Furlong
349a24ccd9 allow dragging by tab bar on linux
This works with X11 on fedora, but the window movement is ignored
by the xwayland machinery on chromeos.
2019-11-23 11:46:03 -08:00
Wez Furlong
01eaa7db08 window: adopt Point for mouse coordinates
and allow them to be signed again
2019-11-23 08:48:09 -08:00
Wez Furlong
14fbf43485 promise: more properly implement Future::poll
The future won't ever complete if you don't connect the waker
from the context!

Prove this out by making the windowops functions async and
verifying them in the async example
2019-11-23 08:16:12 -08:00
Wez Furlong
9d8e664ec0 tidy up the error output in the case that we fail with an error 2019-11-22 20:32:03 -08:00
Wez Furlong
185e72b1fe simplify error logging in main 2019-11-22 10:55:48 -08:00
Wez Furlong
3057befa5d remove use of tinyfiledialogs
It will pass the message text to the shell without proper quoting
which results in it running all sorts of garbage depending on
the message you're trying to display.

Very scary!

refs: https://github.com/jdm/tinyfiledialogs-rs/issues/19
2019-11-22 08:48:33 -08:00
Wez Furlong
5dfd03468b config: DRY; use serde defaults for Config 2019-11-22 06:50:39 -08:00
Wez Furlong
1737ca4d80 fix subtraction overflow when creating a new window when tab bar enabled 2019-11-22 04:51:55 +00:00
Wez Furlong
e9ec35713c raise ratelimit_output_bytes_per_second
10k was a bit tight for a full-screen vim window, so bump
it up a bit more.
2019-11-21 19:03:46 -08:00
Wez Furlong
824ec691fe revise ratelimit_output_bytes_per_second default
I've found that 10_000/s strikes a reasonable balance between
output speed and the ability to interrupt the output.

Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 18:20:30 -08:00
Wez Furlong
06da330087 add low pri spawn queue
Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 18:20:17 -08:00
Wez Furlong
a031b5b9eb improve the rate limiter
when over the budget, this reduces to a trickle of 1 byte per
appropriate sub-second interval.  For example, if the limit is
set to 100 bytes per second, we admit 1 byte every 10ms.

Refs: https://github.com/wez/wezterm/issues/65
Refs: https://github.com/wez/wezterm/pull/67
2019-11-21 14:42:33 -08:00
Wez Furlong
a26a94b5bb config: allow specifying NONE or "" for key modifiers
previously, we would raise an error for these, which made it
awkward to eg: bind just F1 to an action.
2019-11-21 10:25:14 -08:00
Wez Furlong
ac028da1b6 fix an issue with rate limiting data from the child pty
We need to chunk the data that we read from the child otherwise
we may potentially try to admit more data in a single action
than the ratelimiter will ever allow (eg: if we read 4k of data
and the limit is 100 bytes per second, we can never send that
4k of data in a single write).

Our handling of that situation was not good: we'd panic and kill
the background thread that was reading the data, but the rest
of the app was still running.

This commit upgrades to the most recent rate limiter crate
and performs explicit chunking of the output so that we
behave more sanely.

Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 08:36:16 -08:00
Wez Furlong
371e07838d tab bar: set mouse to arrow when in tab bar 2019-11-21 07:08:31 -08:00
Wez Furlong
c6b62d8055 tab bar: default mouse coords outside of view
This helps to prevent a spurious hover styled tab caption being rendered
in some cases.
2019-11-21 00:11:51 -08:00
Wez Furlong
ac7a509dbb allow configuring the tab bar
The defaults are pretty neutral.  You can get a little more fancy
with something like this:

```
[colors.tab_bar]
background = "#0b0022"

[colors.tab_bar.active_tab]
bg_color = "#2b2042"
fg_color = "#c0c0c0"

[colors.tab_bar.inactive_tab]
bg_color = "#1b1032"
fg_color = "#808080"

[colors.tab_bar.inactive_tab_hover]
bg_color = "#3b3052"
fg_color = "#909090"
italic = true
```
2019-11-21 00:04:49 -08:00
Wez Furlong
d716578735 Add optional basic tab UI at the top of the window
This is a little ghetto feeling because we're just stealing the top
line from the terminal model, rather than rendering anything
particularly native, but it is relatively quick and easy to do,
and helps improve the feel when using wezterm on a chromebook
inside crostini; in that environment, the system doesn't render
any text in the window titlebars (WTF!?) so it is desirable
to show something to help navigate the UI.

The tab bar is off by default for now; we'll definitely want to
add options to configure at least the colors, and perhaps add
a keybinding to toggle it at runtime.

```
enable_tab_bar = true
```

While adding support for the tab bar, I found a couple of little
bugs relating to computing the number of rows and columns; one
was during resize where we'd use the prior size instead of
the current size.  Another was during tab spawning where we'd use
a slightly different calculation to determine the size and end
up raising an error about being confused about the screen size.
2019-11-20 21:57:41 -08:00
Wez Furlong
d397976acf fix rendering of the cursor position in the line editor 2019-11-16 13:58:01 -08:00
Wez Furlong
6289c08a4e Adopt CSI u modifier encoding for keypresses
See http://www.leonerd.org.uk/hacks/fixterms/ for the specification.

Refs: https://github.com/wez/wezterm/issues/63
2019-11-16 13:38:03 -08:00
Wez Furlong
b79ccb50c4 Add option to swap Backspace and Delete
This defaults to true on macOS

Fixes https://github.com/wez/wezterm/issues/64
2019-11-15 19:52:44 -08:00
Wez Furlong
7323e30be7 try to normalize the shift state in the keymap handling code
We weren't recognizing ctrl+shift+c for example on linux.
2019-11-11 09:11:52 -08:00
Wez Furlong
5370e88520 implement explicit Copy keybinding action
previously we would only ever copy to the clipboard when the selection
was changed.

Now we respect the Copy keypress and have it re-copy the selection
into the clipboard.
2019-11-11 08:54:47 -08:00
Wez Furlong
a83851dcca fix warning 2019-11-11 08:41:59 -08:00
Wez Furlong
e1069e0a7d linux: allow specifying fallback fonts explicitly
previously, if you had defined a list of fonts, we'd show a todo error
and ignore everything but the first entry on linux.

We now parse the list into a set of fontconfig patterns and compose
them together, giving prefernce to the explicitly listed fonts.
(details in the comments in the code).

This allows color emoji to render for user defined fonts without
forcing the user to muck around in fontconfig config.

Added Noto Color Emoji to the fallback; this is used in our
ssh password prompting UI when available.
2019-11-10 00:13:35 -08:00
Wez Furlong
a26cab3833 add wezterm imgcat subcommand to output images to the terminal
This subcommand parses its input and outputs an iTerm2 compatible
img escape sequence (https://iterm2.com/documentation-images.html)

Usage is straightforward:

```
$ wezterm imgcat  assets/windows/terminal.ico --width "10%" --height "10%"
```
2019-11-09 15:50:59 -08:00
Wez Furlong
15a86b77bd replace most tinyfiledialogs usage with our own prompts 2019-11-08 21:11:22 -08:00
Wez Furlong
6da7b3ecd0 internalized password/auth UI for ssh
This is a bit of a large commit because it needed some plumbing:

* Change mux creation to allow deferring associating any domains,
  and to change the default domain later in the lifetime of the
  program
* De-bounce the empty mux detection to allow for transient windows
  during early startup
* Implement a bridge between the termwiz client Surface and the
  frontend gui renderer so that we can render from termwiz to
  the gui.
* Adjust the line editor logic so that the highlight_line method
  can change the length of the output.  This enables replacing
  the input text with placeholders so that we can obscure password
  input
2019-11-08 19:55:12 -08:00
Wez Furlong
a9a0f463e6 windows: improve default key bindings
refs https://github.com/wez/wezterm/issues/34

A number of key bindings that used super on macos are also
aliased with bindings that use CTRL+SHIFT for improved
compat with windows.
2019-11-05 22:47:34 -08:00
Wez Furlong
3b93442590 config: add send_composed_key_when_alt_is_pressed option
On macos, allow sending eg: ALT-F as ALT-F rather than the composed
graphics character (ƒ) that is the default for that combination in
the macos IME.

This is controlled by a new config option which defaults to false
so that we have the expected terminal behavior by default.
2019-11-05 22:29:22 -08:00
Wez Furlong
eb1bc7f736 allow binding opt + key based on pre-composed key presses
This diff adds some plumbing to track the `raw_key` in the KeyEvent;
this is the key prior to composing or eg: mapping dead keys.

With that field in place, we can teach the termwindow layer to attempt
looking up that key mapping from the user defined key bindings.

If we get a match then we can stop further key processing.
2019-11-05 21:32:23 -08:00
Wez Furlong
1ab438c1e2 improve emoji width calculation
I noticed while scrolling `emoji-test.txt` that some of the combined
emoji sequences rendered very poorly.  This was due to the unicode
width being reported as up to 4 in some cases.

Digging into it, I discovered that the unicode width crate uses a
standard calculation that doesn't take emoji combination sequences
into account (see https://github.com/unicode-rs/unicode-width/issues/4).

This commit takes a dep on the xi-unicode crate as a lightweight way
to gain access to emoji tables and test whether a given grapheme is
part of a combining sequence of emoji.
2019-11-05 08:45:08 -08:00
Wez Furlong
e288ecce7c windows: avoid panic when clicking on links
The `open` crate causes us to recurse into our wndproc and re-borrow,
so avoid that and schedule a separate call later.
2019-11-04 08:56:11 -08:00
Wez Furlong
cb5e351187 macos: try to set the IME cursor position a bit better
Use the current terminal cursor position as the basis for the position
of the IME.
2019-11-04 00:11:27 -08:00
Wez Furlong
ca5db29695 add a fallback font for chinese text on macos
I'm no expert, but this at least allows me to mash the IME
in pinyin mode and see chinese characters.
2019-11-03 22:01:35 -08:00
Wez Furlong
819faa3f85 remove unused get_dpi_scale method 2019-11-03 22:01:35 -08:00
Wez Furlong
155a972425 add missing selection normalize calls
I saw

```
thread 'main' panicked at 'you forgot to normalize a SelectionRange', term/src/selection.rs:94:9
```
2019-11-03 22:01:35 -08:00
Wez Furlong
c99e2989ef Fix ctrl-J processing
The front-end was treating both \r and \n as Enter and passing
that through to the terminal.

To verify behavior, pay attention to your termios configuration:

```
$ stty -icrnl
$ od -c
<CTRL-J><CTRL-D>
0000000   \n
0000001
$ od -c
<CTRL-M><CTRL-D><Enter>
0000000   \r  \n
0000002
```

Closes https://github.com/wez/wezterm/issues/56
2019-11-03 22:01:35 -08:00
Wez Furlong
f882e01ed4 add some debugging around reading console output 2019-11-02 16:53:51 -07:00
Wez Furlong
047a58a6e9 improve error messages when shaping 2019-11-02 16:43:09 -07:00
Wez Furlong
8da5584a52 add fallback font with replacement character on windows 2019-11-02 16:42:03 -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
a2f2438a73 improve error reporting for font related errors 2019-11-02 09:20:17 -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
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
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
4e01dec636 font scaling now also resizes the window for opengl+software frontend 2019-10-27 17:48:02 -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
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
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
Wez Furlong
c7202af08f fix default frontend on linux when winit is disabled 2019-10-26 12:32:59 -07:00
Wez Furlong
887cbb8e5d factor keyassignment out from winit feature module 2019-10-26 10:25:06 -07:00
Wez Furlong
552368a0cf suppress warnings when enable-winit is not enabled 2019-10-26 10:13:14 -07:00
Wez Furlong
88e97ce5f4 allow disabling winit in the x11 build 2019-10-26 09:56:27 -07:00
Wez Furlong
95d3fb7aeb start making it possible not to build winit+glutin 2019-10-26 09:51:29 -07:00
Wez Furlong
ba56a86201 remove direct gl dependency 2019-10-26 09:33:31 -07:00
Wez Furlong
96911c8d28 move timing logging to debug 2019-10-26 08:39:43 -07:00
Wez Furlong
b318c43bfe add Quad helper to simplify opengl renderer 2019-10-26 08:22:35 -07:00
Wez Furlong
bc4373c3ff implement underlines in the new renderer 2019-10-26 07:50:14 -07:00
Wez Furlong
b9add8e3d4 compute better underlines using font metrics 2019-10-25 23:10:08 -07:00
Wez Furlong
f732f07ddc print gl implementation details when initializing 2019-10-25 21:45:27 -07:00
Wez Furlong
3ca3b3196e clean up process death detection on windows w/ new frontend 2019-10-25 08:26:38 -07:00
Wez Furlong
fc918c2f4d don't panic when minimizing the window on Windows
closes: https://github.com/wez/wezterm/issues/45
2019-10-25 07:20:21 -07:00
Wez Furlong
d81465a39b remove the force-glutin feature 2019-10-24 23:37:05 -07:00
Wez Furlong
7c2afce851 implement EGL based render for termwindow/opengl mode on linux 2019-10-24 17:43:37 -07:00
Wez Furlong
c6ce005b2a make new opengl frontend basically work on macos
It doesn't yet handle underlines or strikethrough.
Notably, live resizing now works, which is nice!
2019-10-24 08:27:11 -07:00
Wez Furlong
bfc09299d8 clippy 2019-10-12 08:51:48 -07:00
Wez Furlong
41e392fc79 we can now init opengl but not render it 2019-10-10 08:15:00 -07:00
Wez Furlong
3779a1a0b1 software: adopt underline sprites for underlines 2019-10-08 22:08:40 -07:00
Wez Furlong
6ac927eab7 add helper for computing underline sprites 2019-10-08 08:56:34 -07:00