Commit graph

2473 commits

Author SHA1 Message Date
Daniel Eklöf
b01431e38f
search: fix viewport not moving if we tried to move it past the scrollback start
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.
2020-08-12 19:40:40 +02:00
Daniel Eklöf
ef9bac5965
Revert "ci: sr.ht: just testing..."
This reverts commit b7b7b56b3d.
2020-08-11 17:33:19 +02:00
Daniel Eklöf
b7b7b56b3d
ci: sr.ht: just testing... 2020-08-11 17:32:34 +02:00
Daniel Eklöf
187fe3a586
render: fix compilation errors in 32-bit builds
timeval.tv_usec is an 'unsigned long long' on 32-bit
2020-08-11 17:29:56 +02:00
Daniel Eklöf
12e3a7e2a2
ci: gitlab: let's see if we can do 32-bit builds 2020-08-11 17:27:48 +02:00
Daniel Eklöf
6f5f7f1411
main: include our own bitness when logging the architecture 2020-08-11 17:23:10 +02:00
Daniel Eklöf
732e181b1d
shm: don't even try to punch a memfd hole in 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.
2020-08-11 17:22:12 +02:00
Daniel Eklöf
828a57c201
Merge branch 'xmalloc-conversion' into master 2020-08-09 10:54:39 +02:00
Craig Barnes
4e6100494c Handle allocation failures explicitly in *_init() functions 2020-08-09 08:55:20 +01:00
Craig Barnes
7a77958ba2 Convert most dynamic allocations to use functions from xmalloc.h 2020-08-08 20:37:57 +01:00
Daniel Eklöf
ecb2695822
changelog: add birger to 'contributers' for the upcoming release 2020-08-08 10:23:26 +02:00
Daniel Eklöf
e391658d72
Merge branch 'selection-improvements' into master
Closes #70
2020-08-08 10:19:04 +02:00
Daniel Eklöf
4156a64044
input: motion: improve comment 2020-08-08 10:08:47 +02:00
Daniel Eklöf
a3d5626256
input: pointer-enter: add comment describing what we're doing 2020-08-08 10:07:25 +02:00
Daniel Eklöf
7497e44826
input: motion: regression: check for RMB when updating selection
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.
2020-08-08 10:00:18 +02:00
Daniel Eklöf
6680f9541f
Merge branch 'base64' into master 2020-08-08 09:23:17 +02:00
Craig Barnes
745aeba382 base64: simplify is_valid() by using reverse_lookup table 2020-08-08 03:55:23 +01:00
Daniel Eklöf
d49d1fd59d
input: scrolling: don't send events to client if cursor is outside grid 2020-08-07 22:07:16 +02:00
Daniel Eklöf
76c3629cbf
input: mouse: motion/enter: cleanup inside/outside grid handling 2020-08-07 22:04:37 +02:00
Daniel Eklöf
42ba135dcb
Merge branch 'attrs' into master 2020-08-07 21:55:41 +02:00
Craig Barnes
7eb70a453b Replace GCC "unused" and "format" attributes with portable macros 2020-08-07 20:42:34 +01:00
Daniel Eklöf
0a9aa2dd32
changelog: 'of' -> 'in' 2020-08-07 20:08:30 +02:00
Daniel Eklöf
4178418010
input: button: button events aren't passed to clients, when cursor is outside grid
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.
2020-08-07 19:59:03 +02:00
Daniel Eklöf
721ca80abe
input: motion: do selection update even if cursor is outside the grid
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.
2020-08-07 19:58:56 +02:00
Daniel Eklöf
158722b642
input: fix col/row calculation when cursor is in the top or left margin
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.
2020-08-07 19:51:34 +02:00
Daniel Eklöf
f952d5a305
Merge branch 'syslog' into master 2020-08-07 12:19:54 +02:00
Daniel Eklöf
e0e3ab0ae7
Merge branch 'xstrndup+xrealloc' into master 2020-08-07 12:17:49 +02:00
Craig Barnes
4564c82513 xmalloc: add xrealloc() and xstrndup() functions 2020-08-07 01:05:04 +01:00
Craig Barnes
8541ce10a2 log: simplify _sys_log() function 2020-08-06 23:31:21 +01:00
Daniel Eklöf
22eed3e579
Merge branch 'desktop-keywords' into master 2020-08-06 23:32:25 +02:00
Daniel Eklöf
41b4bfe792
ci: disable freebsd-x64 and alpine-x86
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.
2020-08-06 23:28:06 +02:00
Daniel Eklöf
c9fd046310
ci: new: alpine x86 2020-08-06 23:25:53 +02:00
Daniel Eklöf
019b6bc039
fix printf-format errors in 32-bit builds 2020-08-06 23:20:46 +02:00
Birger Schacht
056099149d Add keywords to desktop files
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.
2020-08-06 20:36:03 +02:00
Daniel Eklöf
644859019e
Merge branch 'xmalloc' into master 2020-08-06 12:18:36 +02:00
Craig Barnes
014019e98d xmalloc: log error to syslog() in fatal_error() function 2020-08-05 20:11:51 +01:00
Craig Barnes
f1fce96a1d config: handle allocation failure explicitly 2020-08-04 23:28:16 +01:00
Daniel Eklöf
c07d14e1c0
grid: reflow: don't insert <width> spacer cells for *every* empty cell
Only do it for the last, non-empty cell.
2020-08-04 18:07:54 +02:00
Daniel Eklöf
32a155fbf4
input: disable debug loggin 2020-08-04 18:07:41 +02:00
Daniel Eklöf
4919ccbc70
term: remove unusued 'damage' list 2020-08-04 18:07:22 +02:00
Daniel Eklöf
a371ea0f02
input: ignore ISO Level 3 Shift (AltGr) when hiding the mouse cursor 2020-08-04 07:38:21 +02:00
Daniel Eklöf
d929862245
config: move cursor.hide-when-typing to mouse.hide-when-typing 2020-08-04 07:33:15 +02:00
Daniel Eklöf
8f04e898af
footrc: add new option 'scrollback.multiplier' 2020-08-03 20:12:31 +02:00
Daniel Eklöf
61bd21c6f3
Merge branch 'scrollback-multiplier' into master 2020-08-03 20:11:58 +02:00
Daniel Eklöf
36468b0406
config: add scrollback.multiplier option
This option is used to multiply the mouse scroll amount for mouse and
trackpad based scrollback scrolling.

Closes #54.
2020-08-03 20:08:39 +02:00
Daniel Eklöf
93b03c91ed
input: hide-when-typing: ignore modifiers 2020-08-03 18:19:43 +02:00
Daniel Eklöf
2ee9830e2a
changelog: add craigbarnes to 'contributors' for the upcoming release 2020-08-03 08:17:26 +02:00
Daniel Eklöf
6e826d0e0a
Merge branch 'footclient-man-synopsis' into master 2020-08-03 07:54:37 +02:00
Daniel Eklöf
2f679694a5
Merge branch 'e-escape' into master 2020-08-03 07:52:52 +02:00
Craig Barnes
657c98d520 doc: fix "SYNOPSIS" section in footclient(1) man page 2020-08-03 02:53:25 +01:00