Commit Graph
487 Commits
Author SHA1 Message Date
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
Wez Furlong a44607fb3f with_window inner from FnMut -> FnOnce
Not sure why it was FnMut, but this tidies up an awkward
option/take/unwrap thing in notify().
2021-05-08 09:36:19 -07:00
Wez Furlong fb72338689 window: macos set gl layer placement to top-left 2021-05-08 09:36:19 -07:00
Wez Furlong 89dfeb69d6 tweak message pumping around paint on win32
It's not perfect; the revised code won't repaint immediate during
resize which can make the window a little "wobbly" during resize.
2021-05-08 09:36:19 -07:00
Wez Furlong 630d9d215b fixup build on windows
and correct the notify same thread optimization on unix
2021-05-08 09:36:19 -07:00
Wez Furlong 0f384b5c06 make window.notify more efficient on unix
avoid going through an extra queue if we already are in the right place
2021-05-08 09:36:19 -07:00
Wez Furlong 9fd04f6024 fixup linux build 2021-05-08 09:36:19 -07:00
Wez Furlong 5d037eae52 adjust gui layer for window changes 2021-05-08 09:36:19 -07:00
Wez Furlong 4d73448387 window: fixup build for macos 2021-05-08 09:36:19 -07:00
Wez Furlong fe836da980 window: fixup build on windows 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
Chris 2add312c5c Allow VoidSymbol keycode to be seen by wezterm (#759)
* allow voidsymbol for key code

* update docs, cleanup

* cleanup and fmt of files

* remove unnecessary inputs
2021-05-07 07:54:24 -07:00
Wez Furlong e400f2f524 fixup build on windows
refs: https://github.com/wez/wezterm/issues/695
2021-05-03 21:40:20 -07:00
Wez Furlong b2b0b8b011 fixup build on linux
refs: https://github.com/wez/wezterm/issues/695
2021-05-03 21:09:08 -07:00
Wez Furlong 0df755b8f0 window: set_inner_size now returns Future<Dimensions>
This should help us reason about whether a resize respected
our request.

This may break linux and windows builds, will fixup once
this is pushed.

refs: https://github.com/wez/wezterm/issues/695
2021-05-03 20:49:22 -07:00
Wez Furlong 772991a1f0 window: remove WindowOpsMut trait
It doesn't serve any purpose and makes it awkward to make
a change in a later commit.

refs: https://github.com/wez/wezterm/issues/695
2021-05-03 20:26:33 -07:00
Wez Furlong e4d45de9ec cargo fmt 2021-05-02 12:59:31 -07:00
Wez Furlong 6a5582f45a fixup tests for new_window async change 2021-05-02 12:43:00 -07:00
Wez Furlong 6919630810 refactor: new_window is now async
This doesn't really change anything, but it makes it a little
simpler to integrate wgpu in a later commit.
2021-05-02 12:05:28 -07:00
Wez Furlong 45262c3091 macos: fix numpad enter key reporting
refs: https://github.com/wez/wezterm/issues/739
2021-04-27 07:39:10 -07:00
Wez Furlong ff7f097fb9 macos: fix "reflected" mouse x coordinate values
We were getting abs() of the backing-rect-adjusted value, so we need to
restore the sign to avoid what should be logically cell position "-1"
being treated as cell position "1" and so on.

With this change, the logic in the gui layer successfully clamps the x
coordinate to zero when trying to drag left off the window.
2021-04-23 18:31:44 -07:00
Wez Furlong aea4fd5020 macos: ensure window is always miniaturizable
We need to keep the miniaturizable flag in even when there is no
titlebar, otherwise the miniaturize action has no effect.
2021-04-15 18:12:14 -07:00