Commit graph

6789 commits

Author SHA1 Message Date
Daniel Eklöf
8bfbbc89fd
multi-cursor: bug: use grid_row() when accessing rows 2025-08-31 07:26:09 +02:00
Daniel Eklöf
1055d32e9f
term_remove_all_multi_cursors(): early return if no extra cursors are active 2025-08-29 13:21:42 +02:00
Daniel Eklöf
fba9bb6853
render: fix hollow cursor style for "extra" cursors
When the cursor is "block style", i.e. either when the window is
focused and the cursor is block, or when unfocused and we're supposed
to draw a hollow cursor, then we need to draw it *before* compositing
the glyph.

In all other cases (i.e. beam and underline cursors), it should be
rendered after the glyph.

With the addition of "extra" cursors, the logic for determining which
type it is has become much more complex, and the single if-statement
we had was wrong (it didn't handle "extra" cursors correctly).

Fix by splitting up all the checks into multiple if-statements.
2025-08-29 12:48:37 +02:00
Daniel Eklöf
0dba15c648
csi: disable debug logging (again) 2025-08-28 19:11:02 +02:00
Daniel Eklöf
acf62bdda5
csi: multi-cursor: ensure 'len' is initialized 2025-08-28 15:39:17 +02:00
Daniel Eklöf
bab4a2158b
csi: disable debug logging 2025-08-28 12:58:40 +02:00
Daniel Eklöf
410b2c246d
csi: multi-cursor: convert debug logging to actual debug logs 2025-08-28 12:48:52 +02:00
Daniel Eklöf
e4fcb0cc33
csi: multi-cursor: implement cursor and color queries 2025-08-28 12:44:29 +02:00
Daniel Eklöf
6319ed8b29
render: multi-cursor: wip: colors 2025-08-28 12:18:00 +02:00
Daniel Eklöf
89d87f2c1b
csi: multi-cursor: use enum values in switch 2025-08-28 12:17:35 +02:00
Daniel Eklöf
7996267d7b
term: cursor blink: dirty multi-cursor cells too 2025-08-28 12:11:00 +02:00
Daniel Eklöf
dcabe14392
render: multi-cell: decrement 'extra-cursor' pointer instead of indexing 2025-08-28 07:34:21 +02:00
Daniel Eklöf
64f52190ed
multi-cursor: render: wip
Shapes and most color options implemented
2025-08-28 07:30:37 +02:00
Daniel Eklöf
44bc720755
multi-cursor: render: wip 2025-08-27 17:08:39 +02:00
Daniel Eklöf
d5e99862af
multi-cursor: wip: render extra cursors
Currently ignores custom shapes and colors (i.e. all extra cursors are
rendered exactly as the primary cursor).
2025-08-27 15:00:27 +02:00
Daniel Eklöf
bb49057e54
multi-cursor: dirty affected rows and cells 2025-08-27 15:00:11 +02:00
Daniel Eklöf
6b3d7cb8aa
csi: alt-screen: remove all extra cursors when switching screens 2025-08-27 14:59:50 +02:00
Daniel Eklöf
beb4556dc0
multi-cursor: wip: track cursor shapes and colors
And erase all extra cursors on reset, resize and clear
screen/scrollback (ED 2/3).
2025-08-27 13:43:45 +02:00
Daniel Eklöf
dccbdb97cd
multi-cursor: wip: start tracking which cells has secondary cursors 2025-08-27 11:30:05 +02:00
Daniel Eklöf
5e0524bf99
csi: wip: parse the multi-cursor escape (CS > SPACE q)
We do nothing with it yet
2025-08-27 10:34:06 +02:00
Daniel Eklöf
ed7652db50
config: value_to_*(): don't overwrite result variable on error
Some of the value_to_*() functions wrote directly to the output
variable, even when the value was invalid. This often resulted in the
an actual configuration option (i.e. a member in the config struct) to
be overwritten by an invalid value.

For example, -o initial-color-theme=0 would set
conf->initial_color_theme to -1, resulting in a crash later, when
initializing a terminal instance.
2025-08-25 15:46:19 +02:00
Daniel Eklöf
72d9a13c0c
server: fix compilation error: return value ignored 2025-08-01 09:41:37 +02:00
Daniel Eklöf
b13a8f12d2
server/client: add support for sending SIGUSR to footclient
This patch adds the IPC infrastructure necessary to propagate
SIGUSR1/SIGUSR2 from a footclient process to the server process.

By targeting a particular footclient instance, only that particular
instance changes theme. This is different from when targeting the
server process, where all instances change theme.

Closes #2156
2025-08-01 09:38:05 +02:00
Daniel Eklöf
70d99a8051
changelog: SIGUSR changes in the server 2025-07-30 12:38:14 +02:00
Daniel Eklöf
b1b2162416
doc: foot.ini: mention SIGUSR1/SIGUSR2 and reference foot(1) 2025-07-30 12:36:32 +02:00
Daniel Eklöf
3b8d59f476
doc: foot: document SIGUSR1/SIGUSR2 2025-07-30 12:36:32 +02:00
Daniel Eklöf
6eedc88d70
server: sigusr1/2: update conf object with the "new" theme
When sending SIGUSR1/SIGUSR2 to a server process, all currently
running client instances change their theme. But before this patch,
all future instances used the original theme. With this patch, the
server owned config object is updated with the selected theme, thus
making new instances use the same theme as well.
2025-07-30 12:36:32 +02:00
Daniel Eklöf
7636f264a8
slave: remove more environment variables set by other terminals
This ensures applications don't mistake foot for another terminal
emulator. Not that applications _should_ rely on environment
variables, but some do anyway...
2025-07-30 12:34:59 +02:00
Daniel Eklöf
83303bd2a4
url-mode: for some reason we sorted the label letters before assigning them
Don't do this. Now that we **don't** sort them, the first letter
chosen by the user is always assigned to the bottom most URL.

Closes #2140 (again)
2025-07-29 11:18:49 +02:00
Tobias Mock
f873aa904d
Add tinted variant of modus-vivendi theme 2025-07-24 13:51:44 +02:00
Daniel Eklöf
86d63f08ba
changelog: add new 'unreleased' section 2025-07-23 08:31:30 +02:00
Daniel Eklöf
8814b5f080
Merge branch 'releases/1.23' 2025-07-23 08:31:03 +02:00
Daniel Eklöf
43620935a1
meson: bump version to 1.23.1 2025-07-23 08:28:13 +02:00
Daniel Eklöf
95e8b18c12
changelog: prepare for 1.23.1 2025-07-23 08:27:59 +02:00
Daniel Eklöf
5a01dbc234
Merge branch 'master' into releases/1.23 2025-07-23 08:27:25 +02:00
Daniel Eklöf
fcde74a181
osc: color reset: read default color from currently active theme 2025-07-22 13:30:28 +02:00
Daniel Eklöf
42be74214a
term: make sure the color table is populated *before* the slave process is spawned 2025-07-22 13:30:00 +02:00
Daniel Eklöf
21db6a6cdc
fdm: when logging signal related errors, include the signal name
Since sigabbrev_np() is GNU only, provide a fallback function that
returns "SIG<signo>" when sigabbrev_np() doesn't exist (for example,
on FreeBSD).
2025-07-21 15:44:24 +02:00
Daniel Eklöf
7ab43ebf74
shm: don't set pixman_fmt_without_alpha twice
When selecting 16-bit surfaces, we set pixman_fmt_without_alpha twice,
and never set pixman_fmt_with_alpha.

