Commit graph

2897 commits

Author SHA1 Message Date
Daniel Eklöf
608cc746ad
uri: add uri_parse() - new function extracts components from an URI 2020-10-28 19:10:44 +01:00
Daniel Eklöf
9580c04dd3
selection: debug log of data offer mime-types and actions 2020-10-26 21:19:07 +01:00
Daniel Eklöf
8e23b5b70d
selection: implement support for drag-and-drop
We accept COPY and MOVE actions, for text/plain;charset=utf-8
mime-types.

To implement DnD, we need to track the current DnD data offer *and*
the terminal instance it is (currently) targeting.

To do this, a seat has a new member, ‘dnd_term’. On a DnD enter event,
we lookup the corresponding terminal instance and point ‘dnd_term’ to
it.

On a DnD leave event, ‘dnd_term’ is reset.

The DnD data offer is tracked in the terminal’s wayland window
instance. It is reset, along with the seat’s ‘dnd_term’ on a DnD leave
event.

On a drop event, we immediately clear the seat’s ‘dnd_term’, to ensure
we don’t reset it, or destroy the offer before the drop has been
completed.

The drop’s ‘done()’ callback takes care of destroying and resetting
the DnD offer in the terminal’s wayland window instance.

Closes #175
2020-10-26 21:02:53 +01:00
Daniel Eklöf
af3b604d8e
wayland: bind to data-device-manager version 3, for drag-and-drop support 2020-10-26 21:02:24 +01:00
Daniel Eklöf
2928ef5fbe
main: remove trailing ‘, ’ from arch log line 2020-10-25 19:27:57 +01:00
Daniel Eklöf
4283e96865
render: blink switches between foreground and dimmed foreground 2020-10-22 18:41:47 +02:00
Daniel Eklöf
353e51b0a1
Merge branch 'custom-bold-italic-fonts'
Closes #169
2020-10-21 16:33:45 +02:00
Daniel Eklöf
f0d91fc490
changelog: restored -> restore 2020-10-20 21:32:20 +02:00
Daniel Eklöf
84859f475e
doc: foot.ini.5: mention how one can disable bold/italic fonts completely 2020-10-20 21:12:25 +02:00
Daniel Eklöf
2c101a21ee
config: add font-bold, font-italic and font-bold-italic options
These options lets the user configure custom fonts and styles, to use
with the bold and italic cell attributes.

By default, they are unset, meaning we use the bold/italic variants of
the regular font.

Closes #169.
2020-10-20 21:04:47 +02:00
Daniel Eklöf
b507d3a55e
osc: change info logging to debug logging when changing the cursor color 2020-10-20 21:03:51 +02:00
Daniel Eklöf
0d319f8793
input: handle XKB errors
* Don’t de-reference the xkb context/keymap/state if we failed to
  instantiate them.
* Don’t try to send a translated utf8 key sequence if the translation
  failed.
* Handle xkb_compose_state_get_utf8() and xkb_state_key_get_utf8()
  returning more than 64 bytes.

This _may_ fix #171.
2020-10-20 21:01:33 +02:00
Daniel Eklöf
4c3d2cfc7d
input: don’t allow diagonal resize when tiled 2020-10-20 21:00:19 +02:00
Daniel Eklöf
f928c1fa68
wayland: properly restore window size when being un-tiled
Bind to xdg-shell version 2 if available, as this enables us to
track our window’s ‘tiled’ state in the ‘configure’ events.

This in turn allows us to stash the ‘old’ window size when being
tiled, to be used again when restoring the window size when un-tiled.
2020-10-20 20:58:03 +02:00
Daniel Eklöf
f70d36ed5d
Merge branch 'dont-require-a-compose-file' into master
Closes #170
2020-10-20 20:55:47 +02:00
Daniel Eklöf
0573c685c7
input: don’t crash if xkbcommon cannot find a compose file
Handle xkb_compose_table_new_from_locale() returning NULL. When this
happens, log a warning that “dead keys” will be disabled, and make
sure to never de-reference the compose table pointer.

Closes #170
2020-10-19 18:30:19 +02:00
Daniel Eklöf
e6737034e5
term: reset: enable/disable cursor blink depending on user configuration 2020-10-13 19:28:56 +02:00
Daniel Eklöf
2cac832ef3
term: reset: kill blink timer 2020-10-13 19:28:42 +02:00
Daniel Eklöf
1f650a7fdf
term: remove unneeded blink.active field
We now use the timer FD instead; if it is -1, blinking is not active.
2020-10-13 19:28:05 +02:00
Daniel Eklöf
ac55e4067a
term: instantiate cursor blink timer on-demand 2020-10-13 19:23:04 +02:00
Daniel Eklöf
c63199429e
term: create/destroy blink timer on-demand
Blinking text is uncommon. It doesn’t make that much sense to keep a
timer opened (but unarmed) at all times.

