1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-26 16:34:23 +03:00
Commit Graph

94 Commits

Author SHA1 Message Date
Wez Furlong
e5a483ff8b window: point to re-integrated xkbcommon
refs: https://github.com/rust-x-bindings/xkbcommon-rs/pull/30
2022-05-09 17:24:20 -07:00
Wez Furlong
6484b3adc0 switch macos clipboard crate
This cleans up the `cargo audit` output on linux because the `clipboard`
crate (which hasn't been updated in 3 years) depends on xcb=0.8.2
which is flagged by cargo audit.

We don't use `clipboard` on any platform except macos

This commit switches to the `clipboard_macos` crate; that appears to
use a copy and paste of the macos specific code from the `clipboard`
crate, so this shouldn't have any change in functionality.

refs: https://github.com/wez/wezterm/issues/1952
2022-05-08 21:11:39 -07:00
Wez Furlong
4b018f564a window: point to my xcb for for IME changes
refs: https://github.com/rust-x-bindings/rust-xcb/pull/190
refs: https://github.com/H-M-H/xcb-imdkit-rs/pull/2
2022-05-08 14:02:25 -07:00
Wez Furlong
0a0a1004eb fixup for imdkit changes 2022-05-08 11:53:47 -07:00
Wez Furlong
b365cdbb94 deps: x11 to 2.19 2022-05-07 14:55:08 -07:00
Wez Furlong
abc42f7bcb window: deps: upgrade to xcb 1.1
Was a bit fiddly.

Eliminated the xcb_util crate

refs: https://github.com/wez/wezterm/issues/1952
2022-05-07 14:52:16 -07:00
Wez Furlong
745bf24d87 deps: upgrade to mio 0.8 2022-05-04 20:16:41 -07:00
Wez Furlong
d64bc7248e pty: pre-fill base env from registry env settings on Windows
I think I'd like to make a config option for this, but for the moment,
this first pass unconditionally updates the base environment with
data from the registry.

refs: https://github.com/wez/wezterm/issues/1848
2022-04-19 09:56:23 -07:00
Wez Furlong
b35e3b2aad deps: remove pretty_env_loggger
Go directly to the underlying env_logger crate, as pretty_env_logger
hasn't been updated in some time, and I'd like to be able to redirect
the log output to a file more directly, and that feature is in a newer
version of the env logger than pretty_env_logger was pulling in.
2022-04-07 08:24:07 -07:00
Wez Furlong
6c5e54c47e deps: unpin glium from git, use latest release
We were pinned on the revision where I had added dual source blending,
because I wanted that feature ahead of the crate being published.

Since then a couple of releases have been made so we can unpin.

On Windows 11, we had a report of glium complaining about the opengl
version. I can't find that error message string in the current version
of the code so it's possible that that situation has been resolved.

refs: https://github.com/wez/wezterm/issues/1813
2022-04-04 06:54:49 -07:00
Wez Furlong
e95707fe70 flesh out % based and named display for positioning on X11
refs: #1794
2022-04-02 22:45:13 -07:00
David Rios
b036bb3b05 Improve RESIZE window_decoration on Windows 2022-03-26 07:27:54 -07:00
Wez Furlong
240026de48 refactor: move color parsing into wezerm-color-types crate
Resolves a little bit of the awkward duplication of color types
between some of the crates by factoring them a little bit better.

This is prep for allowing specifying alpha for some colors
in the config.
2022-02-05 13:59:54 -07:00
Wez Furlong
8cfad0455c fix build on linux
refs: https://github.com/wez/wezterm/issues/784
2022-01-25 09:27:01 -07:00
Wez Furlong
1dc5af5e69 x11: ime: enable pre-edit callbacks to show compose status
This also adjusts the IME position so that it doesn't obscure
the composition status.

refs: https://github.com/fcitx/xcb-imdkit/issues/9
2022-01-05 15:36:20 -07:00
Wez Furlong
30a390053a window: track phys_code on X11/Wayland
We don't do anything useful with it yet

refs: https://github.com/wez/wezterm/issues/1483
2022-01-02 00:47:04 -07:00
Wez Furlong
96dd41c5c5 window: update smithay-client deps 2021-12-28 07:28:07 -07:00
Wez Furlong
f9ce727281 remove wgpu from window test deps
We don't use this and all it really does it make `cargo test`
take longer
2021-11-23 05:39:07 -07:00
Wez Furlong
f09d747f14 window: use released xcb-imdkit crate
refs: #250
2021-08-23 09:09:45 -07:00
Wez Furlong
5629e0c1ca deps: tiny-skia -> 0.6 2021-08-23 07:48:13 -07:00
HMH
6404099d25
IME support on X11 (#1043)
* WIP: IME support for X11

* Handle text generated by IME.

* Set IME position according to the cursor position.

* Improve IME position handling.

Geometry as well as window focus changes are now handled.

* Dispatch IME strings like it's done on windows.

* Make sure not to silently drop IME errors.

* Respect `use_ime` configuration.

* Add xcb-util as dependency.

* Only update IME position if necessary.

* Formatting.

* Update xcb-imdkit-rs.

* Set IME position under the start of the cursor.

This seems to be the way it is commonly done among gui frameworks.
(Tested with Firefox for GTK and Konsole for QT).

* Update xcb-imdkit-rs.

* Handle systems only providing libxcb-util0-dev.

* Add libxcb to freebsd dependencies.

Required by xcb-imdkit-rs.

* Update xcb-imdkit-rs.

* Try to use more recent gcc on centos7.

* More recent C++ compiler on centos7 as well.

* Also setup correct env on centos7 for tests.
2021-08-19 20:51:56 -07:00
Wez Furlong
ab21910d80 deps: update bitflags -> 1.3 2021-08-15 18:21:17 -07:00
Wez Furlong
ee71d478c4 window+gui: enable dual source blending
This replaces the slightly gnarly subpixel enabled blending in the
shader with Dual Source Blending, which is a technique where the
fragment shader can specify both the primary color (RGBA) as well
as an additional per-channel mask that can be used to alpha blend
with the destination.

This enables artifact-free alpha blending when used together
with a transparent window background.

refs: https://github.com/wez/wezterm/issues/932
2021-08-10 18:23:18 -07:00
Wez Furlong
a2e882a7cb deps: cargo update, and a couple of dependabot suggestions 2021-07-18 19:10:46 -07:00
Wez Furlong
a697b30223 window: add xsettings support on X11 systems
This allows reading xsettings which contain information about
both the active theme as well as the DPI.

refs: #947
2021-07-18 12:54:52 -07:00
Wez Furlong
fc4c165ca3 window: update wgpu -> 0.9
This is still used only in an example
2021-07-09 20:37:34 -07:00
Wez Furlong
0a00ffe98b wayland: fix key repeat
The main culprit was the calloop feature that is used by default
in the underlying SCTK crate.

This commit:

* Routes keyboard processing via the same keyboard mapping code
  that we use for X11
* Implements key repeats directly, and with awareness of elapsed
  time in case the repeat rate is quicker than the event dispatching
  quantum
* Disables the calloop feature of SCTK and let us do our own polling
  of the wayland connection.

Critically, key repeat is sticky and unpredictable while calloop is
enabled.

closes: #669
2021-06-27 14:29:03 -07:00
Wez Furlong
e69869efa7 refactor deps so that window can depend on wezterm-font
I want to use this to render the font in the title bar
2021-06-26 22:58:42 -07:00
Wez Furlong
d04486f30a wayland: replace andrew with tiny_skia
This has the consequence of removing the title bar text when
client side decorations are in use.
2021-06-26 22:58:42 -07:00
Wez Furlong
d1177a29c2 wayland: update to SCTK 0.14 2021-06-26 22:58:42 -07:00
Wez Furlong
355b2f5b5a wayland: import ConceptFrame impl from SCTK
This has been removed in a later version, so pull it in ahead
of updating that dependency to verify that it builds.
2021-06-26 22:58:42 -07:00
Wez Furlong
8ab025b7fc Allow building without wayland support
You can run `cargo build --release --no-default-features` to build
without wayland support.

This is useful for systems that do not have wayland (eg: the `slint`
distro).
2021-06-26 22:58:42 -07:00
Wez Furlong
030e517b43 deps: metrics 0.15 -> 0.16, cargo update 2021-05-24 07:57:03 -07:00
Wez Furlong
f78190ec9c filedescriptor: remove anyhow from public interface
Use thiserror instead
2021-05-23 14:24:01 -07:00
Wez Furlong
a59e9b1706 update metrics 0.14 -> 0.15
closes: https://github.com/wez/wezterm/pull/778
2021-05-11 19:20:24 -07:00
Wez Furlong
4e6f341f10 window: wayland support is no longer optional at build time 2021-05-08 17:48:58 -07:00
Wez Furlong
058c3f612f add wgpu example 2021-05-08 09:36:19 -07:00
Wez Furlong
c4e1f2434a add raw-window-handle impls 2021-05-08 09:36:19 -07:00
Wez Furlong
d56bfd0b7f window: separate gui window state from app state
Removes the callbacks type and replaces event dispatch with
an async capable channel.

This makes it a bit simpler to model some of the window internals,
and to prepare for a wgpu enabled future.

This changes have been tested only on linux so far.
2021-05-08 09:36:19 -07:00
Wez Furlong
b876fbabd6 remove the config bridge and have window -> config directly 2021-03-23 21:56:57 -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
21f3f90e34 x11: remove some dead code 2021-03-09 08:21:23 -08:00
Wez Furlong
aceb4933a9 x11: load XCursor.theme based cursors when available
This requires `xcb-util-image-devel` on fedora, not sure about debian
or other systems so far.

refs: #524
2021-03-08 22:00:42 -08:00
Wez Furlong
387579cfb4 use xcb-util's cursor constants 2021-03-08 08:36:31 -08:00
Wez Furlong
a14e3669f2 window: update smithay-client-toolkit
However, I'm not able to create wayland windows any more on my nvidia
system (either with or without this change).

I don't know if this is specific to my nvidia drivers or something else
:-/

refs: https://github.com/wez/wezterm/issues/476
2021-02-12 08:19:51 -08:00
Wez Furlong
d9275e110c deps: update metrics from 0.12 -> 0.14 2021-02-03 23:50:29 -08:00
Wez Furlong
4c22de9f6d window: make opengl always required 2020-12-29 12:13:23 -08:00
Wez Furlong
7cf68365a5 deps: misc updates 2020-12-29 09:24:34 -08:00
Wez Furlong
c1fa08319e deps: upgrade euclid -> 0.22 2020-12-10 10:03:30 -08:00
Wez Furlong
c6334a45dd extract window::input to wezterm-input-types 2020-12-09 13:48:23 -08:00