Commit graph

3093 commits

Author SHA1 Message Date
Daniel Eklöf
b85e2f40bb
ime: feed committed string to client application 2020-12-07 20:44:10 +01:00
Daniel Eklöf
e97024116e
ime: disable text-input on surface leave 2020-12-07 20:44:10 +01:00
Daniel Eklöf
148bb1ff13
ime: wip: add text-input object to seat 2020-12-07 20:44:09 +01:00
Daniel Eklöf
d58d0601f6
changelog: DECSET 27127 - modifies Esc to send \E[27127~ instead of \E 2020-12-07 20:43:32 +01:00
Daniel Eklöf
cbda2fb9c1
Merge branch 'allow-key-collision-if-action-is-the-same'
Closes #233
2020-12-07 19:11:50 +01:00
Daniel Eklöf
5e46672cf4
config: ignore “self” when detecting key binding collisions
Previously, foot would not accept the following:

  [key-bindings]
  minimize=Escape
  minimize=Escape

Now it does. I.e. key combos in the action being updated are ignored
when detecting collisions.

The example above is contrived; a real world example could be to
remove certain combos from an action with multiple combos; perhaps to
free up a combo for another action. Example:

  [search-bindings]
  cancel=Escape

This would previously cause an error since `cancel=Control+g Escape`
by default.

Closes #233
2020-12-05 11:21:17 +01:00
Daniel Eklöf
a58557af30
changelog: remove ‘crash when pasting non-textual clipboard content’
This crash doesn’t not exist in any release versions.
2020-12-05 11:19:03 +01:00
Daniel Eklöf
384ba4d30d
fdm: do *not* keep polling on EINTR
This fixes an issue where foot --server did not exit on SIGINT. This
happened because we never returned out from fdm_poll(), and thus we
never saw ‘aborted’ being set.
2020-12-04 18:36:53 +01:00
Daniel Eklöf
c1c42f047e
Merge branch 'releases/1.5' 2020-12-01 20:02:58 +01:00
Daniel Eklöf
3156db74ec
meson/pkgbuild: bump version to 1.5.4 2020-12-01 19:52:36 +01:00
Daniel Eklöf
f6aa1495d7
input: relax requirements for overriding keypad application mode
Don’t require NumLock to be locked. Foot has no idea _which_ modifier
the user has mapped NumLock to, meaning we really cannot require it to
be locked.
2020-12-01 19:47:16 +01:00
Daniel Eklöf
9a33559fda
keymap: add ‘CSI 27;<mod>;27~’ escapes for Esc with modifiers 2020-12-01 19:46:14 +01:00
Daniel Eklöf
86de007311
doc: foot.5: minor highlighting fixes 2020-12-01 19:45:08 +01:00
Daniel Eklöf
54e4f8e407
doc: foot.1: no need to say foot.ini twice 2020-12-01 19:45:05 +01:00
Daniel Eklöf
7430d03c6d
changelog: update contributors 2020-12-01 19:44:27 +01:00
Daniel Eklöf
8f785e5a0d
render: don’t call term_arm_blink_timer() from multiple threads
We call term_arm_blink_timer() from render_cell(), which runs in
multiple threads.

This caused multiple blink timer FDs to be created and registered with
the FDM, later causing read failures after one of those FDs had been
closed again.

This rarely happened under normal circumstances, but was easy to
trigger when the whole screen was full of blinking text.

As a small optimization, we don’t bother taking the lock if the timer
FD already is valid.

This is safe, because:

1) If the timer FD isn’t valid, we take the lock and then call
    term_arm_blink_timer(), which again checks if the FD is already
    valid.

2) The blink timer FD cannot be closed while we’re rendering cells. It
   is only disabled in the FDM callback, which cannot execute while
   we’re rendering.
2020-12-01 19:43:05 +01:00
Daniel Eklöf
ee3935c371
sixel: fix crash when an explicit sixel size had a height less than 6 pixels 2020-12-01 19:42:57 +01:00
Craig Barnes
20910abf36
client: fix handling of "-m" command-line flag 2020-12-01 19:42:19 +01:00
Daniel Eklöf
8bd711c33b
render: allow-overflow: require a space in the next cell
When checking if we should allow a single-width character double-width
glyph to overflow into the next cell, require the next cell to either
be empty, or contain a space.

Closes #203
2020-12-01 19:41:49 +01:00
Daniel Eklöf
9c7cded616
keymap: fix alt+return combos
All alt+return combos mapped to the same escape sequence as alt+return
itself.

With this patch, alt+<mod(s)>+return map to a standard ‘CSI 27;x;13~’
sequence.
2020-12-01 19:41:33 +01:00
Daniel Eklöf
3a3616af96
keymap: use same lookup table for Tab and ISO_Left_Tab
With XKB, Shift+Tab maps to XKB_KEY_ISO_Left_Tab, not
XKB_Key_Tab. Previously, we had two different lookup tables for the
two.

The tab table was correctly populated, while the ISO-left tab
wasn’t. As a result, all Shift+Tab combos (except Shift+Tab itself)
was wrong, and resulted in the same escape sequence as Shift+Tab.

Fix by using the same table for both tab and ISO-left tab.

Closes #210
2020-12-01 19:41:29 +01:00
Daniel Eklöf
ca150fbdd5
readme: don’t uppercase titles 2020-12-01 19:40:46 +01:00
Daniel Eklöf
3526af34d7
config: enable allow-overflowing-double-width-glyphs by default 2020-12-01 19:40:43 +01:00
Daniel Eklöf
d86b6b3031
changelog: fix link to readme#keypad 2020-12-01 19:40:13 +01:00
Daniel Eklöf
8970c7ea18
readme/doc:foot.1: document the (new) keypad behavior 2020-12-01 19:40:03 +01:00
Daniel Eklöf
dea8e89fda
input: enforce ‘numerical’ keypad mode when Num Lock override is enabled
When num lock override has been enabled via “CSI?1035h” (the default),
keypad is always considered to be in ‘numerical’ mode.