This patch makes it so the timer is instantiated on-demand, and
destroyed again when it no longer is needed.
2020-10-13 18:40:20 +02:00
Daniel Eklöf
7a218cba08
term: subpixel changed: fix build with LOG_ENABLE_DBG=1 2020-10-13 18:39:36 +02:00
Daniel Eklöf
033ff180af
selection: re-factor: break out code shared between clipboard/primary send
The send functions are called by the compositor when another
application wants to paste data *from* foot.
2020-10-13 18:38:49 +02:00
Daniel Eklöf
8b06a55cb0
Merge branch 'releases/1.5' into master 2020-10-13 08:06:56 +02:00
Daniel Eklöf
f1e422b25a
meson/pkgbuild: bump version to 1.5.2 2020-10-13 08:04:37 +02:00
Daniel Eklöf
fdb7e40355
input: regression: don’t pass on mouse click to application if we consumed it
When we ‘consume’ a mouse button event (i.e. when we have a shortcut
mapped to it), the event should *not* be passed on to the client
application.

In 5f64c5c335, button handling was
refactored and unfortunately introduced a regression where we once
again started passing consumed button presses to the client
application.

Fixes #168
2020-10-13 08:02:09 +02:00
Daniel Eklöf
d75e50230e
Merge branch 'scroll-up-down-while-selecting' into master
Closes #149
2020-10-12 20:20:26 +02:00
Daniel Eklöf
27cb17e71e
Merge branch 'releases/1.5' into master 2020-10-11 19:36:00 +02:00
Daniel Eklöf
2f20550893
meson/pkgbuild: bump version to 1.5.1 2020-10-11 19:31:25 +02:00
Daniel Eklöf
77a87b30ff
changelog: prepare for 1.5.1 2020-10-11 19:31:01 +02:00
Daniel Eklöf
a32464e296
changelog: remove duplicate entry 2020-10-11 19:27:37 +02:00
Daniel Eklöf
16a525f8e2
readme/doc: add shift+insert to list of default key bindings 2020-10-11 19:27:15 +02:00
Daniel Eklöf
70a6f88823
changelog: update ‘contributors’ list 2020-10-11 19:27:12 +02:00
Sergey Nazaryev
e842f49367
selection: use appropriate check for PRIMARY paste
Assume it could be a copy-paste typo. We should check PRIMARY, not
CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything
to CLIPBOARD.
2020-10-11 19:27:07 +02:00
Daniel Eklöf
282af44784
config: bind shift+insert to primary-paste by default 2020-10-11 19:26:57 +02:00
Daniel Eklöf
4bf61fe2f1
changelog: add contributor 2020-10-11 19:26:36 +02:00
Craig Barnes
f1752c7642
config: fix "-Wformat-nonliteral" warnings 2020-10-11 19:26:32 +02:00
Daniel Eklöf
5540e3a0e2
readme: minor rewrite of server/daemon section 2020-10-11 19:26:27 +02:00
Daniel Eklöf
5477ee8894
csi: only respond to Primary DA when Ps == 0 2020-10-11 19:26:25 +02:00
Daniel Eklöf
5daaaa03c2
readme: clearer descriptions of secondary and tertiary DA responses 2020-10-11 19:26:22 +02:00
Daniel Eklöf
0fa4a18938
term: remove unused bit in xtsave struct 2020-10-11 19:26:19 +02:00
Daniel Eklöf
98c316556f
changelog: we’ve fixed several sixel+reflow related bugs 2020-10-11 19:26:10 +02:00
Daniel Eklöf
d0c5cf6e9f
sixel: reflow: drop sixels that crosses the scrollback history’s end
This fixes various crashes that occurred after a reflow due to the
sixel image list invariants no longer being true.
2020-10-11 19:26:09 +02:00
Daniel Eklöf
d54adc5263
sixel: unhook: do overwrite *after* linefeeding
This ensures the overwrite is done when the scrollback history is in
the same state as when we then insert the new image.
2020-10-11 19:26:07 +02:00
Daniel Eklöf
0e4b0fefc1
sixel: overwrite: use pixman to calculate new the sixel boundaries
When punching a hole in a sixel (and thus splitting it up into up to
four new sixels), use pixman to calculate the new sixel coordinates
and sizes.
2020-10-11 19:26:05 +02:00
Daniel Eklöf
329a290f82
sixel: ovewrite-by-rectangle: in debug builds, cross-reference against pixman
Use pixman to calculate the intersection of the rectangle being
overwritten, and the sixel(s). Verify our code matches.
2020-10-11 19:26:03 +02:00
Daniel Eklöf
09e8a5b11d
sixel: verify scrollback consistency: new verify function
Verifies sixels have been scrolled out correctly
2020-10-11 19:26:01 +02:00
Daniel Eklöf
cc54c1bea7
sixel: add comments to verify_*() functions 2020-10-11 19:26:00 +02:00
Daniel Eklöf
0a802c2693
sixel: verify-*: don’t return anything; rely on asserts only 2020-10-11 19:25:58 +02:00
Daniel Eklöf
eec0971739
sixel: scroll up/down: early return when list is empty
Branch tagged as ‘likely’ for performance reason
2020-10-11 19:25:56 +02:00