Instead of writing (and logging errors for) every parameter, one at a
time, send all fixed size data in a single struct, followed by all the
variable length data.
When disabled, foot no longers uses outputs’ DPI to scale the
font. Instead, it uses the outputs’ scaling factor.
That is, instead of appending “:dpi=123” to the fontconfig string,
modify the “:pixelsize” or “:size” attribute.
Closes#206
When checking if we should allow a single-width character double-width
glyph to overflow into the next cell, require the next cell to either
be empty, or contain a space.
Closes#203
All alt+return combos mapped to the same escape sequence as alt+return
itself.
With this patch, alt+<mod(s)>+return map to a standard ‘CSI 27;x;13~’
sequence.
With XKB, Shift+Tab maps to XKB_KEY_ISO_Left_Tab, not
XKB_Key_Tab. Previously, we had two different lookup tables for the
two.
The tab table was correctly populated, while the ISO-left tab
wasn’t. As a result, all Shift+Tab combos (except Shift+Tab itself)
was wrong, and resulted in the same escape sequence as Shift+Tab.
Fix by using the same table for both tab and ISO-left tab.
Closes#210
* New function: rgb_to_hsl()
* New function: hsl_to_rgb()
* Replace XTerm’s hls_to_rgb() with our own, hsl_to_rgb().
* Ensure hue/lum/sat values are within range before calling
hsl_to_rgb()
Note that sixels’ use the following primary hues:
* blue: 0°
* red: 120
* green: 240°
While “standard” HSL uses:
* red: 0°
* green: 120°
* blue: 240°
Thus, we need to adjust the sixel’s hue value before calling
hsl_to_rgb().
Up until now, we’ve always re-rendered the entire image (the part of
it that is visible at least), *every* time we render a frame.
This is not really needed. In many cases, the cells covered by the
image hasn’t been touched.
Rewrite the sixel rendering code to only render the part of the sixel
image that covers dirty cells.
This is done on a per-row basis. I.e. Each *row* of the image that
covers at least one dirty cell is re-rendered. For this to work, we
now also dirty all cells covered by the image when we emit the image.
Finally, for this to work, the sixels need to be rendered *before* we
do the normal grid render pass (since that will clear all dirty bits).
When num lock override has been enabled via “CSI?1035h” (the default),
keypad is always considered to be in ‘numerical’ mode.
This affects how keypad keys are translated to escape sequences when
Num Lock is active.
The keypad has four modes:
* Num Lock off, numerical mode
* Num Lock off, application mode
* Num Lock on, numerical mode
* Num Lock on, application mode
The keymap is identical for numerical and application mode when Num
Lock is off, meaning the keypad effectively has three different modes.
In XTerm, numerical and application mode _can_ be the same, **if** the
‘numLock’ resource is set to true (the default). It is only when
‘numLock’ is false that the application mode is actually used.
This patch changes foot to do the same. We don’t expose an option, but
do implement “CSI ? 1035”.
Closes#194
A configure event must be “committed”. In case of resizing, that means
rendering a new frame and committing that surface.
render_resize() will resize the grid and *schedule* a render
refresh. However, if one is already pending, the refresh will take a
very (relatively) long time - until the next frame callback is
received.
This poses a problem when the window is hidden, since in this case,
the frame callback *never* comes. This in turn means we fail to commit
a new surface in response to the ‘configure’ event. And that means the
compositor needs to wait for a transaction timeout before continuing.
The end effect is very slow and jerky window resizing when a hidden
foot window is being resized.
This can happen in tiled compositors, like Sway, where a window can be
tabbed (and thus invisible), but still resized when its container is
resized.
Closes#190
- zsh doesn't like "export var+=value", make it two steps
- meson was complaining with "ERROR: Must specify at least one directory name.", so add the relative "../.."