| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| |
|
|
|
|
| |
This is used in the desktop startup notification protocol. We don't
support it (is it even used on Wayland?), but need to ensure programs
launced from within foot doesn't inherit it.
|
| |
|
|
|
|
|
|
|
|
| |
This ensures we always have a valid (but possibly incorrect) scaling
value. This allows us to simplify code that uses the scale - it
doesn't have to verify the scale if valid.
Furthermore, since render_resize() is the function that actually
updates term->scale, make sure to call it *before* updating the
cursor (otherwise, the cursor will use the old scaling value).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This makes -f,--font behave just like the configuration file option
'font'; the first font in the list is the primary font, and the
remaining fonts are fallback fonts used when a glyph cannot be found
in the primary font.
|
| | |
|
| |
|
|
|
|
|
| |
This fixes an issue where sometimes the strikeout thickness where
truncated to 0 (e.g. Cascadia Code).
Note that we already do this for the underline calculations.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now use two timers for delayed rendering; one _lower_ limit timeout
that is reset each time we receive input from the slave. We never
render *before* this timeout. Since it's reset, this means rendering
may be pushed further into the future.
To prevent this from happening indefinitely, the second timer defines
the _upper_ limit. This timer is only reset after rendering.
Thus, slave input may now increase the rendering delay, but only up to
a certain limit.
The lower limit is as before, 1ms. The upper limit is set to 16ms (the
time between frame updates on a 60HZ output).
|
| |
|
|
|
|
| |
This ensures we never wait *longer* than 1ms (previously, we could end
up doing multiple polls, each with a timeout value of 1ms - thereby
potentially delaying the refresh indefinitely).
|
| |
|
|
|
|
|
|
| |
Thus, when we call render_resize() with *old* with/height values, we
must scale them back to their original values.
This fixes an issue where, for example, moving a window between
outputs with different scales caused the window to keep growing.
|
| | |
|
| |
|
|
|
|
| |
Create the sub-surface once, at startup. Then, instead of destroying
it when committing/cancelling a search, unmap it (by attaching a NULL
buffer to it).
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This complements the INFO logs from the renderer when the terminal is
resized.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
That is, remove the 'regular' and 'bright' color arrays. This is
possible since the 256-color array is defined such that the first 16
colors map to the regular and bright colors.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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).
|
| | |
|
| |
|
|
|
|
| |
* Not updated run-time; only scale at start up used
* Multiple monitors (outputs) not supported, as we can't track which
output we're on (yet).
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of running a repeater thread that writes the key to repeat
over a pipe, use a simple timer fd.
No more locking or condition signalling. No need to track
start/stop/exist states.
We simply set up the initial timeout value to be the 'delay', and the
interval to be the repeat 'rate'.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fonts are now loaded with FT_LOAD_COLOR and we recognize and support
the FT_PIXEL_MODE_BGRA pixel mode.
This is mapped to a CAIRO_FORMAT_ARGB32 surface, that is blitted
as-is (instead of used as a mask like we do for gray and mono glyphs).
Furthermore, since many emojis are double-width, we add initial
support for double-width glyphs.
These are assumed to always be utf8. When PRINT:ing an utf8 character,
we check its width, and add empty "spacer" cells after the cell with
the multi-column glyph.
When rendering, we render the columns in each row backwards. This
ensures the spacer cells get cleared *before* we render the glyph (so
that we don't end up erasing part of the glyph).
Finally, emoji fonts are usually bitmap fonts with *large*
glyphs. These aren't automatically scaled down. I.e. even if we
request a glyph of 13 pixels, we might end up getting a 100px glyph.
To handle this, fontconfig must be configured to scale bitmap
fonts. When it is, we can look at the 'scalable' and 'pixelsizefixup'
properties, and use these to scale the rendered glyph.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A top-level font now has a list of fallback fonts. When a glyph cannot
be found, we try each fallback font in turn, until we either find one
that has the glyph, or until we've exhausted the list.
To make this actually work in practise (read: to make performance
acceptable), the cache is re-worked and is now populated on demand.
It also supports non-ASCII characters, by using the 4-byte unicode
character as index instead.
Since having an array that can be indexed by a 4-byte value isn't
really viable, we now have a simple hash table instead of an array.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch takes a bit from the foreground color value in a
cell (todo: split up foreground/background into bitfields with a
separate field for 'foreground/background' has been set), and only
re-renders cells that aren't marked as clean.
Note: we use a 'clean' bit rather than a 'dirty' bit to make it easy
to erase cells - we can (keep doing) do that by simply memsetting a
cell range to 0.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This improves the scroll experience with certain devices
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default is to reverse the foreground/background colors in the cell
with the cursor.
But, if the user configures a specific set of cursor colors, those
will always be used, regardless of other cell attributes (dim, reverse
etc).
The cursor color is specified as two color values, 'text' and
'cursor'.
The block cursor uses the 'cursor' color as background, and the 'text'
color for the glyph.
All other cursor styles uses the 'cursor' color for the cursor, but
uses the cell's foreground color for the glyph (meaning,
dim/reverse/etc applies).
|
| |
|
|
|
|
|
|
| |
According to the specs, \E[0 q means a blinking block cursor. However,
since it also states that \E[1 q *also* is a blinking block cursor,
and that it is the default, *and* given that fact that parameter-less
CSIs typically means "reset", let's make it mean "reset to the user
configured cursor style".
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Use our own escape sequence for the 'flash' terminfo entry.
Implemented by arming a timer FD and setting a boolean that indicates
we're currently "flashing".
The renderer draws a semi-transparent yellowish layer over the entire
window when "flashing" is active.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
22;0|1|2t pushes the current window title/icon to the stack, while 23
pops it.
The second parameter, 0|1|2 has the following meaning:
0 - push/pop icon+title
1 - push/pop icon
2 - push/pop title
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
We now store the passthrough characters in a buffer, and call
dcs_passthrough() on unhook.
However, dcs_passthrough() doesn't do anything.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
To avoid having to re-generate glyphs, cache the glyphs.
For now, we only cache ASCII characters, as this allows us to lookup
the cache by simply indexing with the character (into a 256-entry
array).
|
| |
|
|
|
|
|
| |
* Strip whitespaces from keys and values
* Detect (and ignore) comments
* Detect syntax errors (no value specified etc)
* Error out on syntax errors and invalid keys
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This reduces the cell size, and thus improves the cache behavour
|
| |
|
|
|
|
|
| |
* Look for configuration file in (in this order):
- XDG_CONFIG_HOME/footrc
- ~/.config/footrc
* Currently supports setting the font
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Start selection on mouse button down
* Update selection on motion
* Button release cancels selection if there were no motion after start
* Renderer detects cells inside the selection and inverts their colors
|
| |
|
|
|
|
|
|
|
|
| |
The row array may now contain NULL pointers. This means the
corresponding row hasn't yet been allocated and initialized.
On a resize, we explicitly allocate the visible rows.
Uninitialized rows are then allocated the first time they are
referenced.
|
| |
|
|
|
| |
We want the timeout_ms to *not* be -1 (i.e. someone has requested
delayed rendering), while we're *not* getting client output.
|
| | |
|
| | |
|
| |
|
|
| |
This allows us to free it when exiting
|
| | |
|
| | |
|