This caused 10-bit surfaces to be used instead, since it checks if
pixman_fmt_with_alpha has been overridden or not.
2025-07-21 13:49:57 +02:00
Daniel Eklöf
57ae3bb89c
main: unregister SIGUSR2 on exit 2025-07-18 17:24:18 +02:00
Daniel Eklöf
01387f9593
main: SIGUSR1 selects the first color theme, SIGUSR2 the second
Before this patch, SIGUSR1 toggled between [colors] and
[colors2].

Now, SIGUSR1 changes to [colors], regardless of what the current color
theme is, and SIGUSR2 changes to [colors2].

Closes #2144
2025-07-18 08:33:42 +02:00
Daniel Eklöf
cc290fa9b0
url-mode: assign label keys in reverse order
The _last_ URL is often the one you are interested in, and with this
change, it is always assigned the first (and thus the same) key.

Closes #2140
2025-07-17 10:40:20 +02:00
Daniel Eklöf
692b22cbbb
changelog: add new 'unreleased' section 2025-07-16 08:31:42 +02:00
Daniel Eklöf
9b6a9db98a
Merge branch 'releases/1.23' 2025-07-16 08:31:21 +02:00
Daniel Eklöf
d62bff1440
meson: bump to 1.23.0 2025-07-16 08:15:34 +02:00
Daniel Eklöf
e72e08625d
changelog: prepare for 1.23.0 2025-07-16 08:14:54 +02:00
Daniel Eklöf
693aefa96a
config: silence valgrind-detected leak in config_font_parse() 2025-07-11 16:47:51 +02:00
Daniel Eklöf
aa579acd6e
issue template: compositor version -> compositor name and version
The existing hints and descriptions are apparently not enough; some
people still only mention the version, which is rather useless.
2025-07-11 16:30:18 +02:00
Daniel Eklöf
968bc05c32
csi: add '52' to the DA reply, to indicate PSC-52 support
Note: only *copy* is required to be enabled in security.osc52; paste
is optional, see
https://github.com/contour-terminal/contour/issues/1761#issuecomment-2944492097
2025-06-10 07:12:53 +02:00
Daniel Eklöf
499f019dea
osc: 52: clear selection if the payload is the empty string 2025-06-10 07:12:53 +02:00