When handling keys without a specific map defined (i.e. keys
corresponding roughly to xterm's "otherKeys"), recognize the meta
modifier and report the correct modifier code.
*All* glyphs are cached.
But we never set the 'wc' member of failed glyphs, causing a later
cache lookup of the same glyph miss in the cache, and thus re-generate
yet another glyph (that is inserted into the cache). I.e. if the
same (invalid) glyph is rendered over and over again, we'll end up
growing the cache indefinitely.
Fix by setting the 'wc' member of invalid glyphs. This causes a cache
lookup to hit. But, we must also check the glyphs validity, and return
NULL if the glyph isn't valid.
Finally, when destroying a font, skip invalid glyphs, since they have
no resources that needs to be freed.
Our surface may be on multiple outputs at the same time. In this case,
we use the largest scale factor, and let the compositor down scale on
the "other" output(s).
When rendering either the 'bar' or 'underline' cursor styles, only use
the configured "cursor color" if it has actually been configured.
If it hasn't, use the current foreground color.
When we've exhausted our own fallback list, try the font list provided
by fontconfig.
This means, the user's fallback fonts have priority, but in case all
of them fail, we hopefully get lucky with fontconfig...
And handle read() returning EAGAIN.
This fixes an issue with the keyboard repeat timer, which sometimes
would return EAGAIN.
Most likely because POLLIN was set on it, but then before we get to
handle it, the timer was canceled (by a key up event).
If we scroll enough, we'll eventually end up wrapping around the
entire scrollback buffer. At this point, a selection is no longer
valid, so cancel it.
Note: this was very obvious when scrolling in the alt screen, since
its scrollback buffer is what you see on the screen (i.e. it has no
scrollback).