aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * input: reset mouse button click counter when mouse movesDaniel Eklöf2022-01-13-0/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in #883, creating a block selection (with ctrl+BTN_LEFT), then *quickly* (within 300ms from) creating a new one, will, in fact, _not_ create a new block selection, but a ‘select-word-whitespace’ selection (ctrl+BTN_LEFT-2). A similar effect can be seen with plain selections (BTN_LEFT). Click and drag to make a selection, but *release*, and make a new selection within 300ms from the initial button press, and the new selection is suddenly a word-based selection. This happens because triggering a binding does *not* reset the button click counter. So, shouldn’t we just do that? No, because we rely on this behavior to handle single-, double- and triple-click actions. If we were to reset the button click handler, then we’d have to instead delay triggering the first action with 300ms, which would make things appear laggy. If we don’t do this, it would be impossible to double- and triple-click, since the single-click action would keep resetting the click counter. This patch takes a slightly different approach; we reset the click counter when the mouse has moved “too much”. For now, “too much” is when the cursor has moved to a different cell. This way, single-, double- and triple-clicks continue to work as before. But, creating actual selections, and then quickly releasing and starting a new selection produces the expected results. Closes #883
* input: reset view when pasting from primaryDaniel Eklöf2022-01-11-0/+3
| | | | | We’re already doing this for keyboard input, and regular clipboard pastes.
* Merge branch 'wl-output-version-4'Daniel Eklöf2022-01-06-1/+9
|\ | | | | | | Closes #876
| * wayland: don’t try to bind wl_output version 4 unconditionallyDaniel Eklöf2022-01-06-1/+9
|/ | | | | | | | | | | The compositor may offer version 4, while we’re still linked against an old libwayland that does not implement version 4. While we properly #ifdef the callbacks from version 4, we were still requesting version 4 (if offered by the compositor), even when compiled against a too old libwayland. Closes #876
* Merge branch 'argc-is-zero'Daniel Eklöf2022-01-02-6/+11
|\
| * changelog: fixed failing to launch when exec(3):ed with an empty argvDaniel Eklöf2022-01-01-0/+1
| |
| * foot{,client}: handle argc == 0Daniel Eklöf2022-01-01-6/+10
|/ | | | | | | | | | | | | | Our getopt_long() based argument parser would (correctly) break out of the while loop immediately. However, we would then proceed and decrement ‘argc’ by 1, resulting in it being -1. This was then passed to the terminal constructor, which passed it on to the client application fork+exec logic. That finally resulted in an exec(3) failure: err: slave.c:339: SHELL=/bin/zsh: failed to execute: No such file or directory err: fdm.c:215: no such FD: 7 info: main.c:604: goodbye
* doc: ctlseq: add missing ‘[‘ to a couple of CSI sequencesDaniel Eklöf2022-01-01-5/+5
|
* doc: ctlseq: kitty kbd: swap name/fromDaniel Eklöf2022-01-01-4/+4
|
* doc: ctlseq: kitty keyboard protocolDaniel Eklöf2022-01-01-0/+17
|
* doc: ctlseq: private mode 1016 - SGR-PixelsDaniel Eklöf2022-01-01-0/+3
|
* Merge branch 'sgr-pixels'Daniel Eklöf2022-01-01-8/+44
|\ | | | | | | Closes #762
| * SGR-Pixels mouse mode, closes #762Autumn Lamonte2022-01-01-8/+44
|/
* test: config: colors: test ‘256’ is an invalid keyDaniel Eklöf2021-12-30-0/+2
|
* test: config: test colors sectionDaniel Eklöf2021-12-29-1/+56
|
* test: config: csd: test color optionsDaniel Eklöf2021-12-29-6/+12
|
* test: config: add test_color() utility functionDaniel Eklöf2021-12-29-0/+34
|
* test: config: test csd sectionDaniel Eklöf2021-12-29-0/+37
|
* test: config: test mouse sectionDaniel Eklöf2021-12-29-0/+18
|
* test: config: test cursor sectionDaniel Eklöf2021-12-29-0/+27
|
* test: config: test URL sectionDaniel Eklöf2021-12-29-0/+24
|
* test: config: rename ‘conf_ptr’ -> ‘ptr’Daniel Eklöf2021-12-29-21/+21
|
* test: config: scrollback: test indicator-posititionDaniel Eklöf2021-12-29-1/+9
|
* test: config: main: test dpi-aware, selection-target and initial-window-modeDaniel Eklöf2021-12-29-3/+27
|
* test: config: add test_enum() utility functionDaniel Eklöf2021-12-29-0/+27
|
* render: csd: scale border width when rendering the CSD border’s visible partDaniel Eklöf2021-12-29-2/+5
|
* render: limit the unfocused block cursor’s outline widthDaniel Eklöf2021-12-29-4/+5
| | | | Ensure the outline width doesn’t exceed the cell width/height.
* Merge branch 'scale-outline-of-unfocused-block-cursor'Daniel Eklöf2021-12-29-4/+9
|\
| * render: scale the width out the outline of the unfocused block cursorDaniel Eklöf2021-12-28-4/+9
|/
* Merge branch 'apply-scrollback-multiplier-in-alternate-scroll-mode'Daniel Eklöf2021-12-28-7/+14
|\
| * input: apply scrollback.multplier in alterate scroll modeDaniel Eklöf2021-12-28-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, foot only applied [scrollback].multiplier on the normal screen, never the alt screen. However, scrolling can be done in two ways on the alt screen: If the application has enabled mouse support, we simply pass on the mouse scroll events to the application. Here, it makes sense to not apply the multiplier, and instead let the application choose how much to scroll for each scroll event. But, if the application has not enabled mouse support, we can still scroll by simulating the arrow keys being pressed - alternate scrolling (private mode 1007). This is enabled by default in foot (but can be disabled in foot.ini with the [mouse].alternate-scroll-mode setting). In this mode, it makes more sense to apply the multiplier. And that’s what this patch changes - the multiplier is now applied, on the alt screen, when the application has not enabled mouse support, and alternate scrolling has been enabled in foot. Closes #859
| * term_mouse_grabbed(): make ‘seat’ argument constDaniel Eklöf2021-12-28-3/+4
|/
* changelog: irc+ircs added to default value of url.protocolsDaniel Eklöf2021-12-27-0/+2
|
* Merge branch 'irc-url'Daniel Eklöf2021-12-27-1/+3
|\
| * Add irc:// to default URL schemesSimon Ser2021-12-27-1/+3
|/
* term: print: erase existing OSC-8 URIDaniel Eklöf2021-12-26-1/+4
| | | | | | | | | | If we have an “active” OSC-8 URI, term_print() would correctly replace an existing URI with the new one. But, if we don’t have an active URI, an existing URI was not erased. This can be reproduced with e.g echo -e '\e]8;;http://foo.bar\e\\foobar\e]8;;\e\\\b\b\b\b\b😀\n'
* test: config: fix format specifier: uint32_t needs %u, not %huDaniel Eklöf2021-12-26-1/+1
|
* Merge branch 'term-erase-refactor'Daniel Eklöf2021-12-26-49/+52
|\
| * term_erase(): replace coord-typed arguments with regular intsDaniel Eklöf2021-12-26-49/+52
|/
* Merge branch 'cell-colors-use-index'Daniel Eklöf2021-12-26-79/+61
|\
| * sixel: VT state’s bg color may now be an index, rather than an actual color valueDaniel Eklöf2021-12-26-3/+18
| |
| * csi: store color index, not actual color, in cell’s fg/bg attributesDaniel Eklöf2021-12-26-74/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using indexed colors (i.e. SGR 30/40/90/100), store the index into the cell’s fg/bg attributes, not the actual color value. This has a couple of consequences: Color table lookup is now done when rendering. This means a rendered cell will always reflect the *current* color table, not the color table that was in use when the cell was printed to. This simplifies the OSC-4/104 logic, since we no longer need to update the grid - we just have to damage it to trigger rendering. Furthermore, this change simplifies the VT parsing, since we no longer need to do any memory loads (except loading the SGR parameter values), only writes.
| * csi: no need to set VT state’s fg/bg to the default ones on SGR resetDaniel Eklöf2021-12-26-2/+0
|/
* test: config: test ‘scrollback’ sectionDaniel Eklöf2021-12-26-0/+20
|
* test: config: add test_double() utility functionDaniel Eklöf2021-12-26-0/+37
|
* test: config: add test_uint32() utility functionDaniel Eklöf2021-12-26-0/+37
|
* config: update most parse_section_*() functions to return in each if-branchDaniel Eklöf2021-12-25-28/+20
|
* config: scrollback: add missing return for ‘lines’Daniel Eklöf2021-12-25-1/+1
| | | | The missing return meant failures were not reported correctly.
* test: config: bindings: verify pipe argvDaniel Eklöf2021-12-25-3/+39
|
* test: config: test [bell].command (spawn template)Daniel Eklöf2021-12-25-2/+2
|
* test: config: test [main].notify (spawn template)Daniel Eklöf2021-12-25-1/+2
|
* test: config: add test_spawn_template() utility functionDaniel Eklöf2021-12-25-0/+42
|
* tokenize: free content of argv on failure, and reset the argv pointerDaniel Eklöf2021-12-25-3/+4
| | | | | This fixes a memory leak when we failed to parse a command line (for example, because it contained an unclosed quote).
* test: config: ‘bell’ sectionDaniel Eklöf2021-12-25-0/+19
|
* changelog: grammarDaniel Eklöf2021-12-23-2/+2
|
* Merge branch 'crash-on-csd-size-1'Daniel Eklöf2021-12-23-6/+20
|\ | | | | | | Closes #857
| * render: make sure ‘maximized’ button doesn’t use negative coordinatesDaniel Eklöf2021-12-22-1/+7
| |
| * config: csd.border_width now always reflects the full/total widthDaniel Eklöf2021-12-22-5/+13
|/
* meson: generate-version: use CURRENT_SOURCE_DIR instead of SOURCE_ROOTDaniel Eklöf2021-12-21-1/+1
|
* slave: re-use ‘struct sigaction’ variable when resetting SIGHUP+SIGPIPEDaniel Eklöf2021-12-18-2/+4
|
* slave: restore SIGPIPEDaniel Eklöf2021-12-18-1/+2
|
* Merge branch 'error-on-empty-key-or-mouse-binding'Daniel Eklöf2021-12-18-4/+18
|\ | | | | | | Closes #851
| * test: config: verify setting an empty key/mouse binding failsDaniel Eklöf2021-12-18-4/+10
| |
| * config: error out on empty key- or mouse bindingDaniel Eklöf2021-12-18-0/+8
|/ | | | Closes #851
* Merge branch 'shm-buffer-busy-sometimes-not-set'Daniel Eklöf2021-12-18-10/+21
|\ | | | | | | Closes #844
| * shm: get_buffer(): make sure buffer->busy is setDaniel Eklöf2021-12-18-10/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | When going through the cached buffers, we only set buffer->busy on the *first* re-usable buffer we found. In some cases, we will find more than one re-usable buffer. In this case, we select the “youngest” one (i.e the one most recently used, in the hopes that we can use damage tracking instead of re-rendering the entire buffer). If the “current” buffer is younger than the previously detected, re-usable, buffer, then we unref:ed the previously selected buffer, and replaced it with the current one. But, we did not sanitize it. That is, we did not: * set buffer->busy * clear its dirty region * clear its scroll damage That buffer would eventually get rendered to, and committed to the compositor. Later, the compositor would free it. And there, in our buffer_release() callback, we’d assert that buffer->busy was set. And fail. Closes #844
* Merge branch 'lower-case-all-theme-names'Daniel Eklöf2021-12-18-0/+6
|\
| * themes: consistently use snake-case in theme namesDaniel Eklöf2021-12-18-0/+6
|/
* Merge branch 'apprentice-theme'Daniel Eklöf2021-12-18-0/+26
|\
| * Add Apprentice themeOğuz Ersen2021-12-17-0/+26
|/
* Merge branch 'kitty-kbd-dont-fallback-to-xkb-symbol'Daniel Eklöf2021-12-16-4/+6
|\
| * input: kitty: don’t fallback to the XKB symbolDaniel Eklöf2021-12-16-4/+6
|/ | | | | | | | | | | When handling “generic” keys (i.e. keys not in the Kitty keymap), we use the pressed key’s Unicode codepoint as “key” in the kitty CSI. If we failed to convert the XKB symbol to a Unicode codepoint, we used to (before this patch), fallback to using the XKB symbol as is. This can never be correct... and it caused us to emit a meaningless CSI for XKB_KEY_ISO_Next_Group, which confused e.g. Kakoune.
* Merge branch 'zooming-with-dpi-aware-no'Daniel Eklöf2021-12-14-8/+14
|\ | | | | | | Closes #842
| * term: font_size_adjust: use DPI=96 when font is *not* scaled by DPIDaniel Eklöf2021-12-14-8/+14
|/ | | | Closes #842
* Merge branch 'wl-output-name-description'Daniel Eklöf2021-12-14-6/+39
|\
| * wayland: add wl_output.name() and wl_output.description()Daniel Eklöf2021-12-13-1/+28
| | | | | | | | | | | | | | | | These are new in version 4 of the wl_output interface (first included in wayland-1.20). This allows us to get the name and description of the outputs, also on compositors without the XDG output interface.
| * wayland: estimate scaled (logical) width/height, if not providedDaniel Eklöf2021-12-13-5/+11
|/ | | | | | | | | | | This makes us slightly more resilient against a missing XDG output interface. We use the “real” (the physical) dimensions, combined with the scaling factor, to estimate the logical dimensions. This works out correctly with non-fractional scaling, but not otherwise.
* input: kitty: return the result of term_to_slave()Daniel Eklöf2021-12-12-2/+1
| | | | If term_to_slave() fails, then the key wasn’t ‘handled’...
* Merge branch 'kitty-static-keymap'Daniel Eklöf2021-12-11-142/+172
|\
| * kitty: replace switch with a static keysym tableDaniel Eklöf2021-12-11-142/+172
|/
* Merge branch 'config-refactor-and-verify-binding-collisions-after-load'Daniel Eklöf2021-12-11-880/+730
|\
| * config: NOINLINE modifiers_to_str()Daniel Eklöf2021-12-11-1/+1
| |
| * test: config: verify collisions with the mouse override modifiers are detectedDaniel Eklöf2021-12-11-1/+11
| |
| * test: config: port key/mouse binding tests to new APIDaniel Eklöf2021-12-11-217/+207
| |
| * config: resolve collisions: argv_compare() returns -1,0,+1, not a boolDaniel Eklöf2021-12-11-1/+4
| |
| * config: resolve collisions: return ‘false’ on failureDaniel Eklöf2021-12-11-0/+2
| |
| * config: use “(default)” as path in log message, if path is NULLDaniel Eklöf2021-12-11-1/+2
| |
| * config: remove commented out struct definitionDaniel Eklöf2021-12-11-15/+0
| |
| * config: remove unneeded function prototypeDaniel Eklöf2021-12-11-4/+0
| |
| * config: unify key- and mouse bindingsDaniel Eklöf2021-12-11-411/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, key- and mouse-bindings structs (the non-layout specific ones) are unified into a single struct. The logic that parses, and manages, the key- and mouse binding lists are almost identical. The *only* difference between a key- and a mouse binding is that key bindings have an XKB symbol, and mouse bindings a button and click-count. The new, unified, struct uses a union around these, and all functions that need to know which members to use/operate on now takes a ‘type’ parameter.
| * config: do mouse binding collision detection after loading the confDaniel Eklöf2021-12-11-208/+220
| |
| * config: value_to_key_combos(): reset modifiers in bindingDaniel Eklöf2021-12-11-0/+1
| |
| * main: ignore SIGPIPEDaniel Eklöf2021-12-11-2/+5
| | | | | | | | | | | | | | | | | | | | | | We want to handle SIGPIPEs without crashing... One way to trigger this was to use e.g. pipe-visible=[cat /foo/bar] Control+Shift+q That is, pipe output to something that did not consume it. This led to a SIGPIPE when we tried to write the terminal contents to the pipe, and crashed the whole foot instance.
| * config: do key binding collision detection after loading the confDaniel Eklöf2021-12-11-199/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to write, to swap two key bindings: [key-bindings] show-urls-launch=Control+Shift+r search-start=Control+Shift+u instead of: [key-bindings] search-start=none show-urls-launch=Control+Shift+r search-start=Control+Shift+u This should simplify the configuration for people who replace a lot of the default key bindings. This also simplifies the parsing somewhat, since we no longer has to parse a key-binding into a temporary list, ensure it doesn’t have any collisions, and then copy it into the actual key binding list. _While_ parsing a key-binding, we still need a temporary array (at least for the time being), but that temporary array is no longer visible outside the parsing function that allocates it.
| * config: remove struct key_combo, use config_key_binding insteadDaniel Eklöf2021-12-11-179/+146
|/
* test: meson: add fontconfig to ‘test-config’ binary (fixes PGO builds)Daniel Eklöf2021-12-11-1/+1
|
* Merge branch 'config-unittest'Daniel Eklöf2021-12-11-0/+679
|\ | | | | | | Part of #813
| * test: config: mouse-bindingsDaniel Eklöf2021-12-11-4/+171
| |
| * test: config: key-bindingsDaniel Eklöf2021-12-11-0/+218
| | | | | | | | | | | | | | This adds tests for all [key-bindings] options, as well as an invalid “action”. The tests also verify key combo collisions are detected correctly.
| * tests: meson: link with tllistDaniel Eklöf2021-12-11-1/+1
| |