aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* editorconfig: adjust max-line-length, down from 80 to 70Daniel Eklöf2021-08-07-1/+1
|
* Merge branch 'mouse-wheel-tilt'Daniel Eklöf2021-08-07-29/+55
|\
| * input: implement support for mouse wheel left/rightDaniel Eklöf2021-08-07-29/+55
|/ | | | | | | | | | | | | We now emit button 6/7 events (when the client application grabs the mouse). This buttons map to mouse wheel horizontal scroll events. Or, left/right tilting, if you like. Wayland report these as ‘axis’ events (just like regular scroll wheel events), and thus we need to translate those scroll events to button events. libinput does not define any mouse buttons for wheel tilts, so we add our own defitions. These are added last in the BTN_* range, just before the BTN_JOYSTICK events.
* Revert "terminfo: add ich1=\E[@"Daniel Eklöf2021-08-07-2/+0
| | | | | | This reverts commit 76fab8cf695b8e18e9f07d383189a34ca129e3ac. See https://codeberg.org/dnkl/foot/issues/668#issuecomment-246149
* input: codespell: follwing -> followingDaniel Eklöf2021-08-06-1/+1
|
* Merge branch 'gnome-drag-workaround'Daniel Eklöf2021-08-06-1/+47
|\
| * input: workaround GNOME messing up pointer leave/enter after moving windowDaniel Eklöf2021-08-06-1/+47
|/ | | | | | | | | | GNOME doesn’t send pointer enter after finishing a window move. In subsequent move operations, it is also possible to make it skip sending pointer leave when starting the move operations. This caused foot to assert in debug builds, and add the same button multiple times to the list of buttons currently being pressed.
* Merge branch 'terminfo-kmous-xm'Daniel Eklöf2021-08-06-7/+5
|\
| * terminfo: change kmous to \E[<, add XM+xm capabilitiesDaniel Eklöf2021-08-06-7/+5
|/ | | | | | | | | | | ncurses has had a bug where mouse support is completely disabled if the terminfo didn’t have kmous=\E[M, *or*, the terminfo *name* contained ‘xterm’. This appears to have been fixed. Thus, change kmous to \E[<, and set xm/XM accordingly. With this, ncurses application will use the SGR mouse reporting mode, instead of the legacy reporting mode.
* Merge branch 'terminfo-ich1'Daniel Eklöf2021-08-06-0/+2
|\
| * terminfo: add ich1=\E[@Daniel Eklöf2021-08-06-0/+2
|/
* Merge branch 'box-drawing-realign-sextants-and-wedges'Daniel Eklöf2021-08-06-47/+62
|\
| * box-drawing: fix compiler warningDaniel Eklöf2021-08-06-1/+1
| | | | | | | | | | | | | | | | | | | | ../../box-drawing.c: In function 'box_drawing': ../../box-drawing.c:2774:13: error: 'y1' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2774 | int y0, y1; | ^~ ../../box-drawing.c:2774:9: error: 'y0' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2774 | int y0, y1; | ^~
| * box-drawing: re-align sextants and wedgesDaniel Eklöf2021-08-06-47/+62
|/ | | | | Improve the visual quality of sextants (and wedges) when the cell height isn’t a multiple of three.
* Merge branch 'box-drawing-size-optimize'Daniel Eklöf2021-08-06-159/+140
|\
| * box-drawing: don’t inline functions called for multiple codepointsDaniel Eklöf2021-08-05-5/+5
| | | | | | | | | | In several cases, this expanded to multiple calls, and when inlined, resulted in much larger code size.
| * box-drawing: wedges: pre-load x_halfs[] and y_thirds[]Daniel Eklöf2021-08-05-64/+71
| | | | | | | | This reduces the number of loads in the rest of the function.
| * box-drawing: wedges: avoid floating point mathDaniel Eklöf2021-08-05-68/+66
| | | | | | | | | | Re-use the pre-calculated offsets used by the sextants. This is the correct thing to do since wedges *should* align with sextants.
| * box-drawing: pre-calculate sextant x,y offsetsDaniel Eklöf2021-08-05-6/+19
| | | | | | | | | | | | | | | | We’re using floating point math, as a way to ensure that sextant primitives overlap, rather than leaving empty spaces, or being uneven, when the cell width/height isn’t divisible with 2 (width) or 3 (height). This gets rid of all floating point math from the sextant drawing functions.
| * box-drawing: deal with quads in the same as sextantsDaniel Eklöf2021-08-05-79/+42
| | | | | | | | | | | | That is, encode which “pieces” make up each quad in a static array, and use a single function to draw all quads using the four primitives “upper left/right, lower left/right”.
| * box-drawing: don’t inline horizontal-one-eighth-block-NDaniel Eklöf2021-08-05-1/+1
| |
| * box-drawing: don’t inline light diagionalDaniel Eklöf2021-08-05-2/+2
|/
* Merge branch 'box-drawing-wedges'Daniel Eklöf2021-08-05-15/+356
|\ | | | | | | Closes #474
| * box-drawing: wedges: fix alignment of inverted wedgesDaniel Eklöf2021-08-05-33/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | We render the inverted wedges by first rendering a non-inverted triangle, and then inverting it with PIXMAN_OP_OUT. In cases where truncating and round():ing the triangle points have different results, the final, inverted wedge ends up being unaligned with the corresponding sixel(s). This patch fixes that by handling the pre-inverted triangles specifically. I.e. we don’t re-use the same triangle coordinates as the corresponding non-inverted triangle.
| * box-drawing: wedges: don’t group similar cases togetherDaniel Eklöf2021-08-05-48/+100
| | | | | | | | | | Since they’re not exactly alike, we still need branches within each case. Better to split them up - one case per codepoint.
| * box-drawing: add U+1FB3C-U+1FB6F, U+1FB9A and U+1FB9BDaniel Eklöf2021-08-05-15/+228
|/ | | | | | These are the “wedges” from the Unicode 13 “Legacy Computing” symbols. Closes #474
* term: disable debug loggingDaniel Eklöf2021-08-05-1/+1
|
* Merge branch 'async-client-termination'Daniel Eklöf2021-08-03-66/+212
|\
| * term: send SIGTERM/SIGKILL to the entire process groupDaniel Eklöf2021-07-31-8/+10
| |
| * changelog: asynchronous client application terminationDaniel Eklöf2021-07-31-0/+6
| |
| * term: fix release builds when LOG_ENABLE_DBG=0Daniel Eklöf2021-07-31-1/+2
| |
| * term: consolidate shutdown related state into an anonymous structDaniel Eklöf2021-07-31-39/+48
| |
| * term: rename: slave_died() -> fdm_client_terminated()Daniel Eklöf2021-07-31-5/+6
| |
| * term: asynchronous client application terminationDaniel Eklöf2021-07-31-43/+170
|/ | | | | | | | | | | | | | | | | | When the foot window is closed, and we need to terminate the client application, do this in an asynchronous fashion: * Don’t do a blocking call to waitpid(), instead, rely on the reaper callback * Use a timer FD to implement the timeout before sending SIGKILL (instead of using SIGALRM). * Send SIGTERM immediately (we used to *just* close the PTY, and then wait 2 seconds before sending SIGTERM). * Raise the timeout from 2 seconds to 60 Full shutdown now depends on *two* asynchronous tasks - unmapping the window, and waiting for the client application to terminate. Only when *both* of these have completed do we proceed and call term_destroy(), and the user provided shutdown callback.
* Merge branch 'tilde-expansion-in-include'Daniel Eklöf2021-07-31-9/+28
|\ | | | | | | Closes #659
| * config: include: use xasprintf() instead of two calls to snprintf()Daniel Eklöf2021-07-30-3/+1
| |
| * doc: foot.ini: include paths are allowed to begin with ~/Daniel Eklöf2021-07-30-6/+4
| |
| * config: include: handle get_user_home_dir() returning NULLDaniel Eklöf2021-07-30-2/+9
| |
| * config: include: add support for ~-expansionDaniel Eklöf2021-07-30-1/+17
| | | | | | | | Closes #659
* | editorconfig: don’t trim trailing whitespace in *.scdDaniel Eklöf2021-07-30-4/+2
| | | | | | | | Doing so ruins the indentation of empty-line separated paragraphs.
* | client: remove info log of client app’s exit-codeDaniel Eklöf2021-07-30-2/+0
|/
* doc: foot.ini: indent listsDaniel Eklöf2021-07-30-14/+14
|
* Merge branch 'editorconfig'Daniel Eklöf2021-07-28-0/+19
|\
| * editorconfig: initialDaniel Eklöf2021-07-28-0/+19
|/
* Merge branch 'bright_bold'Daniel Eklöf2021-07-26-2/+8
|\
| * Only brighten palette colors with bold-text-in-bright=palette-basedDavid Rosca2021-07-26-2/+8
|/
* changelog: initialize output scaling factor to 1Daniel Eklöf2021-07-26-0/+5
|
* wayland: set scale to 1 by defaultNihal Jere2021-07-26-0/+1
| | | | | The wl_output protocol specifies that the client should assume that scale is 1 if not set by the compositor.
* readme: mention XTVERSIONDaniel Eklöf2021-07-25-0/+5
|
* Merge branch 'dont-hang-when-wl-connection-is-broken'Daniel Eklöf2021-07-25-1/+11
|\ | | | | | | Closes #651
| * wayland: prevent hang when terminating due to broken Wayland connectionDaniel Eklöf2021-07-24-1/+11
|/ | | | | | | | | | | | | | | | | | | | | If the call to fdm_wayl() with EPOLLHUP was followed by calls to wayl_roundtrip(), foot would hang. The reason for this is that the EPOLLHUP handler in fdm_wayl() would call wl_display_cancel_read(). wayl_roundtrip() also calls wl_display_cancel_read() (since we normally have called wl_display_prepare_read()), before calling wl_display_roundtrip(). When calling wl_display_cancel_read() two times in a row, without a wl_display_prepare_read() in between, wl_display_roundtrip() hangs. Fix by not calling wl_display_cancel_read() in fdm_wayl(). This ensures our invariant holds: wl_display_prepare_read() is *always* in effect outside of fdm_wayl(). Closes #651
* doc: meson: no need to check for scdoc againDaniel Eklöf2021-07-24-1/+0
| | | | We’re already checking for scdoc in the top-level meson.build
* meson: add -Ddocs=disabled|enabled|auto command line optionDaniel Eklöf2021-07-24-6/+18
| | | | | When enabled (the default, if scdoc is found), we build and install the man pages, example foot.ini, readme, changelog and license files.
* Merge branch 'csd-title'Daniel Eklöf2021-07-24-86/+268
|\ | | | | | | Closes #638
| * doc: foot.ini: mention that csd.font is sized using the title bar sizeDaniel Eklöf2021-07-24-1/+3
| |
| * foot.ini: add csd.fontDaniel Eklöf2021-07-24-0/+1
| |
| * render: render_osd(): use fcft_text_run_rasterize(), if availableDaniel Eklöf2021-07-24-6/+32
| |
| * render: render_osd(): fix rendering of color bitmap glyphsDaniel Eklöf2021-07-24-6/+11
| |
| * render: render_osd(): don’t re-instantiate foreground color for each glyphDaniel Eklöf2021-07-24-0/+2
| |
| * render: render_osd(): don’t assume a monospace fontDaniel Eklöf2021-07-24-6/+1
| |
| * config: add csd.font optionDaniel Eklöf2021-07-24-18/+95
| |
| * changelog: window title in CSDsDaniel Eklöf2021-07-24-0/+5
| |
| * render: csd_title(): use a custom font, sized based on the title bar’s heightDaniel Eklöf2021-07-24-3/+43
| | | | | | | | | | | | | | | | We still use the primary font, but use a custom size, based on the title bar’s height. This fixes an issue where the window title could be way too small, or way too big. And changed size when the terminal font size was changed.
| * render: render_osd() now needs a ‘font’ argumentDaniel Eklöf2021-07-24-3/+3
| |
| * render: render_osd(): pass font as argumentDaniel Eklöf2021-07-24-5/+9
| |
| * render: refresh CSD in render_refresh_title(), not render_update_title()Daniel Eklöf2021-07-24-1/+2
| | | | | | | | | | This fixes an issue where the CSD title sometimes got stuck on an “old” title.
| * render: refresh CSDs when updating the titleDaniel Eklöf2021-07-24-0/+1
| |
| * render: csd_title(): use render_osd() to render the current window titleDaniel Eklöf2021-07-24-11/+25
| |
| * render: must now set alpha in bg color when calling render_osd()Daniel Eklöf2021-07-24-4/+4
| |
| * render: render_osd(): set clip region, use background alphaDaniel Eklöf2021-07-24-53/+61
| | | | | | | | | | | | | | | | | | Set clip region in render_osd(). This ensures we don’t step outside the pixman buffer when rendering the glyphs. Furthermore, don’t ignore the alpha channel in the background color. Move render_osd() to make it visible to the render_csd_*() functions.
| * render: color_dim(): retain alpha channelDaniel Eklöf2021-07-24-1/+2
|/
* readme: add OSC-9 to list of supported OSC sequencesDaniel Eklöf2021-07-24-0/+1
|
* osc: fix typo in LOG_DBG() messageCraig Barnes2021-07-24-1/+1
|
* readme: fix a typoKnut Anders Hatlen2021-07-23-1/+1
|
* pgo: add stub for search_selection_cancelled()Daniel Eklöf2021-07-23-0/+2
| | | | | | | Fixes PGO build failures caused by 251545203baa65364e491ddbe71ab3f8080bfe25 Closes #648
* Merge branch 'search-crash-when-selection-is-cancelled'Daniel Eklöf2021-07-22-0/+16
|\ | | | | | | Closes #644
| * search: redraw search box after selection has been cancelledDaniel Eklöf2021-07-22-0/+1
| |
| * search: reset match state when selection is cancelledDaniel Eklöf2021-07-22-0/+15
|/ | | | | | | | | | | | While we’re in scrollback search mode, the selection may be cancelled (for example, if the application is scrolling out the selected text). Trying to e.g. extend the search selection after this has happened triggered a crash. This fixes it by simply resetting the search match state when the selection is cancelled. Closes #644
* doc: ctlseq: improve description of OSC 52 responseDaniel Eklöf2021-07-22-2/+2
|
* Merge branch 'pgo-shm-fixes'Daniel Eklöf2021-07-22-0/+11
|\ | | | | | | Closes #642
| * pgo: fix PGO builds with clangDaniel Eklöf2021-07-22-0/+11
|/ | | | | | | | Add stubs for shm_chain_new(), shm_chain_free() and shm_unref(). This fixes ‘pgo’ linking failures in the ‘generate’ phase when doing a PGO build with clang. Closes #642
* Merge branch 'prevent-overflow-into-margin'Daniel Eklöf2021-07-20-1/+7
|\
| * render: prevent cells from overflowing into marginTimur Celik2021-07-20-1/+7
|/
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-07-18-0/+11
|
* Merge branch 'releases/1.8'Daniel Eklöf2021-07-18-6/+5
|\
| * meson/pkgbuild: bump version to 1.8.21.8.2releases/1.8Daniel Eklöf2021-07-18-2/+2
| |
| * changelog: prepare for 1.8.2Daniel Eklöf2021-07-18-4/+3
| |
| * Merge branch 'master' into releases/1.8Daniel Eklöf2021-07-18-451/+1082
| |\ | |/ |/|
* | changelog: remove entries that are no longer relevantDaniel Eklöf2021-07-18-4/+0
| | | | | | | | | | The tweak.allow-overflowing-double-width-glyphs option have been superseded by tweak.overflowing-glyphs.
* | Merge branch 'csd-shared-shm-pool'Daniel Eklöf2021-07-18-56/+48
|\ \
| * | render: use a single backing SHM pool for CSD surface buffersDaniel Eklöf2021-07-18-56/+44
| | |
| * | shm: get_many(): allow “NULL” buffers - buffers where width or height is 0Daniel Eklöf2021-07-18-0/+4
|/ / | | | | | | | | | | | | | | When a zero-sized buffer is requested, simply return a NULL buffer, instead of crashing with a Wayland protocol error. This makes it easier to request many buffers, where some may be zero-sized, without having to pack the width/height and bufs arrays.
* | term: erase_scrollback(): destroy sixels that touch the scrollbackDaniel Eklöf2021-07-18-13/+55
| |
* | sixel: destroy(): don’t unref a NULL pixman imageDaniel Eklöf2021-07-18-2/+3
| |
* | Merge branch 'crash-when-selection-is-in-scrollback-and-scrollback-is-erased'Daniel Eklöf2021-07-18-23/+166
|\ \ | | | | | | | | | Closes #633
| * | changelog: crash when \E[3J was executed with a selection in the scrollbackDaniel Eklöf2021-07-18-0/+3
| | |
| * | term: add unit test for term_erase_scrollback()Daniel Eklöf2021-07-18-0/+97
| | |
| * | csi: erase scrollback: cancel selection if it touches the scrollbackDaniel Eklöf2021-07-18-23/+66
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This breaks out the scrollback erasing logic for \E[3J from csi.c, and moves it to the new function term_erase_scrollback(), and changes the logic to calculate the start and end row (absolute) numbers of the scrollback, and only iterate those, instead of iterating *all* rows, filtering out those that are on-screen. It also adds an intersection range check of the selection range, and cancels the selection if it touches any of the deleted scrollback rows. This fixes a crash when trying to render the next frame, since the selection now references rows that have been freed. Closes #633
* | Merge branch 'refactor-shm-buffer-management'Daniel Eklöf2021-07-18-277/+382
|\ \
| * | shm: chain_free: BUG() if there are buffers remaining after purgeDaniel Eklöf2021-07-17-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | There may be buffers left, if their destruction has been deferred. However, they should be on the 'deferred' list, not the chain's buffer list. If there are buffers left on the chain's list, that means someone forgot to call shm_unref().