Commit Graph
90 Commits
Author SHA1 Message Date
Wez Furlong feaad96069 add some comments 2018-03-03 16:13:20 -08:00
Wez Furlong 7a5ba82fa9 cleanup some Drops 2018-03-03 15:50:02 -08:00
Wez Furlong ce8de2ca03 use futures to manage closing a window 2018-03-03 15:48:36 -08:00
Wez Furlong f1db5dac40 clippy 2018-03-03 13:00:56 -08:00
Wez Furlong b945db3bdd migrate sigchld handling to GuiSender 2018-03-03 11:18:51 -08:00
Wez Furlong ebc4eaab36 move paste over to GuiSender 2018-03-03 11:07:27 -08:00
Wez Furlong 00b45ce350 begin stitching the new mio bits into the gui loop 2018-03-03 10:51:55 -08:00
Wez Furlong 7f5991028b refactor pty thread bits into a more generic remote mio 2018-03-03 09:29:41 -08:00
Wez Furlong 048a6403bc Start building out future executor 2018-03-03 08:14:34 -08:00
Wez Furlong a9c2578719 more event loop restructuring 2018-03-03 07:30:36 -08:00
Wez Furlong 40bd58b086 move event processing into its own method 2018-03-02 09:02:03 -08:00
Wez Furlong a8d2472d29 refactor event loop into its own struct 2018-03-02 08:53:38 -08:00
Wez Furlong 377135a71c more shutdown cleanup
We don't print so many stack traces on shutdown, and we now properly
join our threads.

Need to improve how we handle DelPty though.
2018-03-01 23:27:24 -08:00
Wez Furlong e1001ca289 tidy up session close handling
Return a discrete Fail type for process termination and window
close events.  Handle those a bit more cleanly; when we see that
they've gone, remove things from the maps that we've built.
When there are no more windows left, wind down the event loop.
2018-03-01 22:56:07 -08:00
Wez Furlong 34cc57ceea factor out the pty reading thread 2018-03-01 22:17:05 -08:00
Wez Furlong 6e98b10027 more plumbing to route window events 2018-03-01 21:33:49 -08:00
Wez Furlong 44694fec95 Start building out plumbing for mutiple windows 2018-03-01 21:02:25 -08:00
Wez Furlong 60e89f6328 Fix latency issue with clipboard/selection handling
We now use mio to select on both the xcb connection and the
channel that we're using to bridge the threads.
2018-02-27 23:56:20 -08:00
Wez Furlong 981d939298 More gracefully handle running out of texture space
I manually checked this by setting TEX_SIZE to a small value
and watching the log reallocate progressively larger sizes.
2018-02-24 23:05:20 -08:00
Wez Furlong abc06620b8 add support for implicit hyperlinks 2018-02-24 15:43:02 -08:00
Wez Furlong 478c64e05e Parse command line arguments
We can now run something other than the shell.
2018-02-23 08:41:46 -08:00
Wez Furlong 9673c8c1b7 roll back bundling of harfbuzz
This will likely break travis; I'll follow up with something to help with that.

Refs: https://github.com/wez/wezterm/issues/1
2018-02-22 21:07:17 -08:00
Wez Furlong 6232ebf1c6 make refresh rate more regular 2018-02-22 14:34:57 -08:00
Wez Furlong 42323a5be8 plumb clipboard stuff into the wakeup stuff 2018-02-22 09:02:01 -08:00
Wez Furlong 79ebf717e8 provide a more targeted channel for wakeups
This allows using the mio poll timer as the signal for drawing
frames, rather than always drawing them after each byte is read
from the pty.   We're using 50ms as the frame interval at the moment.
2018-02-22 01:44:07 -08:00
Wez Furlong f6a95aafcf use less cpu while idling
This does mean that we paint more frequently (basically after every
read from the pty), so our perf for large files is down.
2018-02-22 01:15:28 -08:00
Wez Furlong ac7d2a9cda simplify child waiting 2018-02-22 00:35:51 -08:00
Wez Furlong 6f3b6d7018 remove unused x11 dep 2018-02-22 00:19:12 -08:00
Wez Furlong bd4e745380 go all-in on glutin and remove my own xcb based code 2018-02-22 00:18:10 -08:00
Wez Furlong 8cb8d7d613 wire up sigchld 2018-02-21 23:51:52 -08:00
Wez Furlong df0e85abaf hook up input events for glutin 2018-02-21 23:37:19 -08:00
Wez Furlong d876d23a28 stub for a glutin based window
It can render the terminal but doesn't handle input of any kind.
2018-02-21 00:16:03 -08:00
Wez Furlong c39dbdc356 stubs for macos font loading 2018-02-20 22:33:09 -08:00
Wez Furlong a7f2757452 rustfmt update 2018-02-20 22:08:19 -08:00
Wez Furlong dd4c9d6683 refactor the font loading code
This is the first step towards making this code more system independent.
2018-02-20 19:53:50 -08:00
Wez Furlong e2529d1837 Move opengl code into its own module 2018-02-20 15:46:05 -08:00
Wez Furlong 4efef794fe move Renderer to its own file
It is now independent of the X11 code
2018-02-20 15:43:42 -08:00
Wez Furlong e1cd44922f move x11 code around
idea is to reduce the cfg attributes and make it easier to
split into system dependent renderers
2018-02-20 15:02:39 -08:00
Wez Furlong 5a99dd143c move hbwrap into harfbuzz crate 2018-02-20 14:32:28 -08:00
Wez Furlong fe1ae0b7eb Be more particular about platform deps 2018-02-20 14:17:28 -08:00
Wez Furlong e7d99024bb build our own harfbuzz for broader compat 2018-02-20 12:33:30 -08:00
Wez Furlong e6f42987ca remove another unused crate 2018-02-20 07:41:19 -08:00
Wez Furlong 1607ba4443 Add untested code for managing a texture atlas 2018-02-17 20:37:07 -08:00
Wez Furlong 20965e786f start hacking on OpenGL ES2 rendering 2018-02-16 21:44:56 -08:00
Wez Furlong 6af3b63d57 make scrollback size configurable 2018-02-10 09:43:54 -08:00
Wez Furlong 3075e47c89 Allow configuring colors 2018-02-10 08:16:20 -08:00
Wez Furlong 4ce67c7f9a Use the palette crate for blending
I wasn't pleased with how text was rendering on a colored background,
and after some research I discovered that I was neglecting to convert
from sRGB to a linear RGB colorspace, and that this was causing the
blending to have inaccurate results.

This diff pulls in the palette crate to handle the heavy lifting.
It doesn't appear to have any especially fast optimizations for this
though, which is a shame because the blending code I was using
previously was largely integer math with few branches.  The colorspace
conversion has several floating point operations and branches that
are unavoidable :-/

We run a bit hotter on the CPU but the results are much more pleasing
to the eye.
2018-02-09 23:32:35 -08:00
Wez Furlong edd5911535 Add a small font styling engine
This enables selecting an italic font when the cell is italic,
but has more power beyond just that simple property.

This runs a little hot on the CPU so there's probably some caching and
tweaking that can be done to make the evaluation a bit cheaper.
2018-02-07 09:23:24 -08:00
Wez Furlong 7ade4434fe Add basic config file parsing
So that we no longer assume Operator Mono SSm.
We now default to `monospace`.  I just tried this and the font metrics
appear to be wonky, so there's some tweaking to do.
2018-02-07 07:51:04 -08:00
Wez Furlong 401530a899 lookup the $SHELL for the user rather than assume zsh 2018-02-06 22:48:28 -08:00