This affects how keypad keys are translated to escape sequences when
Num Lock is active.

The keypad has four modes:

* Num Lock off, numerical mode
* Num Lock off, application mode
* Num Lock on, numerical mode
* Num Lock on, application mode

The keymap is identical for numerical and application mode when Num
Lock is off, meaning the keypad effectively has three different modes.

In XTerm, numerical and application mode _can_ be the same, **if** the
‘numLock’ resource is set to true (the default). It is only when
‘numLock’ is false that the application mode is actually used.

This patch changes foot to do the same. We don’t expose an option, but
do implement “CSI ? 1035”.

Closes #194
2020-12-01 19:39:10 +01:00
Daniel Eklöf
4f0d057243
input: track num lock state 2020-12-01 19:39:05 +01:00
Daniel Eklöf
7dcc885a7a
csi: implement “CSI ? 1035” - toggle Num Lock override
This adds a num_lock_modifier state to the terminal, and hooks up
“CSI?1035h/l” to toggle it.
2020-12-01 19:38:36 +01:00
Daniel Eklöf
61f4845a59
input: use XKB_MOD_NAME_* macros instead of hard-coded strings 2020-12-01 19:37:29 +01:00
Daniel Eklöf
3031ddfc16
wayland: preempt render scheduling in ‘configure’ events
A configure event must be “committed”. In case of resizing, that means
rendering a new frame and committing that surface.

render_resize() will resize the grid and *schedule* a render
refresh. However, if one is already pending, the refresh will take a
very (relatively) long time - until the next frame callback is
received.

This poses a problem when the window is hidden, since in this case,
the frame callback *never* comes. This in turn means we fail to commit
a new surface in response to the ‘configure’ event. And that means the
compositor needs to wait for a transaction timeout before continuing.

The end effect is very slow and jerky window resizing when a hidden
foot window is being resized.

This can happen in tiled compositors, like Sway, where a window can be
tabbed (and thus invisible), but still resized when its container is
resized.

Closes #190
2020-12-01 19:35:58 +01:00
Daniel Eklöf
99b3e20126
changelog: add entry for 1.5.4 2020-12-01 19:33:22 +01:00
Daniel Eklöf
c3201b9770
Merge branch 'modify-escape-key'
Closes #225
2020-12-01 18:31:25 +01:00
Daniel Eklöf
1f6a663bed
Merge branch 'clipboard-ignore-unhandled-mime-types'
Closes #230
2020-12-01 18:30:29 +01:00
Daniel Eklöf
c44c7cc5be
input: relax requirements for overriding keypad application mode
Don’t require NumLock to be locked. Foot has no idea _which_ modifier
the user has mapped NumLock to, meaning we really cannot require it to
be locked.
2020-12-01 18:27:56 +01:00
Daniel Eklöf
282ca89168
Merge branch 'base64-padding-fix' 2020-11-30 20:15:41 +01:00
Daniel Eklöf
f55e65808c
Merge branch 'simplify-config-struct' 2020-11-30 20:14:37 +01:00
Daniel Eklöf
9e1746cc29
selection: do not try to paste un-handled mime types
Closes #230
2020-11-30 20:04:17 +01:00
Daniel Eklöf
043b741008
selection: offer clipboard content in more mime types 2020-11-30 20:02:47 +01:00
Daniel Eklöf
09c88e6715
input: improved debug logging of pressed keys 2020-11-30 20:01:46 +01:00
Craig Barnes
c66ad27cc8 base64: only allow padding bytes at the end of a string when decoding 2020-11-30 06:06:28 +00:00
Craig Barnes
adde947fc5 config: replace union in config struct with simple width/height members 2020-11-30 02:24:38 +00:00
Daniel Eklöf
0beed9fcf6
Merge branch 'base64-optimize' 2020-11-29 11:17:50 +01:00
Craig Barnes
8d568143da base64: optimize error checking in base64_decode() 2020-11-29 07:19:58 +00:00
Craig Barnes
31c73f0cf0 csi: add new private mode that makes the Escape key emit "\E[27;1;27~"
This mode can be set by client programs with the DECSET, DECRST,
XTSAVE and XTRESTORE sequences by using 27127 as the parameter.

The sequence "\E[27;1;27~" is encoded in the same way as is done by
xterm's "modifyOtherKeys" mode. Even though xterm itself never emits
such a sequence for the Escape key, many programs already have
support for parsing this style of key sequence.
2020-11-29 04:04:57 +00:00
Daniel Eklöf
c213ee90f1
keymap: add ‘CSI 27;<mod>;27~’ escapes for Esc with modifiers 2020-11-28 11:50:32 +01:00
Daniel Eklöf
016c703b3d
doc: foot.1: add IRC channel 2020-11-27 22:39:33 +01:00
Daniel Eklöf
cf1c92eae5
readme: better link to freenode 2020-11-27 19:48:40 +01:00
Daniel Eklöf
632dda93d3
readme: rename ‘IRC, social media’ -> ‘Contact’ 2020-11-27 19:06:41 +01:00
Daniel Eklöf
f6dcb88771
readme: irc: add channel and my username 2020-11-27 18:54:18 +01:00
Daniel Eklöf
abe6a4f212
Merge branch 'split-cursor-blink-state'
Closes #218
2020-11-27 17:14:16 +01:00