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

508 Commits

Author SHA1 Message Date
Rashil Gandhi
4ad9f10f9f Remove hardcoded logic for titlebar color 2021-07-17 11:26:16 -07:00
Wez Furlong
ce1a05d9bd window: add some trace logging
refs: #949
2021-07-17 08:37:04 -07:00
Wez Furlong
5c4fb92b87 fixup wgpu example 2021-07-11 12:46:23 -07:00
Wez Furlong
77c5acaaf5 fixup tests on macos 2021-07-10 19:01:20 -07:00
Wez Furlong
37ec16329e fixup tests + wayland bits 2021-07-10 18:07:16 -07:00
Wez Furlong
cc2b9507f8 fixup build on windows 2021-07-10 17:52:14 -07:00
Wez Furlong
6aa575d838 fixup build on macos 2021-07-10 17:42:05 -07:00
Wez Furlong
db6da81272 window: move away from async event queue
I added this originally thinking that it would make it easier to resolve
https://github.com/wez/wezterm/issues/695 and to integrate wgpu support,
but it's the cause of https://github.com/wez/wezterm/issues/922 so let's
take it out and more directly connect the window events to those in the
terminal.

This commit likely breaks mac and windows; pushing it so that I can
check it out and verify on those systems.
2021-07-10 17:30:19 -07:00
Wez Furlong
ad19b4f57b window: de-Future most of the WindowOps methods 2021-07-10 17:30:19 -07:00
Wez Furlong
cd1f7b1784 x/wayland: remove Mod3 -> SUPER mapping
I'm not sure where this came from in its originating commit
(05a60e6e8b), but it is inconsistent with
the reverse mapping function added in that same commit:
05a60e6e8b/window/src/os/x11/xkeysyms.rs (L3)

It is causing problems in https://github.com/wez/wezterm/issues/933
and is rarely used by default, so it seems safe to just remove
this mapping.
2021-07-10 08:04:28 -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
8ecfdb618f wayland: disambiguate Event type 2021-06-27 16:23:03 -07:00
Wez Furlong
46476f2eec wayland: remove unused code
This stuff was added because the underlying types lacked Debug
and Send. They've since added those impls and we don't need this
layer.
2021-06-27 16:01:26 -07:00
Wez Furlong
37a57e8a41 wayland: refine event loop 2021-06-27 15:13:41 -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
c514254138 wayland: use proportional font for title bar
allow specifying the font in the config file
2021-06-27 13:04:20 -07:00
Wez Furlong
ca8209b230 wayland: move frame color config to the config file
This simplifies it a bit and exposes the config via the config file;
the following options are possible, each one specifies a color

```lua
return {
  window_frame = {
    inactive_titlebar_bg = "",
    active_titlebar_bg = "",
    inactive_titlebar_fg = "",
    active_titlebar_fg = "",
    inactive_titlebar_border_bottom = "",
    active_titlebar_border_bottom = "",
    button_fg = "",
    button_bg = "",
    button_hover_fg = "",
    button_hover_bg = "",
  }
}
```

refs: https://github.com/wez/wezterm/issues/761
2021-06-27 12:33:56 -07:00
Wez Furlong
7f04c4601a window: fixup tests for font config changes 2021-06-26 22:58:42 -07:00
Wez Furlong
282c148bf6 wayland: render title with our font layer when doing CSD
This isn't perfect by any means:

* Should allow configuring a sans-serif font
* Emoji need to be scaled

but it allows us to upgrade SCTK without loosing the titlebar
or any control over client side decorations.
2021-06-26 22:58:42 -07:00
Wez Furlong
4f9532f9d8 window: plumb font config to underlying window impl 2021-06-26 22:58:42 -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
2fc143e6dd click to focus window now focuses the pane under the mouse cursor
refs: https://github.com/wez/wezterm/issues/881
2021-06-26 15:24:17 -07:00
Wez Furlong
4c0d789ac3 zeno -> tiny_skia
Mostly so that we can turn off anti-aliasing for smaller sizes,
but it also happens to be more complete anyway.
2021-06-25 22:55:42 -07:00
Wez Furlong
a514adfec0 windows: avoid ctrl normalization in the common case
in https://github.com/wez/wezterm/issues/767 CTRL-Tab was getting
incorrectly normalized to CTRL-i; that normalization is valid (Tab is
actually equivalent to CTRL-i as far as unix terminals are concerned)
but unwanted at this layer.

I suspect that this change will come back to haunt me in the future,
as keyboard input is a bit of a zoo.
2021-05-29 10:23:41 -07:00
Wez Furlong
030e517b43 deps: metrics 0.15 -> 0.16, cargo update 2021-05-24 07:57:03 -07:00
Wez Furlong
18ae2ccc8e window: log/retry self-pipe-writes
At the bottom of https://github.com/wez/wezterm/issues/815 is some
discussion about an apparent hang.

Let's make the self pipe writing a bit more robust and log to see
if that might be related.
2021-05-23 19:07:48 -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
5f5a48c830 tidy up log levels for wgpu 2021-05-09 10:59:48 -07:00
Wez Furlong
7cfbd133ac fixup warning in wgpu example 2021-05-09 08:20:03 -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
35351a97b4 x11: don't need to ref gl context in window any more
This is now managed by the client application
2021-05-08 15:05:07 -07:00
Wez Furlong
5f59bf25be window: tidy up infinite sleeps
refs: #770
2021-05-08 14:58:07 -07:00
Wez Furlong
4c847ff4ff window: remove now-dead bits on macos
refs: #770
2021-05-08 14:12:30 -07:00
Wez Furlong
5f612c17f5 windows: remove some now-dead code
refs: #770
2021-05-08 13:04:59 -07:00
Wez Furlong
7d301b91a7 x11/wayland: reduce frequency of core event loop
In an earlier incarnation we needed to wake up more often to paint,
but we now should have reliable event sources for all of the
invalidation cases and we can thus sleep for much longer in
the main event loop.

refs: #770
2021-05-08 12:59:33 -07:00
Wez Furlong
a884021074 window: remove Connection::schedule_timer
smol's Timer is used to replace this concept

refs: #770
2021-05-08 12:38:34 -07:00
Wez Furlong
325e755216 window: don't propagate errors from close notif channel
When a window is being destroyed we expect the receiver end
to be disconnected, so we don't want to break out of the
message loop if a couple of residual windows fail to notify.
2021-05-08 10:20:26 -07:00
Wez Furlong
453cfc1813 avoid a panic during shutdown 2021-05-08 09:36:20 -07:00
Wez Furlong
e81fb6e721 make alpha work on macos 2021-05-08 09:36:20 -07:00
Wez Furlong
0503abc63a fixup build on windows, make transparent 2021-05-08 09:36:20 -07:00
Wez Furlong
655eef271f fixup build on macos 2021-05-08 09:36:20 -07:00
Wez Furlong
058c3f612f add wgpu example 2021-05-08 09:36:19 -07:00
Wez Furlong
f4939c510b impl raw window handle on Window 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
3d760653b4 window: macos: disable window restoration 2021-05-08 09:36:19 -07:00