aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* input: make wheel events mappableDaniel Eklöf2023-09-18-105/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Un-grabbed wheel events are now passed through the mouse binding matching logic, instead of being hardcoded to scrolling the terminal contents. They are mappable through the BTN_BACK and BTN_FORWARD buttons. Since they're not actually button *presses*, they never generate a click count other than 1. This limitation is documented, but not checked in the config. This means it's possible to create bindings like "BTN_BACK+3" (i.e. triple "click"). They will however never trigger. The old, hardcoded logic is now accessible through the new scrollback-up-mouse and scrollback-down-mouse mouse bindings. They (obiously) default to BTN_BACK and BTN_FORWARD, respectively. Example usage: keep the default of scrolling terminal contents with the wheel, when used without modifiers, but map Control+wheel to font zoom in/out: [mouse-bindings] font-increase=Control+BTN_FORWARD font-decrease=Control+BTN_BACK (this also keeps the default key bindings to zoom in/out; ctrl-+ and ctrl+-) Closes #1077
* input: improve touch handling on pointer presenseCismonX2023-08-23-32/+73
| | | | | | | | | | | No longer inhibits touch event handling when terminal window has pointer focus. Instead, inhibit touch event when at least one pointer button is held down. This change improves user experience when using foot with both a mouse and a touchscreen. Closes #1428.
* url-mode: handle wide chars and grapheme clusters when auto-detecting URLsDaniel Eklöf2023-08-21-90/+118
| | | | | | | | | | * Skip spacer cells. This fixes an issue where characters following a double-width character weren't detect properly. * Unpack grapheme clusters (i.e. cells with multiple codepoints), and iterate all their codepoints. Closes #1465
* add panda themeraggedmyth2023-08-19-0/+27
|
* term: improve fallback logic when selecting scaling factor while unmappedDaniel Eklöf2023-08-18-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | The foot window may, for various reasons, become completely unmapped (that is, being removed from all outputs) at run time. One example is wlroots based compositors; they unmap all other windows when an opaque window is fullscreened. 21d99f8dced335826964ca96b8ba7ccac059e598 introduced a regression, where instead of picking the scaling factor from one of the available outputs (at random), we started falling back to '1' as soon as we were unmapped. This patch restores the original logic, but also improves upon it. As soon as a scaling factor has been assigned to the window, we store a copy of it in the term struct ('scale_before_unmap'). When unmapped, we check if it has a valid value (the only time it doesn't is before the initial map). If so, we use it. Only if it hasn't been set do we fall back to picking an output at random, and using its scaling factor. Closes #1464
* ci: replace 'pipeline' with 'steps'Daniel Eklöf2023-08-18-1/+1
| | | | | | Hopefully fixes: failed to parse pipeline: "pipeline:" got removed, use "steps:" instead
* Merge branch 'systemd-service-ordering'Daniel Eklöf2023-08-11-0/+14
|\ | | | | | | Closes #1436
| * changelog: systemd units in GNOMEMax Gautier2023-08-10-0/+11
| |
| * systemd: skip foot-server.service when not in a Wayland contextMax Gautier2023-08-10-0/+1
| |
| * Order the systemd services after graphical-session.targetMax Gautier2023-08-10-0/+2
|/ | | | | | This fixes services in Wayland session where WAYLAND_DISPLAY is only imported into the systemd user instance environment after graphical-session.target is reached (such as GNOME).
* meson: allow building with wayland-protocols as a subprojectDaniel Eklöf2023-08-08-12/+21
|
* Merge branch 'wayland-protocols-1.32'Daniel Eklöf2023-08-07-184/+33
|\ | | | | | | Closes #1391
| * wayland: cursor-shape-v1 is now always availableDaniel Eklöf2023-08-07-66/+7
| | | | | | | | Since we're requiring wayland-protocols >= 1.32
| * wayland: fractional-scale-v1 is now always availableDaniel Eklöf2023-08-07-78/+17
| | | | | | | | Since we're requiring wayland-protocols >= 1.32
| * wayland: xdg-activation is now always availableDaniel Eklöf2023-08-07-43/+5
| | | | | | | | Since we're requiring wayland-protocols >= 1.32
| * meson: require wayland-protocols >= 1.32Daniel Eklöf2023-08-07-1/+8
|/
* Merge branch 'releases/1.15'Daniel Eklöf2023-08-07-5/+9
|\
| * meson: bump version to 1.15.31.15.3releases/1.15Daniel Eklöf2023-08-07-1/+1
| |
| * changelog: prepare for 1.15.3Daniel Eklöf2023-08-07-10/+3
| |
| * main: “title%s” -> “title=%s”Daniel Eklöf2023-08-07-1/+1
| | | | | | | | | | | | | | | | Fix regression of --title,-T option. This broken when command line parsing was switched to using overrides, in 0b4f1b4af20cea0afae39a2c1c4e42c22962dcde. Closes #1457
| * vt: fix ASAN UB warningDaniel Eklöf2023-08-07-1/+1
| | | | | | | | | | | | | | ../vt.c:648:13: runtime error: signed integer overflow: 3924432811 * 2654435761 cannot be represented in type 'long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../vt.c:648:13 in Closes #1456
| * render: OSD: center text verticallyDaniel Eklöf2023-08-07-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | Rewrite render_osd(), and instead of passing in an y-offset, let render_osd() itself center the text inside the OSD buffer. This is done using the same baseline calculation term_font_baseline() does, except we use the buffer height instead of the line height. Note that most OSDs are sized based on the line height... Closes #1430
| * main: translate command line options to overridesDaniel Eklöf2023-08-07-89/+22
| | | | | | | | | | | | | | | | | | Instead of special casing configuration affecting command line options (like --font, --fullscreen, --maximized etc), translate them to overrides, and let the configuration system handle them. This also fixes an issue where -f,--font did not set csd.font, if csd.font were otherwise unset.
| * changelog: add new ‘unreleased section’Daniel Eklöf2023-08-07-0/+11
| |
* | changelog: “config” -> “config option”Daniel Eklöf2023-08-05-1/+1
| |
* | main: “title%s” -> “title=%s”Daniel Eklöf2023-08-05-1/+1
| | | | | | | | | | | | | | | | Fix regression of --title,-T option. This broken when command line parsing was switched to using overrides, in 0b4f1b4af20cea0afae39a2c1c4e42c22962dcde. Closes #1457
* | vt: fix ASAN UB warningDaniel Eklöf2023-08-05-1/+1
| | | | | | | | | | | | | | ../vt.c:648:13: runtime error: signed integer overflow: 3924432811 * 2654435761 cannot be represented in type 'long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../vt.c:648:13 in Closes #1456
* | render: OSD: center text verticallyDaniel Eklöf2023-07-31-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | Rewrite render_osd(), and instead of passing in an y-offset, let render_osd() itself center the text inside the OSD buffer. This is done using the same baseline calculation term_font_baseline() does, except we use the buffer height instead of the line height. Note that most OSDs are sized based on the line height... Closes #1430
* | config: remove deprecated option 'utempter'Daniel Eklöf2023-07-31-18/+5
| |
* | main: translate command line options to overridesDaniel Eklöf2023-07-31-89/+22
| | | | | | | | | | | | | | | | | | Instead of special casing configuration affecting command line options (like --font, --fullscreen, --maximized etc), translate them to overrides, and let the configuration system handle them. This also fixes an issue where -f,--font did not set csd.font, if csd.font were otherwise unset.
* | changelog: add new ‘unreleased section’Daniel Eklöf2023-07-30-0/+11
| |
* | Merge branch 'releases/1.15'Daniel Eklöf2023-07-30-10/+4
|\|
| * meson: bump version to 1.15.21.15.2Daniel Eklöf2023-07-30-1/+1
| |
| * changelog: prepare for 1.15.2Daniel Eklöf2023-07-30-9/+3
| |
| * Merge branch 'master' into releases/1.15Daniel Eklöf2023-07-30-178/+344
| |\ | |/ |/|
* | --window-size-chars: ensure width/height are valid for current scaling factorDaniel Eklöf2023-07-30-16/+7
| | | | | | | | | | | | | | | | | | | | Before this patch, we didn’t ensure width and height were valid for the current scaling factor, when fractional scaling _is_ available. That is, we didn’t ensure the width/height values multiplied back to their original values after dividing with the scaling factor. Closes #1446
* | Merge branch 'csd-fractional-scaling'Daniel Eklöf2023-07-29-82/+128
|\ \ | | | | | | | | | Closes #1441
| * | changelog: CSDs with fractional scalingDaniel Eklöf2023-07-29-0/+2
| | |
| * | wayl_surface_scale_explicit_width_height(): don’t assert width/height are valid for scaleDaniel Eklöf2023-07-29-7/+28
| | | | | | | | | | | | | | | | | | This function is only called directly when scaling the mouse pointer. The mouse pointer is never guaranteed to have a valid width and height, so skip the width/height assertions for it.
| * | fractional scaling: another round(!) of rounding fixesDaniel Eklöf2023-07-28-66/+73
| | | | | | | | | | | | | | | | | | | | | * Ensure buffer sizes are valid. That is, ensure that size / scale * scale == size. * Do size calculation of the window geometry in the same way we calculate the CSD offsets.
| * | render: round scaled border/title/button widthsDaniel Eklöf2023-07-28-11/+27
|/ / | | | | | | | | | | | | | | And calculation of compounded offsets/widths/heights, to compensate for compositor rounding when positioning and scaling/sizing subsurfaces. Closes #1441
* | wayland: don't try to use a non-existing viewporter interfaceDaniel Eklöf2023-07-28-10/+17
| | | | | | | | | | | | | | | | | | | | | | When instantiating the viewport for a pointer surface, we didn't first check if the compositor implements the viewporter interface. This triggered a crash when a) foot was compiled with fractional scaling, and b) the compositor did not implement the viewporter interface. Closes #1444
* | meson: add -Dterminfo-base-name optionDaniel Eklöf2023-07-28-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This defines the base name of the generated terminfo files. It defaults to the value of -Ddefault-terminfo (i.e. 'foot') Example: meson -Ddefault-terminfo=foot-bananas -Dterminfo-base-name=foot-apples The generated terminfo files will be * terminfo/f/foot-apples * terminfo/f/foot-apples-direct The default value of $TERM will be 'foot-bananas'
* | config: add tweak.bold-text-in-bright-amountDaniel Eklöf2023-07-28-13/+35
| | | | | | | | | | | | | | | | By how much to increase the luminance when brightening bold fonts. This was previously hard-coded to a factor of 1.3, which is now the default value of the new config option. Closes #1434
* | render: revert part of a36f67cbe311bebd9321fbf58773dace8128fcd7Daniel Eklöf2023-07-28-2/+2
| | | | | | | | | | | | | | | | | | | | | | render_osd() shouldn't use term_font_baseline(). This is because term_font_baseline() uses the line height to determine the position, while render_osd() renders to surfaces that aren't sized like the grid. This fixes a regression, where the CSD title were sometimes rendered too high up, and sometimes too low.
* | font baseline: use max(font->height, font->ascent + font->descent) when calculating font heightDaniel Eklöf2023-07-28-1/+1
| | | | | | | | | | This is how it's done when calculating the cell height, and we should do the same thing when calculating the font baseline.
* | scaling: always round the scaling factor when converting to intDaniel Eklöf2023-07-25-79/+103
| | | | | | | | | | | | | | | | | | * In all calls to wl_subsurface_set_position() * (wp_viewport_set_destination() already does this) * Whenever we use the scale to calculate margins (search box, scrollback indicator etc) * Since the scaling factor is stored as a float (and not a double), use roundf() instead of round()
* | ci (sr.ht): alpine no longer allows pip installing to the system installationDaniel Eklöf2023-07-25-0/+3
| |
* | ci: alpine no longer allows pip installing to the system installationDaniel Eklöf2023-07-25-0/+3
| |
* | render: apply new baseline calculation everywhereDaniel Eklöf2023-07-25-22/+29
| | | | | | | | | | | | | | | | * URL jump labels * Scrollback position indicator * Line/box drawings characters Closes #1430
* | wayland: update terminals (fonts etc) on xdg_output_handle_done()Daniel Eklöf2023-07-23-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Monitor DPI depends on information from both the wl_output and the xdg_output interfaces. Before this patch, terminals were only updated after changes to the wl_output interfaces (thus depending on xdg output changes being pushed by the compositor before wl_output changes). That assumption (xdg_output happening before wl_output) isn’t always true. This patch fixes the issue by updating the terminals in the xdg_output’s “done” event. Closes #1431
* | Merge branch 'invalid-utf8'Daniel Eklöf2023-07-23-3/+28
|\ \ | | | | | | | | | Closes #1423
| * | changelog: ignore invalid UTF-8 in inputDaniel Eklöf2023-07-22-0/+6
| | |
| * | vt: detect and ignore invalid UTF-8 sequencesDaniel Eklöf2023-07-22-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch detects invalid codepoints in the UTF-8 EDxxxx range, and the F4xxxxxx range. Note that we still allow the E0xxxx and F0xxxxxx ranges. These contains overlong encodings. We allow them, because they still decode into correct UTF-32. Closes #1423
| * | selection: send_clipboard_or_primary(): handle selection text being NULLDaniel Eklöf2023-07-22-3/+1
|/ /
* | changelog: add new ‘unreleased’ sectionDaniel Eklöf2023-07-21-0/+11
| |
* | Merge branch 'releases/1.15'Daniel Eklöf2023-07-21-7/+10
|\|
| * meson: bump version to 1.15.11.15.1Daniel Eklöf2023-07-21-1/+1
| |
| * changelog: prepare for 1.15.1Daniel Eklöf2023-07-21-6/+9
| |
| * Merge branch 'master' into releases/1.15Daniel Eklöf2023-07-21-208/+410
| |\ | |/ |/|
* | render: change baseline calculation, to center it within the lineDaniel Eklöf2023-07-21-1/+9
| | | | | | | | | | | | | | Before this patch, fonts were anchored to the top of the line. With this patch, it is instead centered. Closes #1302
* | Merge branch 'systemd-units-socket-activation'Daniel Eklöf2023-07-21-22/+41
|\ \
| * | Changelog: standard system target + footclient fallbackMax Gautier2023-07-21-0/+7
| | |
| * | Update documentation regarding systemd unitsMax Gautier2023-07-21-6/+6
| | |
| * | Ties systemd units to graphical-session.targetMax Gautier2023-07-21-10/+14
| | | | | | | | | | | | | | | | | | | | | - wayland-instance template target was a mistake. Systemd does not support simultaneous same user session, so stop trying to go against that. - Only start systemd units in Wayland environments.
| * | footclient: fallback logic when socket paths don't existMax Gautier2023-07-21-6/+14
|/ / | | | | | | | | | | Even if WAYLAND_DISPLAY / XDG_RUNTIME_DIR are defined, if we can't find the corresponding socket, we fallback to the path used when they are not defined.
* | vt: improve handling of HTSCismonX2023-07-20-8/+22
| | | | | | | | | | | | | | | | | | Do not insert existing positions into the tab stop list. This prevents a performance issue when iterating through an extremely long tab stop list. Also corrects the behaviour of CBT.
* | render: OSD: don’t mark surface as being opaque, when it’s notDaniel Eklöf2023-07-19-6/+10
| |
* | render: disable transparency when we’re fullscreenedDaniel Eklöf2023-07-19-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wayland protocol recommends (or mandates?) that compositors render a black background behind fullscreened transparent windows. I.e. you never see what’s _actually_ behind the window. So, if you have a white, but semi-transparent background in foot, it’ll be rendered in a shade of gray. Given this, it’s better to simply disable transparency while we’re fullscreened. That way, we at least get the "correct" background color. Closes #1416
* | changelog: spelling: sacling -> scalingDaniel Eklöf2023-07-19-1/+1
| |
* | term: destroy: unref key bindings *after* destroying windowDaniel Eklöf2023-07-18-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a crash-on-exit on compositors that emit a _"keyboard leave"_ event when a surface is unmapped. In our case, destroying the window (where we unmap it) in term_destroy(), lead to a crash in term_mouse_grabbed(), due to key_binding_for() returning NULL. The call chain in this is case is, roughly: term_destroy() -> wayl_win_destroy() -> keyboard_leave() -> term_xcursor_update_for_seat() -> term_mouse_grabbed()
* | themes: starlight: update to V4Daniel Eklöf2023-07-18-50/+53
| | | | | | | | | | | | | | This also updates the default theme in foot, as well as the documentation. Closes #1409
* | changelog: crash on pointer capability lossDaniel Eklöf2023-07-18-0/+3
| |
* | wayland: fix pointer cap lost handlingxdavidwu2023-07-18-2/+4
| | | | | | | | | | Before this, on compositor without cursor-shape support, a pointer capability lost of the seat makes foot crash.
* | Merge branch 'scale-is-floating-point'Daniel Eklöf2023-07-18-110/+177
|\ \ | | | | | | | | | Closes #1404
| * | pgo: add stub for wayl_fractional_scaling()Daniel Eklöf2023-07-18-0/+1
| | |
| * | changelog: wrong DPI, and wrong initial font size with fractional scalingDaniel Eklöf2023-07-18-0/+8
| | |
| * | changelog: monitor metadata is now picked from the one we were last mapped onDaniel Eklöf2023-07-18-0/+6
| | |
| * | term: get_font_subpixel(): use subpixel from monitor we were *last* mapped onDaniel Eklöf2023-07-18-2/+3
| | |
| * | terminal: break out scaling factor updating, and reduce number of calls to render_resize()Daniel Eklöf2023-07-18-45/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break out the logic that updates the terminal’s scaling factor value, from render_resize(), to a new function, term_update_scale(). This allows us to update the scaling factor without a full grid resize. We also change how we pick the scaling factor (when fractional scaling is not in use). Before, we’d use the highest scaling factor from all monitors we were mapped on. Now, we use the scaling factor from the monitor we were *last* mapped on. Then, add a boolean parameter to term_set_fonts(), and when false, *don’t* call render_resize_force(). Also change term_font_dpi_changed() to only return true if the font was changed in any way. Finally, rewrite update_term_for_output_change() to: * Call term_update_scale() before doing anything else * Call render_resize{,_force} *last*, and *only* if either the scale or the fonts were updated. This fixes several things: * A bug where we failed to update the fonts when fractional scaling was in use, and we guessed the initial scale/DPI wrong. The bug happened because updated the internal "preferred" scale value, and a later call to render_resize() updated the terminal’s scale value, but since that code path didn’t call term_font_dpi_changed() (and it shouldn’t), the fonts weren’t resized properly. * It ensures we only resize the grid *once* when the scaling factor, or DPI is changed. Before this, we’d resize it twice. And this happened when e.g. dragging the window between monitors.
| * | wayland: error out if there aren’t any monitors availableDaniel Eklöf2023-07-18-0/+5
| | |
| * | wayland: use physical DPI on fractional-scale capable compositorsDaniel Eklöf2023-07-18-51/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With legacy scaling, we need to use a "scaled", or "logical" DPI value, that is basically the real DPI value scaled by the monitor’s scaling factor. This is necessary to compensate for the compositor downscaling the surface, for "fake" fractional scaling. But with true fractional scaling, *we* scale the surface to the final size. This means we should *not* use the scaled DPI, but the monitor’s actual DPI. To facilitate this, store both the scaled and the unscaled DPI value in the monitor struct. This patch also changes how we pick the DPI value. Before, we would use the highest DPI value from all the monitors we were mapped on. Now, we use the DPI value from the monitor we were *last* mapped on (typically the window we’re dragging the window *to*).
| * | wayland: fractional_scale_preferred_scale(): only push update if scale has changedDaniel Eklöf2023-07-18-5/+9
| | | | | | | | | | | | Also, drop wl_window::have_preferred_scale. Check for scale > 0 instead.
| * | term: font_dpi_changed: scale (and old_scale) are floating pointDaniel Eklöf2023-07-18-5/+5
| | | | | | | | | | | | | | | | | | This should fix an issue where the font size wasn’t updated when moving the window between outputs whose scaling factors match when truncated.
| * | term: (debug): dpi_aware is no longer an enumDaniel Eklöf2023-07-18-2/+1
|/ /
* | themes: add chiba-dark themeAyush Agarwal2023-07-18-0/+27
| |
* | render: fix xcursor scaling with fractional-scale-v1Daniel Eklöf2023-07-18-5/+10
| | | | | | | | | | | | This worked just after the fractional-scaling branch was merged, but was then broken by the cursor-shape branch, due to a bad rebase of that branch.
* | input: do not ignore touch events on the CSDsCismonX2023-07-16-3/+2
| |
* | render: use rounding for fractional scaleRonan Pigott2023-07-16-4/+12
| | | | | | | | | | If we truncate the buffer dimensions we may accidentally submit a buffer with inappropriate size.
* | changelog: add new ‘unreleased’ sectionDaniel Eklöf2023-07-14-0/+11
| |
* | Merge branch 'releases/1.15'Daniel Eklöf2023-07-14-4/+19
|\|
| * meson: bump version to 1.15.01.15.0Daniel Eklöf2023-07-14-1/+1
| |
| * changelog: prepare for 1.15.0Daniel Eklöf2023-07-14-3/+18
|/
* config: add csd.double-click-to-maximize=no|yes optionDaniel Eklöf2023-07-14-1/+19
| | | | | | | | | When enabled, double-clicking the CSD titlebar will (un)maximize the window. Defaults to ‘yes’ (since this is the old hard-coded behavior). Closes #1293
* themes: enable custom cursor colors in all themes that define such colorsDaniel Eklöf2023-07-14-4/+4
| | | | | | | | | | | | | Not all themes have/define custom cursor colors. But of those that do, nearly all already enabled them (by setting "cursor.color"), except three themes: * aeroroot * ayu-mirage * material-amber This patch makes all themes consistent, by enabling cursor.color in these last three themes too.
* config: make ‘starlight’ the default color themeDaniel Eklöf2023-07-14-23/+27
| | | | Closes #1321
* themes: aeroroot: add -*- conf -*- headerDaniel Eklöf2023-07-14-0/+1
|
* themes: starlight: add -*- conf -*- headerDaniel Eklöf2023-07-14-0/+1
|
* theme: add new theme ‘starlight’Daniel Eklöf2023-07-14-0/+23
| | | | Closes #1321
* render: don’t invert cursor colors when custom colors are being usedDaniel Eklöf2023-07-14-11/+8
| | | | | | | | | | | | When the user has configured custom cursor colors (cursor.color is set in foot.ini), don’t invert those colors when the cell is either selected, or has the ‘reverse’ attribute set. This aligns foot’s behavior with Alacritty, Kitty and Wezterm. Contour also behaves similarly, except mouse selections override the cursor colors (turning the cursor invisible). Closes #1347