1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 05:42:03 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Go to file
Wez Furlong aee37784e5 Windows: fix initial window size when display scaling != 100%
The heart of this issue was that the resize callbacks have two
layers of state; one in the low level window and one in the application
level window.

On Windows, the system triggers the low level callback prior to
opengl being initialized.  Since the application level depends on
the opengl state, there are some code paths where it NOPs and
returns early if opengl isn't yet initialized.

When the system-wide display scaling is set to say 200%, the application
layer can't know the effective DPI of the window it is creating because
it doesn't know which monitor will be used or what its DPI will be.

New windows are created at the default DPI of 96, and we rely on the
resize events to detect the actual DPI and adjust the scaling in
the window.

The early call of the resize callback meant that the low level and
application level size/dpi state was out of sync and the result was
that the window had half as many pixels as it should, but that the
terminal model was still sized as though it had the correct amount
(twice as many as visible).  This resulted in the window being too
small for the viewport.

The resolution is simple: we now suppress emitting the resize processing
until opengl has been initialized.

The test scenario for this is:

* Set system scaling to 100%
* Launch wezterm
* Set system scaling to 200%
* Observe that wezterm scales to match
* Press CTRL-SHIFT-N to spawn a new window
* Observe that the new window size matches the other window (previously
  this one would be half the size)

While I was looking at this, I noticed that the manifest didn't
match the DPI awareness that we have in the code, so update that.

refs: https://github.com/wez/wezterm/issues/427
2021-01-18 09:27:04 -08:00
.cargo build static on windows for static openssl linkage 2020-02-02 13:03:07 -08:00
.github ci: generate universal binaries for macOS 2021-01-13 20:11:58 -08:00
assets Windows: fix initial window size when display scaling != 100% 2021-01-18 09:27:04 -08:00
async_ossl fixup tls mux sessions 2020-10-04 21:47:12 -07:00
base91 dyn everywhere 2019-06-08 21:28:11 -07:00
bintree wezterm: improve pane resize logic 2020-09-27 16:07:08 -07:00
ci ci: generate universal binaries for macOS 2021-01-13 20:11:58 -08:00
codec deps: misc updates 2020-12-29 09:24:34 -08:00
config deps: update to mlua 0.5 2021-01-13 10:06:35 -08:00
deps harfbuzz: skip some unused bits 2020-12-05 14:19:47 -08:00
docs Windows: fix initial window size when display scaling != 100% 2021-01-18 09:27:04 -08:00
env-bootstrap use $WEZTERM_LOG to configure log levels ad-hoc 2020-12-23 12:19:19 -08:00
filedescriptor fix filedescriptor::poll on macos 2020-09-10 13:58:14 -07:00
licenses macOS: bundle and use MetalANGLE to enable Metal rendering 2020-10-17 09:34:01 -07:00
luahelper deps: update to mlua 0.5 2021-01-13 10:06:35 -08:00
mux fix tests 2021-01-17 22:01:21 -08:00
promise deps: misc updates 2020-12-29 09:24:34 -08:00
pty fix build on windows 2021-01-07 09:38:45 -08:00
rangeset deps: misc updates 2020-12-29 09:24:34 -08:00
ratelim move ratelim to its own crate 2020-10-03 11:15:57 -07:00
strip-ansi-escapes move strip-ansi-escapes into its own crate 2020-10-03 11:15:57 -07:00
tabout Change cell api to avoid direct access to hyperlink/image 2020-10-11 13:12:46 -07:00
term wezterm: fix mapping scroll wheel to cursor up/down in alt screen 2021-01-17 21:44:02 -08:00
termwiz termwiz: really fixup windows build 2021-01-08 09:33:08 -08:00
test-data wezterm: improve shaping of emoji 2020-11-23 13:45:38 -08:00
tmux-cc tmux: attach control mode parser to terminal 2020-11-20 09:24:50 -08:00
umask Take care to restore the original umask 2021-01-07 09:20:13 -08:00
vtparse vtparse: add doc for CsiParam 2021-01-09 09:42:29 -08:00
wezterm wezterm: workaround appimage startup issue 2021-01-09 08:22:17 -08:00
wezterm-client wezterm: fix mapping scroll wheel to cursor up/down in alt screen 2021-01-17 21:44:02 -08:00
wezterm-font gui: refuse to scale to sizes where cell height would be < 2 pixels 2021-01-16 08:45:38 -08:00
wezterm-gui wezterm: fix mapping scroll wheel to cursor up/down in alt screen 2021-01-17 21:44:02 -08:00
wezterm-gui-subcommands wezterm: add --class option to specify window class 2020-11-13 08:15:35 -08:00
wezterm-input-types deps: upgrade euclid -> 0.22 2020-12-10 10:03:30 -08:00
wezterm-mux-server fixup windows build 2020-12-29 16:59:59 -08:00
wezterm-mux-server-impl adjust log levels in mux-server 2020-12-29 16:33:58 -08:00
wezterm-toast-notification tweak updating checking 2020-12-26 18:22:44 -08:00
window Windows: fix initial window size when display scaling != 100% 2021-01-18 09:27:04 -08:00
.cirrus.yml ci: moar freebsd 2020-10-06 09:53:45 -07:00
.gitignore add WezTerm-macos-* to gitignore (#390) 2020-12-21 19:30:23 -08:00
.gitmodules fix CI: savannah is down, use a github mirror for freetype 2019-11-24 13:28:02 -08:00
.rustfmt.toml Make rustfmt happy about "async move" 2020-01-20 13:58:21 -08:00
Cargo.lock cargo update 2021-01-17 23:38:11 -08:00
Cargo.toml ci: generate universal binaries for macOS 2021-01-13 20:11:58 -08:00
CONTRIBUTING.md Add get-deps script for installing dependencies 2018-02-25 09:24:56 -08:00
get-deps Fix get-deps on arch 2021-01-09 15:23:38 -08:00
LICENSE.md wezterm: bundle JetBrains Mono and Noto Color Emoji fonts 2020-09-29 22:05:18 -07:00
README.md Add icon to readme page 2020-12-26 11:27:37 -08:00
wt-record make it a bit easier to consume wt-record 2020-06-12 08:51:15 -07:00
wt-replay update record/play scripts for macos 2019-03-22 20:41:50 -07:00

Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezfurlong.org/wezterm/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezfurlong.org/wezterm/installation.html

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

  • You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one: https://github.com/wez/wezterm/issues
  • Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
  • There is a Matrix room via Element.io for (potentially!) real time discussions; that is bridged from the original Gitter room that has some longer term users and older discussions.

The GitHub Discussions and Element/Gitter rooms are better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.