| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| |
|
|
| |
I missed this in f3c301ee8b94c3354080695326ceedc7a3866321 when fixing
|
| |
|
|
|
| |
Instead of refusing to start foot on configuration errors, we start
and print a user-notification.
|
| | |
|
| |
|
|
|
| |
This fixes an issue where e.g. failing to initialize the Wayland
backend would leave cwd un-free:d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When resizing the font on-the-fly, we now do a complete
font-reload (this is basically what fcft_size_adjust() did anyway).
To get the correct size, we maintain the current size ourselves.
We get the initial size from the user-provided font pattern, by
converting the string to an FcPattern, and using FcPatternGet() to
retrieve both the FC_SIZE and FC_PIXEL_SIZE attributes. These
attributes are then removed from the pattern, and the pattern is
converted back to a string.
The terminal struct maintains a copy of the font sizes. These are
initially set to the sizes from the config.
When the user resizes the font, the terminal-local sizes are
adjusted. To ensure the primary and user-configured fallback fonts are
resizes equally much, convert any pixel sizes to point sizes at this
point.
When the font size is reset, we reload the font sizes from the
config (thus once again returning actual pixel-sizes, if that's what
the user has configured).
|
| | |
|
| |
|
|
|
| |
Instead, register their PIDs with the new reaper module and let it
handle them.
|
| |
|
|
|
|
|
|
| |
Use a signalfd to listen for SIGCHLD signals.
When we receive a SIGCHLD over the signalfd, reap all dead children by
looping over all registered child PIDs and call waitpid(WNOHANG) on
them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means command line parsing stops when it encounters the first
nonoption argument.
The result is that one no longer need to use '--' to ensure arguments
are passed to the shell/command, instead of parsed by foot.
That is, instead of
foot -- sh -c true
one can now do
foot sh -c true
Arguments to foot *must* go before the command:
foot --fullscreen sh -c true
|
| |
|
|
|
|
| |
This is the only locale variable we need. This ensures LC_NUMERIC in
particular remains as "C", which is needed by fcft when instantiating
new fonts.
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We now create a copy of the config for each client, and updates it
with the values passed from the client.
Since we're not actually cloning it (and e.g. strdup() all strings
etc) we can't call conf_destroy() to free it, but need to free just
the strings we've replaced.
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
|
| |
|
|
|
|
|
| |
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
Only applicable in server mode.
|
| |
|
|
| |
When specified, we don't exit when the slave/client process exits.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, we end up calling render_refresh() multiple times in
the same FDM iteration. This means will render the first update
immediately, and then set the 'pending' flag, causing the updated
content to be rendered in the next frame.
This can cause flicker, or flashes, since we're presenting one or more
intermediate frames until the final content is shown.
Not to mention that it is inefficient to render multiple frames like
this.
Fix by:
* render_refresh() only sets a flag in the terminal
* install an FDM hook; this hook loops all terminals and executes what
render_refresh() _used_ to do (that is, render immediately if we're
not waiting for a frame callback, otherwise set 'pending' flag). for
all terminals that have the 'refresh_needed' flag set.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a flag, -p,--presentation-timings, that enables input lag
measuring using the presentation time Wayland protocol.
When enabled, we store a timestamp when we *send* a key to the
slave. Then, when we commit a frame for rendering to the compositor,
we request presentation feedback. We also store a timestamp for when
the frame was committed.
The 'presented' callback then looks at the input and commit
timestamps, and compares it with the presented timestamp.
The delay is logged at INFO when the delay was less than one frame
interval, at WARN when it was one frame interval, and at ERR when it
was two or more frame intervals.
We also update statistic counters that we log when foot is shut down.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This is used when spawning the slave, to set its current working
directory just before we exec() the client.
In a regular foot instance, we set the cwd from getcwd().
In a foot server instance, each connecting client sends its cwd to the
server, and we use that.
|
| | |
|
| |
|
|
| |
Bind ctrl+shift+return to it
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This adds an optional argument to -s,--server that allows the user to
override the default socket path (XDG_RUNTIME_DIR/foot.sock).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
TODO: use actual output PPI. Question is *which* output...
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since fonts are destroyed and removed from the font cache when the
last instance is destroyed, closing the "last" terminal window in
server mode would destroy the fonts, and their glyph caches.
By instantiating the set in main, we ensure the fonts, and the glyph
caches, remain. This makes launching new terminals (much) faster.
Note that in "normal" (non-server) mode, this isn't really necessary,
but also doesn't have any penalty.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Since fonts are cached, this adds no additional memory. However, it
makes the first terminal window in --server mode start much faster,
since the (primary) fonts have already been loaded.
Fallback fonts are still loaded on-demand.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
In this mode, foot listens on a UNIX socket and creates terminal
windows when clients connect.
A connecting client sends argc/argv to the server, and the server
instantiates a new terminal window.
When the terminal window is closed, the exit code is sent back to the
client.
|
| | |
|
| |
|
|
| |
main uses this to get the exit code of the terminal.
|
| |
|
|
| |
This allows us to remove that call from the main event loop.
|
| | |
|
| |
|
|
|
| |
The wayland 'term' member is gone and replaced by a list,
'terms'. This list contains all currently running terminal (windows).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Wayland instantiation is now done by the wayland backend, not in main.
|
| |
|
|
|
|
| |
We do however need access to it, so provide a pointer. The difference
is that now we can have a *single* wayland instance, but multiple
terminal instances.
|
| | |
|
| |
|
|
|
| |
Instead of passing the terminal to the wayland callbacks, pass a
'struct wayland' pointer.
|
| |
|
|
|
| |
This can, in the future, be extended to e.g. a list, to support
multiple windows.
|
| | |
|
| | |
|
| |
|
|
| |
These are application global and very wayland specific
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Short term, we want to break out the wayland backend from the terminal
struct. Long term, we might want to support multiple windows.
One step towards both the above is separating global wayland objects
from per-window objects.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
run_command() was only run at configure time, meaning the generated
version (that was passed on to the sources via -DFUZZEL_VERSION)
became stale.
Fix by implementing a shell script that generates a header file, and
wrap this in a custom target that is run every time (but the generated
file is only updated when the version changes)
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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).
|