aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* changelog: prepare for 1.6.11.6.1Daniel Eklöf2020-12-21-3/+0
|
* changelog: mention -Wno-profile-instr-unprofiledDaniel Eklöf2020-12-21-0/+2
|
* changelog: mention --seed in in generate-alt-random.puDaniel Eklöf2020-12-21-0/+5
|
* generate-alt-random: ioctl(TIOCGWINSZ) may fail in run inside a containerDaniel Eklöf2020-12-21-5/+15
| | | | | | This _should_ only happen when we’re doing a partial PGO build, since then the script is run in the parent terminal. In this case, the user is expected to use --rows/--cols anyway.
* install: remove -march=nativeDaniel Eklöf2020-12-21-8/+4
| | | | | This simplifies the instructions. People interested in performance are likely to know how to use it.
* install.md: mention that packagers should not use -march=nativeDaniel Eklöf2020-12-21-0/+4
|
* install.md: add -Wno-profile-instr-unprofiled to clang flags in PGO buildsDaniel Eklöf2020-12-21-1/+4
|
* changelog: use -std=c11 instead of -std=c18Daniel Eklöf2020-12-21-0/+4
|
* meson: default to c11sterni2020-12-21-1/+1
| | | | | We don't need any C18 specifics, so C11 is also fine and more widely supported (i. e. in older clang versions).
* install: fix typo in ‘ninja’Daniel Eklöf2020-12-21-1/+1
|
* changelog: update ‘contributors’Daniel Eklöf2020-12-20-0/+3
|
* changelog: remove trailing ‘5’Daniel Eklöf2020-12-20-1/+1
|
* generate-alt-random: override detected width/height when --cols/--rows have been usedDaniel Eklöf2020-12-20-0/+2
| | | | | This ensures we have a valid width and height, that matches what the PGO helper binary expects.
* generate-alt-random: fix “new style” cube escapeDaniel Eklöf2020-12-20-1/+1
| | | | It’s “38:5:<idx>”, not “38:2:5:<idx>”.
* generate-alt-random-writes: use python random, allow setting a seedsterni2020-12-20-99/+101
| | | | | | | | | | | | | | | | | | | Using Python's own PRNG should make the code cleaner and allow for reproducible stimulus files if that is desired via setting --seed (at least for the same versions of the script, changing the kind and/or order of the random calls will of course impact the output in the future). I did the following substitutions: * rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n → random.randrange(n) * rand.read(1)[0] → random.randrange(256) * rand.read(n) → [random.randrange(256) for _ in range(n)] (better alternative would have been random.randbytes(n), but is only available for Python >= 3.9, switching to this in the future will impact output) * list[rand.read(1) % len(list)] → random.choice(list)
* render: fix rounding error when calculating background color with alphaDaniel Eklöf2020-12-20-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | We use pre-multiplied alpha color channels, but were having bad rounding errors due to the alpha divider being truncated to an integer. The algorithm for pre-multiplying a color channel is: alpha_divider = 0xffff / alpha pre_mult_color = color / alpha_divider In order to fix the rounding errors, we could turn ‘alpha_divider’ into a double. That however would introduce a performance penalty since now we’d need to do floating point math for each cell. The algorithm can be trivially converted to: pre_mult_color = color * alpha / 0xffff Since both color and alpa values are < 65536, the multiplication is “safe”; it will not overflow an uint32_t. Closes #249
* meson: add wl_proto_headers to pgo executableDaniel Eklöf2020-12-20-1/+1
| | | | This fixes a build failure of pgo.o
* changelog: mention meson dependency fixDaniel Eklöf2020-12-20-0/+5
|
* changelog: add 1.6.1 sectionDaniel Eklöf2020-12-20-0/+11
|
* meson: add missing "wl_proto_headers" dependency for pgolib and vtlibCraig Barnes2020-12-20-0/+2
| | | | | | | | | | | | | | Dependency chains: * pgolib -> terminal.c -> terminal.h -> wayland.h * vtlib -> csi.c -> config.h -> wayland.h wayland.h includes <primary-selection-unstable-v1.h>, which must be generated by a custom_target() rule *before* any sources that require it are built. Failure to fully specify these dependencies can otherwise result in a race condition, where a dependent source file gets compiled (and fails with a "header not found" error) before the header itself has been generated.
* changelog: fix link to "1.6.0" headingCraig Barnes2020-12-20-1/+1
|
* term: fix builds with debug logging enabledDaniel Eklöf2020-12-20-1/+1
| | | | DPI_AWARE_ON has been renamed to DPI_AWARE_YES
* meson/pkgbuild: bump version to 1.6.01.6.0Daniel Eklöf2020-12-18-2/+2
|
* changelog: prepare for 1.6.0Daniel Eklöf2020-12-18-6/+2
|
* changelog: move entry for dpi-aware up, to make it more visibleDaniel Eklöf2020-12-18-7/+7
|
* changelog: use code/monospace highlighting for foot.ini config optionsDaniel Eklöf2020-12-18-17/+17
|
* Merge branch 'dpi-aware-when-scaling-factor-is-one'Daniel Eklöf2020-12-18-37/+84
|\
| * readme: describe the new font sizing behaviorDaniel Eklöf2020-12-17-2/+6
| |
| * fonts: size fonts using the scaling factor when output scaling is enabledDaniel Eklöf2020-12-17-35/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the new ‘dpi-aware’ option with a new default value, ‘auto’. When set to ‘auto’, fonts are sized using monitors’ DPI when output scaling is disabled. When output scaling is enabled, fonts are instead sized using the scaling factor. The reasoning here is that a user that has enabled output scaling is obviously *not* relying on DPI scaling. Output scaling can also be a way to compensate for different viewing distances, in which case we do *not* want to break that by using DPI scaling. Users can still force DPI-only font sizing by setting ‘dpi-aware=yes’, or disable it completely by setting ‘dpi-aware=no’.
* | Merge branch 'statusline-terminfo-caps'Daniel Eklöf2020-12-18-0/+7
|\ \ | | | | | | | | | Closes #242
| * | terminfo: add status line capabilities: hs, dsl, fsl and tslDaniel Eklöf2020-12-18-0/+7
|/ / | | | | | | | | | | | | | | | | * hs - boolean, signals status line availability * tsl - to_status_line: begin an OSC 2 sequence (set window title) * fsl - from_status_line: OSC terminator * dsl - disable status line: \E]2;\E\\ - clears the window title Closes #242
* | Merge branch 'gruvbox-light'Daniel Eklöf2020-12-17-0/+21
|\ \ | |/ |/|
| * Add a gruvebox-light themeAdrienLeGuillou2020-12-17-0/+21
|/
* vt: codespell: ony -> onlyDaniel Eklöf2020-12-16-1/+1
|
* vt: don’t ignore extra private/intermediate charactersDaniel Eklöf2020-12-16-58/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take ‘\E(#0’ for example - this is *not* the same as ‘\E(0’. Up until now, foot has however treated them as the same escape, because the handler for ‘\E(0’ didn’t verify there weren’t any _other_ private characters present. Fix this by turning the ‘private’ array into a single 4-byte integer. This allows us to match *all* privates with a single comparison. Private characters are added to the LSB first, and MSB last. This means we can check for single privates in pretty much the same way as before: switch (term->vt.private) { case ‘?’: ... break; } Checking for two (or more) is much uglier, but foot only supports a *single* escape with two privates, and no escapes with three or more: switch (term->vt.private) { case 0x243f: /* ‘?$’ */ ... break; } The ‘clear’ action remains simple (and fast), with a single write operation. Collecting privates is potentially _slightly_ more complex than before; we now need mask and compare, instead of simply comparing, when checking how many privates we already have. We _could_ add a counter, which would make collecting privates easier, but this would add an additional write to the ‘clean’ action which is really bad since it’s in the hot path.
* csi: implement DECRQM (DEC modes), for realDaniel Eklöf2020-12-16-1/+46
| | | | | Previously, we always returned ‘2 - reset’, instead of the actual state of the requested mode.
* changelog: ECMA-4*8*Daniel Eklöf2020-12-16-1/+1
|
* changelog: group ‘bell’ entries togetherDaniel Eklöf2020-12-16-3/+3
|
* readme: add link to IRC channel logDaniel Eklöf2020-12-16-1/+2
|
* config_font_parse(): return fail/successDaniel Eklöf2020-12-15-11/+35
|
* csi: SGR 21 is “double underline”, not “disable bold” (according to ECMA-48)Daniel Eklöf2020-12-14-1/+4
|
* term: enabling application synchronized updates clear pending grid refreshDaniel Eklöf2020-12-14-10/+15
| | | | | | | | | | | This fixes issues with de-synchronized frames being rendered; we may have scheduled a redraw earlier, that hasn’t yet triggered (probably because we’re waiting for a frame callback), when we enable application synchronized updates. This means we risk rendering a partially updated state when the frame callback finally arrives, if the application hasn’t yet ended its synchronized update.
* input: make sure ‘surf_kind’ is not uninitializedDaniel Eklöf2020-12-12-1/+1
|
* csi: fix sub-parameter versions of 38/48 SGR escapesDaniel Eklöf2020-12-12-78/+80
| | | | | | | | | | | | | | | | | | | Well this is embarrassing; the sub-parameter versions of the 38/48 SGR escapes all required an extra ‘:2’ that wasn’t supposed to be there, causing all the other sub-parameters to be shifted one step to the right. That is, foot expected e.g. 38:2:2:r:g:b, or 38:2:5:idx when the correct sequences are 38:2:cs:r:g:b and 38:5:idx. I.e. I mixed up the color-space ID (cs) of 38:2 with *type* of color: RGB or indexed. In addition to fixing this, this patch also adds support for a “bastard” version of the sub-parameter based RGB escapes, where the color-space identifier has been left out: e.g. 38:2:r:g:b. This sequence is invalid, but applications tend to “forget” the color-space ID...
* input: rework mouse button/motion handlingDaniel Eklöf2020-12-12-105/+135
| | | | | | | | | | | | | | | | | | | Store a list of currently pressed buttons, and which surface they belong to (i.e. which surface that received the press). Then, in motion events (with a button pressed, aka drag operations), send the event to the “original” surface (that received the press). Also send release events to the originating surface. This means a surface receiving a press will always receive a corresponding release. And no one will receive a release event without a corresponding press event. Motion events with a button pressed will *always* use the *first* button that was pressed. I.e. if you press a button, start dragging, and then press another button, we keep generating motion events for the *first* button.
* input: report mouse drag events also when the pointer is outside the gridDaniel Eklöf2020-12-11-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as the mouse button was *pressed* while the pointer was inside the grid, we want to keep reporting motion events until the button is released. Even when the pointer moves outside the grid (but in this case, the reported coordinates are bounded by the grid size). This patch also tries to improve multi-button handling (i.e. multiple buttons pressed at the same time), and the events we report to the client for these, in the following ways: * Motion events now report the *initial* button. That is, if you start a drag operation with the LEFT button, then press RIGHT (before releasing LEFT), keep reporting LEFT in the motion events. * Mouse release events are reported for *any* button, as long as the pointer is *inside* the grid, *or*, the button released was the button used to start a drag operation. The last point is important; if we have reported a button press followed by motion events (i.e. a drag operation), we need to report the button release, *even* if the pointer is outside the grid. Note that the client may receive unbalanced button press/release events in the following ways if the user pressed one, and then a second button *inside* the grid, then releases the *first* button (possibly outside the grid), and finally releases the *second* button *outside* the grid. In this case, both buttons will report press events. The first button will report a release event since it is the initial button in the drag operation. However, we don’t track the fact that the second button is being pressed, and thus if it is released outside the grid, it wont generate a release event.
* csi: ‘CSI s’ and ‘CSI u’ now saves/restores attributes and charsetsDaniel Eklöf2020-12-11-0/+6
|
* Merge branch 'osc777-notify'Daniel Eklöf2020-12-11-31/+262
|\ | | | | | | Closes #224
| * config: add ‘notify’ to possible values for ‘bell’ in foot.iniDaniel Eklöf2020-12-10-17/+45
| | | | | | | | | | When `bell=notify`, foot will trigger a desktop notification when it receives a BEL in an unfocused window.
| * notify: don’t emit notification when we’re focusedDaniel Eklöf2020-12-10-0/+5
| |
| * notify: break out desktop notifications from osc.cDaniel Eklöf2020-12-10-91/+117
| |
| * osc: implement urxvt’s “OSC 777;notify”Daniel Eklöf2020-12-09-12/+184
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC 777 is URxvt’s generic escape to send commands to its perl extensions. The first parameter is the name of the extension, followed by its arguments. OSC 777;notify is a, if not well established, at least a fairly well known escape sequence to request a (desktop) notification. The syntax is: \e]777;notify;<title>;<body>\e\\ Neither title nor body is escaped in any way, meaning they should not contain a ‘;’. Foot will split title from body at the *first* ‘;’. Any remaining ‘;’ characters are treated as part of ‘body’. Instead of adding built-in support for the freedesktop notification specification (which would require us to link against at least dbus), add a new config option to foot.ini: ‘notify’. This option specifies the command to execute when a notification is received. ‘${title}’ and ‘${body}’ can be used anywhere, in any combination, and as many times as you want, in any of the command arguments. The default value is ‘notify-send -a foot -i foot ${title} ${body}’
* Merge branch 'remove-deprecated-things'Daniel Eklöf2020-12-09-116/+11
|\
| * config: remove support for scrollback-up and scrollback-downDaniel Eklöf2020-12-08-51/+3
| |
| * config: remove support for default.geometryDaniel Eklöf2020-12-08-16/+2
| |
| * config: remove support for default.scrollbackDaniel Eklöf2020-12-08-22/+1
| |
| * config: remove support for loading configuration from footrcDaniel Eklöf2020-12-08-26/+4
| |
| * completions: zsh: foot: fix default path of foot.iniDaniel Eklöf2020-12-08-1/+1
| |
* | changelog: don’t repeat ‘IME’Daniel Eklöf2020-12-08-1/+1
| |
* | changelog: add missing space in escape sequenceDaniel Eklöf2020-12-08-1/+1
| |
* | changelog: consistently use ‘CSI ? X h/l’ instead of `\E[?Xh/l`Daniel Eklöf2020-12-08-5/+5
| |
* | Merge branch 'input-method-editor'Daniel Eklöf2020-12-08-83/+1085
|\ \ | |/ |/| | | Closes #134
| * install: simplify sentenceDaniel Eklöf2020-12-08-1/+1
| |
| * render: ime: ensure cursor is visibleDaniel Eklöf2020-12-08-13/+41
| |
| * changelog: DECSET 737769 - enable/disable IMEDaniel Eklöf2020-12-07-0/+3
| |
| * render: search: render IME pre-edit text correctly, hopefullyDaniel Eklöf2020-12-07-61/+116
| |
| * ime: don’t underline characters inside the cursor-boxDaniel Eklöf2020-12-07-117/+123
| |
| * search: reset IME state when entering/exiting search modeDaniel Eklöf2020-12-07-0/+12
| |
| * render: ime: adjust cursor cell index when adjusting glyph offsetDaniel Eklöf2020-12-07-1/+4
| |
| * render: ime: wip: pre-editDaniel Eklöf2020-12-07-22/+75
| |
| * ime: call render_refresh_search() instead of render_refresh()Daniel Eklöf2020-12-07-2/+8
| | | | | | | | When scrollback search is active
| * ime: store wchar version of pre-edit string in terminal structDaniel Eklöf2020-12-07-4/+8
| |
| * render: search: don’t access term->search.buf[] directlyDaniel Eklöf2020-12-07-8/+11
| |
| * render: codespell: cound -> countDaniel Eklöf2020-12-07-1/+1
| |
| * render: search: glyph_offset is in *cells*, cursor position in *characters*Daniel Eklöf2020-12-07-18/+70
| | | | | | | | | | | | When calculating the offset into the search string, from where to start rendering, take into account that the cursor position is in *characters*, and the glyph-offset is in *cells*.
| * render: search: wcsnlen() -> wcswidth()Daniel Eklöf2020-12-07-1/+1
| |
| * render: search: handle multi-column charactersDaniel Eklöf2020-12-07-2/+3
| |
| * render: search: render colorized glyphs (emojis) correctlyDaniel Eklöf2020-12-07-5/+13
| |
| * ime: commit text using search_add_chars() while in scrollback search modeDaniel Eklöf2020-12-07-7/+8
| |
| * search: new function: search_add_chars()Daniel Eklöf2020-12-07-4/+5
| | | | | | | | | | This function inserts a string into the search buffer, at the current insertion point (i.e. where the cursor is).
| * ime: don’t commit to the slave while scrollback searchingDaniel Eklöf2020-12-07-5/+9
| |
| * render: ime: don’t render pre-edit string in grid while searchingDaniel Eklöf2020-12-07-0/+3
| | | | | | | | | | | | | | | | | | While doing a scrollback search, the pre-edit string should be rendered in the search box, not in the grid. Note that we don’t yet support IME in scrollback search mode. This patch simply prevents the pre-edit text being rendered in the grid, in the “background”, while searching.
| * install: highlight option default value in options listDaniel Eklöf2020-12-07-1/+1
| |
| * install: highlight option name in options listDaniel Eklöf2020-12-07-3/+3
| |
| * changelog: ime: add link to INSTALL.mdDaniel Eklöf2020-12-07-1/+3
| |
| * install: add ‘options’ section, describing compile-time optionsDaniel Eklöf2020-12-07-0/+10
| |
| * changelog: IME supportDaniel Eklöf2020-12-07-0/+1
| |
| * csi: add DECSET 737769 - enables/disables IME inputDaniel Eklöf2020-12-07-0/+10
| | | | | | | | 73 77 69 = I M E
| * codespell: currenly -> currently, second instanceDaniel Eklöf2020-12-07-1/+1
| |
| * codespell: currenly -> currentlyDaniel Eklöf2020-12-07-1/+1
| |
| * features: include compile-time enable/disable state of features when printing versionDaniel Eklöf2020-12-07-3/+37
| |
| * render: ime: draw a ‘bar’ cursor when the pre-edit cursor’s begin == endDaniel Eklöf2020-12-07-6/+14
| |
| * shm: fix badly indented function return typeDaniel Eklöf2020-12-07-1/+1
| |
| * ime: add functions to enable/disable IME, simplify code that enables IMEDaniel Eklöf2020-12-07-47/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may want to be able to enable/disable IME run-time, even though we have received an ‘enter’ IME event. This enables us to do that. Also add functions to enable/disable IME on a per-terminal instance basis. A terminal may have multiple seats focusing it, and enabling/disabling IME in a terminal instance enables/disables IME on all those seats. Finally, the code to enable IME is simplified; the *only* surface that can ever receive ‘enter’ IME events is the main grid. All other surfaces are sub-surfaces, without their own keyboard focus.
| * ime: expand cursor cell-end across multi-cell charactersDaniel Eklöf2020-12-07-0/+7
| | | | | | | | | | This fixes an issue where the cursor ended in the middle of e.g double width characters.
| * ime: don’t adjust cursor’s cell-end if it’s equal to the cell-beginDaniel Eklöf2020-12-07-6/+12
| |
| * ime: set cursor end correctly when it ends *after* the pre-edit stringDaniel Eklöf2020-12-07-0/+3
| |
| * ime: use correct index when calculating number of *cells* to advanceDaniel Eklöf2020-12-07-1/+1
| |
| * render: ime: don’t render cursor if cursor begin == endDaniel Eklöf2020-12-07-3/+4
| |
| * render: ime: calculate on-screen cursor position ourselvesDaniel Eklöf2020-12-07-3/+12
| | | | | | | | | | | | | | | | The position calculated by render_grid() may be -1,-1 if the cursor is currently hidden. This fixes a crash when trying to input IME while the cursor is hidden.