aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * ime: render pre-edit textDaniel Eklöf2020-12-07-52/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by allocating cells for the pre-edit text when receiving the text-input::done() call, and populating them by converting the utf-8 formatted pre-edit text to wchars. We also convert the pre-edit cursor position to cell positions (it can cover multiple cells). When rendering, we simply render the pre-edit cells on-top off the regular grid. While doing so, we also mark the underlying, “real”, cells as dirty, to ensure they are re-rendered when the pre-edit text is modified or removed.
| * ime: wip: commit all changes in ‘done()’Daniel Eklöf2020-12-07-6/+64
| |
| * ime: feed committed string to client applicationDaniel Eklöf2020-12-07-0/+4
| |
| * ime: disable text-input on surface leaveDaniel Eklöf2020-12-07-2/+4
| |
| * ime: wip: add text-input object to seatDaniel Eklöf2020-12-07-0/+147
|/
* changelog: DECSET 27127 - modifies Esc to send \E[27127~ instead of \EDaniel Eklöf2020-12-07-0/+3
|
* Merge branch 'allow-key-collision-if-action-is-the-same'Daniel Eklöf2020-12-07-4/+17
|\ | | | | | | Closes #233
| * config: ignore “self” when detecting key binding collisionsDaniel Eklöf2020-12-05-4/+17
|/ | | | | | | | | | | | | | | | | | | | | | | 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
* changelog: remove ‘crash when pasting non-textual clipboard content’Daniel Eklöf2020-12-05-4/+0
| | | | This crash doesn’t not exist in any release versions.
* fdm: do *not* keep polling on EINTRDaniel Eklöf2020-12-04-5/+4
| | | | | | 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.
* Merge branch 'releases/1.5'Daniel Eklöf2020-12-01-15/+31
|\
| * meson/pkgbuild: bump version to 1.5.41.5.4releases/1.5Daniel Eklöf2020-12-01-2/+2
| |
| * input: relax requirements for overriding keypad application modeDaniel Eklöf2020-12-01-9/+1
| | | | | | | | | | | | 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.
| * keymap: add ‘CSI 27;<mod>;27~’ escapes for Esc with modifiersDaniel Eklöf2020-12-01-0/+16
| |
| * doc: foot.5: minor highlighting fixesDaniel Eklöf2020-12-01-5/+6
| |
| * doc: foot.1: no need to say foot.ini twiceDaniel Eklöf2020-12-01-1/+1
| |
| * changelog: update contributorsDaniel Eklöf2020-12-01-0/+5
| |
| * render: don’t call term_arm_blink_timer() from multiple threadsDaniel Eklöf2020-12-01-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * sixel: fix crash when an explicit sixel size had a height less than 6 pixelsDaniel Eklöf2020-12-01-4/+2
| |
| * client: fix handling of "-m" command-line flagCraig Barnes2020-12-01-1/+2
| |
| * render: allow-overflow: require a space in the next cellDaniel Eklöf2020-12-01-1/+5
| | | | | | | | | | | | | | | | 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
| * keymap: fix alt+return combosDaniel Eklöf2020-12-01-11/+12
| | | | | | | | | | | | | | | | 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.
| * keymap: use same lookup table for Tab and ISO_Left_TabDaniel Eklöf2020-12-01-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * readme: don’t uppercase titlesDaniel Eklöf2020-12-01-2/+2
| |
| * config: enable allow-overflowing-double-width-glyphs by defaultDaniel Eklöf2020-12-01-5/+9
| |
| * changelog: fix link to readme#keypadDaniel Eklöf2020-12-01-2/+3
| |
| * readme/doc:foot.1: document the (new) keypad behaviorDaniel Eklöf2020-12-01-1/+44
| |
| * input: enforce ‘numerical’ keypad mode when Num Lock override is enabledDaniel Eklöf2020-12-01-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * input: track num lock stateDaniel Eklöf2020-12-01-0/+6
| |
| * csi: implement “CSI ? 1035” - toggle Num Lock overrideDaniel Eklöf2020-12-01-0/+12
| | | | | | | | | | This adds a num_lock_modifier state to the terminal, and hooks up “CSI?1035h/l” to toggle it.
| * input: use XKB_MOD_NAME_* macros instead of hard-coded stringsDaniel Eklöf2020-12-01-4/+4
| |
| * wayland: preempt render scheduling in ‘configure’ eventsDaniel Eklöf2020-12-01-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * changelog: add entry for 1.5.4Daniel Eklöf2020-12-01-0/+7
| |
* | Merge branch 'modify-escape-key'Daniel Eklöf2020-12-01-1/+16
|\ \ | | | | | | | | | Closes #225
| * | csi: add new private mode that makes the Escape key emit "\E[27;1;27~"Craig Barnes2020-11-29-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'clipboard-ignore-unhandled-mime-types'Daniel Eklöf2020-12-01-2/+8
|\ \ \ | | | | | | | | | | | | Closes #230
| * | | selection: do not try to paste un-handled mime typesDaniel Eklöf2020-11-30-2/+8
| | | | | | | | | | | | | | | | Closes #230
* | | | input: relax requirements for overriding keypad application modeDaniel Eklöf2020-12-01-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'base64-padding-fix'Daniel Eklöf2020-11-30-6/+17
|\ \ \ \
| * | | | base64: only allow padding bytes at the end of a string when decodingCraig Barnes2020-11-30-6/+17
| | | | |
* | | | | Merge branch 'simplify-config-struct'Daniel Eklöf2020-11-30-46/+16
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | config: replace union in config struct with simple width/height membersCraig Barnes2020-11-30-46/+16
| |/ / /
* | | | selection: offer clipboard content in more mime typesDaniel Eklöf2020-11-30-0/+10
| | | |
* | | | input: improved debug logging of pressed keysDaniel Eklöf2020-11-30-10/+9
|/ / /
* | | Merge branch 'base64-optimize'Daniel Eklöf2020-11-29-32/+27
|\ \ \ | |/ / |/| |
| * | base64: optimize error checking in base64_decode()Craig Barnes2020-11-29-32/+27
|/ /
* | keymap: add ‘CSI 27;<mod>;27~’ escapes for Esc with modifiersDaniel Eklöf2020-11-28-0/+16
| |
* | doc: foot.1: add IRC channelDaniel Eklöf2020-11-27-0/+4
| |
* | readme: better link to freenodeDaniel Eklöf2020-11-27-1/+2
| |
* | readme: rename ‘IRC, social media’ -> ‘Contact’Daniel Eklöf2020-11-27-2/+2
| |
* | readme: irc: add channel and my usernameDaniel Eklöf2020-11-27-2/+12
| |
* | Merge branch 'split-cursor-blink-state'Daniel Eklöf2020-11-27-94/+52
|\ \ | | | | | | | | | Closes #218
| * | term: split cursor blink state into twoDaniel Eklöf2020-11-26-38/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two different escape sequences that can be used to set the cursor blink state: ‘CSI ? 12 h/l’ and ‘CSI Ps SP q’. Up until now, they both modified the same internal state in foot. This meant you could enable a blinking cursor with e.g. ‘CSI ? 12 h’ and then disable it with ‘CSI 2 SP q’. Since the ‘CSI ? 12’ escapes are used in the civis/cnorm/cvvis terminfo entries, applications often ended up disabling the blink state on exit (typically be emitting ‘cnorm’), requiring users to manually re-enable blinking. By splitting the internal state into two separate states, we can improve the situation. The cursor will blink if at least one of the two have been enabled. The setting in foot.ini sets the default state of the ‘CSI Ps SP q’ escape. This means if the user has enabled blinking in the configuration, the cursor will blink regardless of civis/cnorm/cvvis. Which probably is what the user wants. If the user has NOT enabled blinking, civis/cnorm/cvvis act as intended: cvvis blink, civis and cnorm do not. If an application overrides the cursor blink/style with ‘CSI Ps SP q’, that will override the user’s setting in foot.ini. But most likely that too is intended (for example, the user may have configured the application to use a different cursor style). And, a well written application will emit the ‘Se’ terminfo sequence on exit, which in foot is defined to ‘CSI SP q’, which will reset both the style and blink state to the user configured style/state. Closes #218
| * | term: remove read-only properties copied from the configDaniel Eklöf2020-11-26-56/+37
| | | | | | | | | | | | Use the config directly instead.
* | | main: tag fdm loop with likely() and unlikely()Daniel Eklöf2020-11-26-2/+2
| | |
* | | fdm: keep polling on EINTRDaniel Eklöf2020-11-26-4/+5
| | |
* | | doc: foot.5: minor highlighting fixesDaniel Eklöf2020-11-26-5/+6
| | |
* | | doc: foot.1: no need to say foot.ini twiceDaniel Eklöf2020-11-26-1/+1
|/ /
* | changelog: update contributor listDaniel Eklöf2020-11-25-0/+1
| |
* | Merge branch 'dont-reflow-alt-screen'Daniel Eklöf2020-11-25-20/+140
|\ \ | | | | | | | | | Closes #221
| * | grid: resize_without_reflow: don’t call min() on every loop iterationDaniel Eklöf2020-11-25-1/+1
| | |
| * | resize: don’t reflow text on alt screenDaniel Eklöf2020-11-25-20/+140
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alt screen applications normally reflow/readjust themselves on a window resize. When we do it too, the result is graphical glitches/flashes since our re-flowed text is rendered in one frame, and the application re-flowed text soon thereafter. We can’t avoid rendering some kind of re-flowed frame, since we don’t know when, or even if, the application will update itself. To avoid glitches, we need to render, as closely as possible, what the application itself will render shortly. This is actually pretty simple; we just need to copy the visible content over from the old grid to the new grid. We don’t bother with text re-flow, but simply truncate long lines. To simplify things, we simply cancel any active selection (since often times, it will be corrupted anyway when the application redraws itself). Since we’re not reflowing text, there’s no need to translate e.g. the cursor position - we just keep the current position (but bounded to the new dimensions). Fun thing: ‘less’ gets corrupted if we don’t leave the cursor at the (new) bottom row. To handle this, we check if the cursor (before resize) is at the bottom row, and if so, we move it to the new bottom row. Closes #221
* | Merge branch 'wl_output'Daniel Eklöf2020-11-25-4/+11
|\ \ | | | | | | | | | Closes #219
| * | wayland: Use wl_output_release with wl_output v3Kenny Levinsen2020-11-24-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wl_output_release, the use of which was recently introduced, is not available until wl_output interface version 3. However, only wl_output version 2 was bound. This lead to protocol errors when a display was disconnected, causing foot to terminate. Instead, only use wl_output_release if wl_output version 3 is provided and bound. Otherwise, just use wl_output_destroy. Closes: https://codeberg.org/dnkl/foot/issues/219
* | | Merge branch 'sixel-pgo'Daniel Eklöf2020-11-24-2/+50
|\ \ \
| * | | pkgbuild: add --sixel to generate-alt-random-writesDaniel Eklöf2020-11-24-1/+1
| | | |
| * | | install: add --sixel to suggested command line for generate-alt-random-writesDaniel Eklöf2020-11-24-0/+1
| | | |
| * | | scripts: generate-alt-random-writes: add --sixelDaniel Eklöf2020-11-24-1/+48
|/ / / | | | | | | | | | | | | When --sixel is specified, we generate random sixel images in the ‘normal’ screen, after exiting the alt screen.
* | | term: place frequently accessed members first in term structDaniel Eklöf2020-11-24-35/+34
| | | | | | | | | | | | To hopefully use the cache better.
* | | Merge branch 'increase-sixel-default-max-size'Daniel Eklöf2020-11-24-27/+21
|\ \ \ | |/ / |/| |
| * | sixel: change default max size to 10000x10000Daniel Eklöf2020-11-23-27/+21
|/ / | | | | | | | | It used to be the size of the window. This caused images to be cropped when the application emitting them didn’t change the max size.
* | render: don’t call term_arm_blink_timer() from multiple threadsDaniel Eklöf2020-11-23-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | sixel: fix crash when an explicit sixel size had a height less than 6 pixelsDaniel Eklöf2020-11-23-4/+2
| |
* | foot/footclient: add short options to all command line optionsDaniel Eklöf2020-11-23-22/+24
| | | | | | | | | | | | | | | | | | | | | | e81388336750a20a2da98a57e9726c8ba1b481e3 added “missing” short command line options to footclient. Except they weren’t missing; they were intentionally missing short options and only supported long options. This commit makes the new/missing short options “official”, by adding documentation, zsh completions and including them in usage().
* | changelog: add issue ref to footclient -w/-WDaniel Eklöf2020-11-23-1/+1
| |
* | Merge branch 'footclient-w'Daniel Eklöf2020-11-23-13/+68
|\ \ | | | | | | | | | Closes #189.
| * | client: add new "--window-size-*" options to docs and CHANGELOG.mdCraig Barnes2020-11-22-0/+12
| | |
| * | client: add "--window-size-pixels" and "--window-size-chars" optionsCraig Barnes2020-11-22-13/+56
|/ /
* | Merge branch 'pgo'Daniel Eklöf2020-11-22-73/+536
|\ \ | | | | | | | | | Closes #107
| * | pkgbuild: revert accidental update of versionDaniel Eklöf2020-11-22-1/+1
| | |
| * | install: minor tweaks to PGO instructionsDaniel Eklöf2020-11-22-3/+5
| | |
| * | changelog: update link to install instructions for PGODaniel Eklöf2020-11-22-1/+1
| | |
| * | install: re-write release build instructionsDaniel Eklöf2020-11-22-42/+51
| | |
| * | install: re-write description of recommended flags, and add size comparisonDaniel Eklöf2020-11-22-10/+27
| | |
| * | pkgbuild: no need to run pgo input *that* many timesDaniel Eklöf2020-11-22-1/+1
| | |
| * | changelog: add note about PGO without WaylandDaniel Eklöf2020-11-22-0/+9
| | |
| * | install: no need to run input *that* many timesDaniel Eklöf2020-11-22-1/+1
| | |
| * | pgo: feed VT data through fdm_ptmx(), not vt_from_slave()Daniel Eklöf2020-11-22-7/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fdm_ptmx(), the FDM callback handler for ptmx data, is just as much in the hot path as vt_from_slave(). It is also slightly more complicated than a read() followed by a call to vt_from_slave(). As a result, some benchmarks performed significantly worse in a partial PGO build than in a full PGO build, since fdm_ptmx() wasn’t PGO:d. To be able to feed data through fdm_ptmx(), we need to set up the delayed rendering timer FDs, configure the timeout values, and provide a readable FD it can read the VT data from. The latter is done with a memory FD. This ensures *all* VT data is loaded into memory before we feed it to the parser.
| * | render: no need to call attrs_to_font(), we already have a font referenceDaniel Eklöf2020-11-22-8/+4
| | |
| * | pgo: initialize (mouse) selectionDaniel Eklöf2020-11-22-0/+4
| | |
| * | pgo: initialize a dummy wayland backendDaniel Eklöf2020-11-22-0/+11
| | | | | | | | | | | | | | | | | | * Empty seat list * Empty monitor list * Add dummy terminal instance to terminal list
| * | scripts: generate-alt-random-writes: add unicode and multi-column charsDaniel Eklöf2020-11-22-1/+1
| | |
| * | install: add --attr-{bold,italic,underline} to generate-alt-random-writesDaniel Eklöf2020-11-22-1/+4
| | |
| * | pkgbuild: add --attr-{bold,italic,underline} to generate-alt-random-writesDaniel Eklöf2020-11-22-1/+1
| | |
| * | scripts: generate-alt-random-writes: add support for bold/italic/underlineDaniel Eklöf2020-11-22-0/+10
| | |
| * | scripts: generate-alt-random-writes: don’t always reset all attributesDaniel Eklöf2020-11-22-4/+5
| | |
| * | scripts: generate-alt-random-writes: mix \e[S with \nDaniel Eklöf2020-11-22-1/+5
| | |
| * | remove pre-generated input corpus for PGODaniel Eklöf2020-11-22-12/+44
| | |
| * | pgo: updated stimuli (256-indexed colors)Daniel Eklöf2020-11-22-262144/+1
| | |
| * | pkgbuild: add --colors-256 to generate-alt-random-writesDaniel Eklöf2020-11-22-1/+1
| | |