| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
If the match was somewhere near the scrollback beginning, and if the
entire scrollback hadn't yet been filled, we ended up trying to move
the viewport past the beginning of the scrollback, which we then
adjusted in the wrong direction, causing the viewport to not move at
all.
Besides being a bad user experience, since the new match wasn't
visible, foot would also crash if you manually scrolled up to the
match.
|
| |
|
|
| |
This reverts commit b7b7b56b3d64d1eca008082331d94eecfd60dfdf.
|
| | |
|
| |
|
|
| |
timeval.tv_usec is an 'unsigned long long' on 32-bit
|
| | |
|
| | |
|
| |
|
|
|
| |
This ensures we don't issue a warning if we fail, something that will
just confuse users, as SHM scrolling is disabled in 32-bit anyway.
|
| |\ |
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| |
| | |
Closes #70
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While refactoring this code, the check for LMB or RMB got changed to
LMB or "any button".
This fixes that.
It also adds a boolean 'cursor_is_on_grid', which should make the code
easier to read and understand.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't send mouse button escapes to a mouse grabbing client when the
cursor is outside the grid (i.e. when it is inside the margins).
Also don't do *any* kind of selection when the cursor is outside the
grid. Previously, we only checked this for selection_start(), but
e.g. double clicking would run selection_extend(), or
selection_mark_word() etc.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the selection was only updated when the mouse cursor was
inside the grid. This makes it difficult to e.g. do large selections
fast, since you often end up moving the cursor outside the grid, or
outside the terminal window even.
Now, we update the selection regardless of *where* the cursor is. This
is done by bounding the row/col we pass to 'selection_update()' to the
grid, while still setting the seat's row/col to -1 when the cursor is
outside the grid, to ensure the xcursor etc are set correctly.
Care must also be taken to *not* pass any motion events to a mouse
grabbing client, when the cursor is outside the grid.
Closes #70.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an issue where the col/row were incorrectly set to 0
instead of -1, when the mouse cursor was inside the grid margins.
This resulted in e.g. the mouse cursor having the wrong shape, and
foot incorrectly handling mouse events as if they were inside the
grid.
|
| |\ \ |
|
| |/ / |
|
| |\ \
| |/
|/| |
|
| |/ |
|
| |\ |
|
| | | |
|
| |\ \
| |/
|/| |
|
| |/ |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
The desktop entry specification lists 'Keywords' to acilitate searching
through entries.
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
These initial values are based on the keywords from gnome-terminal.
|
| | |
| |
| |
| |
| | |
Disabled freebsd since foot hasn't been ported to freebsd yet.
Disabled alpine x86 since builds.sr.ht doesn't yet support non-x64 builds.
|
| | | |
|
| |/ |
|
| |\ |
|
| | | |
|
| |/ |
|
| |
|
|
| |
Only do it for the last, non-empty cell.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| |/
|
|
|
|
|
| |
This option is used to multiply the mouse scroll amount for mouse and
trackpad based scrollback scrolling.
Closes #54.
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |\ \
| |/
|/| |
|
| |/ |
|
| |
|
|
|
| |
Better parsing means we catch syntax errors earlier, meaning we can
remove some of the checks.
|
| |\ |
|
| |/
|
|
|
|
|
|
|
| |
Foot is a Wayland client and cannot be run outside of a Wayland
session. As such, it makes more sense to use $WAYLAND_SESSION instead
of $XDG_SESSION_ID in the default socket path since this makes it
clearer which Wayland session we belong to.
Closes #55.
|
| |
|
|
| |
I missed this in f3c301ee8b94c3354080695326ceedc7a3866321 when fixing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation incorrectly stated that the default path is
$XDG_RUNTIME_DIR/foot.sock.
The correct default path is
* $XDG_RUNTIME_DIR/foot-$XDG_SESSION_ID.sock
* $XDG_RUNTIME_DIR/foot-no-session.sock
* /tmp/foot.sock
Depending on whether XDG_RUNTIME_DIR and XDG_SESSION_ID has been set
or not.
This also removes the '<>' from the default when XDG_SESSION_ID is not
set.
Closes #53.
|
| |
|
|
|
| |
Since shift is used to enable selecting text in mouse-grabbing
applications, hiding the cursor in this case is counter productive.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 027a8de6f547115fd90b8ee612fc616b61d5000c.
I was a bit quick on this one, and only tested error cases. Turns out,
this causes foot to hang in a blocking read(3) on the event FD.
This is because while the FD has FD_CLOEXEC, that flag is per file
descriptor. I.e. the forked copy of the event fd is closed when we
exec(), but since this isn't a pipe, nothing is signaled to the parent
process, which thus remains blocking in read(3) since its copy of the
event fd hasn't been closed.
We _could_ write a dummy value on the event fd just before exec(), but
then we wouldn't be able to catch errors from exec() self - only
errors *before* exec().
|
| |
|
|
|
|
|
|
| |
Replace the pipe we used to communicate errors after fork(), but
before exec() to the parent process with an event FD.
The overhead in the kernel is much lower to setup an event fd,
compared to a pipe.
|
| |
|
|
|
|
|
|
|
| |
Since we need to restore the status flags anyway, there's nothing to
gain from emitting the user notifications after dup:ing the pts file
descriptor.
On the other hand, emitting user notifications *before* dup:ing means
we can still print error messages for e.g. write(3) errors.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We (need to) set O_NONBLOCK on the pts file description before
emitting the user-notifications, to ensure we don't block in write(3).
However, since file status flags are per *file*, not per
file *descriptor*, this ends up setting O_NONBLOCK on the dup:ed
stdin/stdout/stderr file descriptors too.
Not all clients want this, or can handle this.
Thus we need to restore the original flags before exec:ing the client.
This fixes "makepkg" build failures.
|
| |
|
|
|
|
|
|
|
|
|
| |
The main process is blocking and waiting for us to close the error
pipe (in exec(3), via O_CLOEXEC).
Thus, pts data will *not* be processed until we've exec:d the shell.
Because of this we must not write too much and block in write(3). Do
this by setting O_NONBLOCK on the pts fd (*after* dup:ing it to
stdin/stderr/sdout) and watch for EAGAIN EWOULDBLOCK.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
When enabled, the mouse cursor is hidden when the user types in the
terminal. It is un-hidden when the user moves the mouse, or when the
window loses keyboard focus.
|
| |
|
|
|
| |
Instead of refusing to start foot on configuration errors, we start
and print a user-notification.
|
| |
|
|
|
|
|
| |
This works just like pipe-visible and pipe-scrollback, but pipes the
user-selected text, if any, to the external tool.
Closes #51
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
* Rename user_warning to user_notification
* Add warning and error types (in addition to the existing deprecated)
* Simplify logic when emitting a user notification after forking; we
don't need to copy the notification data since we're in a new
process and have total control over that memory.
|
| |
|
|
| |
It is described in a separate section anyway.
|
| |
|
|
|
|
| |
This allows us to detect syntax errors early on, and is also more
efficient since we don't have to re-tokenize the command line every
time the binding is executed.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is intended to be used to print e.g. deprecation warnings inside
the terminal, *before* the shell is started.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Move 'scrollback' to 'scrollback.lines'
* Move (the new) 'scrollback-indicator-*' options to
'scrollback.indicator-*'
Log a deprecation warning when the old 'scrollback' option is used,
but don't remove it, yet.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Compiler, in release builds, complains about 'cell_count' "may be used
uninitialized". This isn't true, as it is initialized in every
possible switch case below.
But, make the compiler happy and zero-initialize it before the switch
statement.
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
FontConfig's DPI is a double, and using a float instead of an integer
results in higher resolution.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we calculated the monitors horizontal and vertical PPI
values.
For font sizing, we used the vertical PPI value. It seems however,
that using the diagonal PPI value, i.e. diagonal_px / diagonal_inch,
gives more consistent results.
This is still a PPI value, but since it is intended to be used as a
FontConfig DPI value, name it 'dpi'.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix col/row calculation in pointer-enter event; we did not take the
margins into account.
* seat->mouse.col,row are now set to -1 if the cursor is inside the
margins. That is, col/row are only ever valid when the mouse is
actually over the grid, and not in the margins.
* Use regular 'left-ptr' mouse cursor when mouse is inside the
margins, to not make the user think he/she can start a selection.
Besides making things clearer, this also fixes a crash that occurred
if you started a selection in e.g. the right margin.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | | |
Closes #47.
|