Commit graph

2490 commits

Author SHA1 Message Date
Daniel Eklöf
49eea3893e
wayland: global-remove: return after finding a matching seat 2020-08-13 18:47:19 +02:00
Daniel Eklöf
6b18bd998a
wayland: global-remove: fix call to pointer_listener.leave()
Don't call it when we have keyboard focus, call it when we have mouse
focus.
2020-08-13 18:47:19 +02:00
Daniel Eklöf
544c1b1976
config: wip: add support for modifiers in mouse bindings
Mouse bindings can now include modifiers. They are specified in pretty
much the same way as in keyboard bindings:

  Control+BTN_LEFT
2020-08-13 18:47:19 +02:00
Daniel Eklöf
823a7c0318
render: oops... swprintf() needs to number of *chars*, not *bytes* 2020-08-13 18:46:57 +02:00
Daniel Eklöf
6e0171ee44
render: fix printf-errors in 32-bit builds 2020-08-13 18:40:10 +02:00
Daniel Eklöf
17070a0d54
config: add tweak.render-timer option
This can be set to 'none' (the default), 'osd', 'log' or 'both'.

When 'osd' is enabled, we'll render the frame rendering time to a
sub-surface after each frame.

When 'log' is enabled, the frame rendering time is logged on stderr.
2020-08-13 18:35:17 +02:00
Daniel Eklöf
c7126c4076
doc: footclient.1: move DESCRIPTION up before OPTIONS 2020-08-13 18:34:44 +02:00
Daniel Eklöf
6c78919d4b
doc: foot.1: move DESCRIPTION up before OPTIONS 2020-08-13 18:34:24 +02:00
Daniel Eklöf
1decd8e9de
selection: improve handling of multi-column characters
* Don't assume multi-column characters are exactly *two* columns
* Check for CELL_MULT_COL_SPACER values instead of using wcwidth()
2020-08-13 18:33:22 +02:00
Daniel Eklöf
3816a3b460
selection: handle multi-column characters when reversing selection direction 2020-08-13 18:32:56 +02:00
Daniel Eklöf
a4b18ba832
changelog: cancelling -> canceling 2020-08-13 06:33:10 +02:00
Daniel Eklöf
fc154fcf3a
Merge branch 'selection-inversion' into master 2020-08-13 06:23:49 +02:00
Daniel Eklöf
52abf85266
Merge branch 'custom-selection-colors' into master 2020-08-13 06:22:45 +02:00
Daniel Eklöf
8808dd28f2
selection: adjust start point when the selection changes direction
Without this, the initial cell will always be selected, regardless of
how the selection is moved to the left or right.

With this patch, the initial cell will only be selected while the
selection is being made in the original direction. Changing direction
of the selection moves the start point to next/previous character.
2020-08-12 19:42:21 +02:00
Daniel Eklöf
5e36ebdef8
config: make selection foreground/background colors configurable
The default is still to inverse the regular foreground/background
colors.

If the user sets *both* of the new options, selection-foreground and
selection-background, those colors will *always* be used for selected
cells, instead of inverting the regular foreground/background colors.
2020-08-12 19:41:50 +02:00
Daniel Eklöf
156cce6ef6
doc: foot.1: don't talk about using '--' on the command line
This used to be necessary, but isn't anymore.
2020-08-12 19:40:50 +02:00
Daniel Eklöf
8626b4bc1a
search: don't update/refresh match when modifier keys are pressed 2020-08-12 19:40:50 +02:00
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