This removes some awkwardness in the impl by allowing casting
to a concrete implementation. This is a pattern I want to use
more widely and this diff proves the concept.
When enabled, the windows version will use winpty rather than conpty.
This potentially allows running on older windows versions but has
a few caveats:
* Requires winpty.dll and winpty-agent.exe be in the PATH
* The initial screen / cursor position looks funky for me with the
latest release of winpty, but that is from a couple of years ago
* Mouse reporting doesn't work, perhaps for the same reasons that
it isn't working in conpty.
I want to make this into a runtime selectable feature before tidying
up the installation aspects; we need that plumbing anyway to be
able to select between local and remote mux'd tabs.
This is primarily for macos where the default freetype
installation is unable to render color emoji, but should also
help make things more consistent across the various platforms.
It's a little bit awkward on linux because the font-loader crate
pulls in the now-conflicting servo-font* crates. I've disabled
font-loader on linux systems; it's just calling fontconfig under
the covers anyway.
Reduces the size of the full screen serialized size from 40k -> 13k.
Note that the `zlo` crate (which doesn't appear to have a repo
on github any longer; sources are only found in the crates.io
documentation source view), employes zigzag encoding of all integers
and floating point values and takes the size down to just under 10k.
A todo is to follow up on that and see if we could adopt the same
scheme in varbincode.
The `directories` crate unconditionally and eagerly tries to spawn
`xdg-user-dir` for all possible directories that it might be asked
about. This is relatively expensive and undesirable.
Shift to the `dirs` crate instead, which doesn't seem to need
to run `xdg-user-dir` at all.
Maintain these probed dirs as singletons via lazy_static.
Remove detailed xcb select event hack
Only remove consumed "mod5" for now
which is AltGr.
Get actual modifiers from xkb.
it should enable 1:1 match with user's xmodmad
[clippy] allow keys deadcodes
handle mods & keys separately. Allows passing down `ctrl+2`
state.key_get_utf8 will interpret ctrl+2 (or @, space, ~) to 'ctrl \u{0}'
no need to wait for events.
+ Send delete as enum variant not by char value
Hook XKeysym to termwiz::KeyCode
prefer dealing with chars instead of utf8
Actually this breaks multi unicode characters .. such as J́
Others can be found with
perl -lane '/"\s+#/ && print' < /usr/share/X11/locale/en_US.UTF-8/Compose
Anyway we will need to return a Vec of chars for those.
cleanup
apply rustfmt
query locale via libc
This removes some tricksy code in favor of a third party crate,
which unlocks the clipboard on windows. I'm not sure how well
this will work on the pure x11 impl yet.