aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * term: fdm_shutdown(): remove debug outputDaniel Eklöf2019-10-30-1/+0
| |
| * main: get exit value from wayland structDaniel Eklöf2019-10-30-2/+3
| |
| * term: term_shutdown(): set exit value in waylandDaniel Eklöf2019-10-30-5/+7
| |
| * wayland: temporary: track last terminal's exit valueDaniel Eklöf2019-10-30-0/+1
| |
| * wayland: wayl_win_destroy(): return early if win == NULLDaniel Eklöf2019-10-30-0/+3
| |
| * term: assign client PID to term->slaveDaniel Eklöf2019-10-30-1/+1
| |
| * term: term_init(): create wayland window *last*Daniel Eklöf2019-10-30-48/+57
| | | | | | | | | | * Configure all FDs *completely* before moving on * Start client before creating the wayland window
| * slave: log child's errno, not parentsDaniel Eklöf2019-10-30-2/+2
| |
| * slave: fix debug logging (no 'term' variable)Daniel Eklöf2019-10-30-2/+2
| |
| * wayland: xdg_toplevel_close(): call term_shutdown()Daniel Eklöf2019-10-30-3/+1
| |
| * term: add term_shutdown()Daniel Eklöf2019-10-30-32/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function unmaps the terminal window, removes itself from the wayland list of terminals and then finally destroys itself. We ensure we don't get any callbacks/events referring to a free:d terminal struct, we close all terminal related FDs and unmap the wayland window. Then, to be really really sure there aren't any (by the FDM) queued up events, we delay the self-destruction to the next FDM poll iteration, by opening an event FD and adding it to the FDM. The callback for the event FD removes the FD from the FDM again, and closes it. And then proceeds to destroy the terminal.
| * wayland: track multiple terminalsDaniel Eklöf2019-10-30-15/+26
|/ | | | | The wayland 'term' member is gone and replaced by a list, 'terms'. This list contains all currently running terminal (windows).
* Merge branch 'term-init-cleanup'Daniel Eklöf2019-10-30-137/+196
|\
| * main: free 'config' on command line parse errorDaniel Eklöf2019-10-30-0/+4
| |
| * term: move client startup to a new function, slave_spawn()Daniel Eklöf2019-10-30-61/+79
| |
| * term: break out font initialization to a separate functionDaniel Eklöf2019-10-30-32/+41
| |
| * term: break out render worker threads initialization to a separate functionDaniel Eklöf2019-10-30-21/+50
| |
| * term: break out color cube initialization to a separate functionDaniel Eklöf2019-10-30-24/+23
| |
| * term: require all font variants to loadDaniel Eklöf2019-10-30-5/+5
|/
* Merge branch 'fdm'Daniel Eklöf2019-10-30-1483/+1945
|\
| * slave: rename slave_spawn() -> slave_exec()Daniel Eklöf2019-10-30-3/+3
| |
| * term: no need to stack-allocate an array of worker contextsDaniel Eklöf2019-10-28-6/+9
| |
| * render worker context: allocate, and let worker threads freeDaniel Eklöf2019-10-28-4/+6
| | | | | | | | | | | | | | | | | | | | Since we now initialize the worker threads from term_init(), which returns before the threads terminate, we can no longer use stack-allocated worker contexts. We _could_ put them in the terminal struct. But a simpler solution is to allocate them in term_init(), and let the threads free them when they don't need them anymore.
| * term: open FDs before allocating terminal structDaniel Eklöf2019-10-28-42/+69
| |
| * term: integrate directly with FDMDaniel Eklöf2019-10-28-222/+223
| |
| * terminal: implement term_init() and term_destroy()Daniel Eklöf2019-10-28-328/+375
| |
| * wayland: move reload_cursor_theme() and update_cursor_surface() to waylandDaniel Eklöf2019-10-27-61/+64
| |
| * main: remove a couple of includesDaniel Eklöf2019-10-27-3/+1
| |
| * main: kbd repeat FD is handled by the wayland backendDaniel Eklöf2019-10-27-1/+1
| |
| * wayland: backend now configures FD as non-blocking, not mainDaniel Eklöf2019-10-27-16/+17
| |
| * main: cleanupDaniel Eklöf2019-10-27-7/+0
| |
| * wayland: free wayland/wl_window instancesDaniel Eklöf2019-10-27-0/+3
| |
| * wayl_destroy: early return on NULLDaniel Eklöf2019-10-27-0/+3
| |
| * wayland: move keyboard repeat handling into waylandDaniel Eklöf2019-10-27-31/+39
| |
| * wayland: integrate directly with the FDMDaniel Eklöf2019-10-27-17/+23
| |
| * wayland: implement wayl_init()Daniel Eklöf2019-10-27-526/+569
| | | | | | | | Wayland instantiation is now done by the wayland backend, not in main.
| * term: wayland struct is now not a part of the terminal structDaniel Eklöf2019-10-27-114/+115
| | | | | | | | | | | | We do however need access to it, so provide a pointer. The difference is that now we can have a *single* wayland instance, but multiple terminal instances.
| * wayland: pull in sys/time.h, for 'struct timeval'Daniel Eklöf2019-10-27-0/+2
| |
| * input: input_repeat() takes a 'struct wayland' pointerDaniel Eklöf2019-10-27-10/+10
| |
| * wayland: change all wayland callbacks to take a wayland pointerDaniel Eklöf2019-10-27-215/+269
| | | | | | | | | | Instead of passing the terminal to the wayland callbacks, pass a 'struct wayland' pointer.
| * wayland: add back-pointer to terminalDaniel Eklöf2019-10-27-0/+5
| | | | | | | | | | This can, in the future, be extended to e.g. a list, to support multiple windows.
| * kbd: move into waylandDaniel Eklöf2019-10-27-155/+141
| |
| * kbd: break out XKB kbd struct to a separate fileDaniel Eklöf2019-10-27-44/+56
| |
| * wayland: move clipboard/primary structs into the wayland structDaniel Eklöf2019-10-27-45/+45
| | | | | | | | These are application global and very wayland specific
| * wayland: implement wayl_win_destroy()Daniel Eklöf2019-10-27-27/+37
| |
| * wayland: implement wayl_destroy()Daniel Eklöf2019-10-27-52/+85
| |
| * wayland: move wayland struct definitions to a separate fileDaniel Eklöf2019-10-27-68/+76
| |
| * term: convert anonymous 'window' struct to named 'wl_window' structDaniel Eklöf2019-10-27-15/+17
| |
| * term: move per-window wayland objects from wayland struct to terminal structDaniel Eklöf2019-10-27-80/+84
| | | | | | | | | | | | | | | | Short term, we want to break out the wayland backend from the terminal struct. Long term, we might want to support multiple windows. One step towards both the above is separating global wayland objects from per-window objects.
| * fdm: use the FDM's poll loopDaniel Eklöf2019-10-27-201/+408
| |
* | scrollback: regression: fix rendering of scrollback diffs less than a screenDaniel Eklöf2019-10-29-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing "small" scrolls (typically done via mouse wheel or similar), we render the scrolling by emitting a "scroll damage". A recent commit changed how scroll damage is rendered; only when the view is at the bottom ("following" the screen output) do we render the damage. To fix this, add a new type of scroll damage, SCROLL_DAMAGE_IN_VIEW and SCROLL_DAMAGE_REVERSE_IN_VIEW. These signal to the renderer that it should always render the damage.
* | render: regression: don't apply scroll damage when view is in scrollbackDaniel Eklöf2019-10-28-12/+15
|/ | | | | | | | | | | | | | When user has scrolled back in the output history, new output should not trigger scrolling. This was true for normal cell rendering, which renders the cells *in view*, not caring where the "front" of the output is. However, we still applied scroll damage. I.e. we memmoved part of the screen. The fix is simple; only apply scroll damage when the view is at the front of the output.
* PKGBUILD: fix breakage after pacman 5.2 upgradeDaniel Eklöf2019-10-24-2/+2
|
* completions: add zsh completionsDaniel Eklöf2019-10-20-0/+17
|
* meson: fix version generation from gitDaniel Eklöf2019-10-19-26/+51
| | | | | | | | | | run_command() was only run at configure time, meaning the generated version (that was passed on to the sources via -DFUZZEL_VERSION) became stale. Fix by implementing a shell script that generates a header file, and wrap this in a custom target that is run every time (but the generated file is only updated when the version changes)
* font: glyph_for_wchar(): ensure glyph->valid == false, in *all* error casesDaniel Eklöf2019-10-18-4/+6
|
* font: load fallback fonts on demandDaniel Eklöf2019-10-17-19/+35
| | | | | | | | | | | When instantiating a primary font, build the fallback font list, but don't actually instantiate the fallback fonts. Instead, remember the (full) pattern that we should use if/when we instantiate it. Then, when looking up a glyph and we need a fallback font, loop the list and instantiate the font(s) there and then.
* font: load all fallbacks when instantiating a primary fontDaniel Eklöf2019-10-17-115/+44
| | | | | | | | | | | | | | | The caching of fallback fonts didn't work. It "worked" because we didn't free the fonts... When we started doing that, the fallback fonts were no longer cached. Another solution would have been to keep the cached fallback fonts around until exit, and free them there. But that didn't seem very clean. So, for now, load *all* fallbacks when instantiating a primary (non-fallback) font. Note that this slows down initial startup time.
* font: rename cache -> glyph_cacheDaniel Eklöf2019-10-17-14/+16
|
* font: fc_idx may not be the requested oneDaniel Eklöf2019-10-17-2/+4
|
* font: rename fc_loaded_fonts -> fc_loaded_fallbacksDaniel Eklöf2019-10-17-11/+12
|
* Merge branch 'font-cache'Daniel Eklöf2019-10-16-52/+151
|\
| * font: cache top-level fontsDaniel Eklöf2019-10-16-1/+64
| | | | | | | | | | | | | | | | This greatly improves the performance when loading user-configured fallback fonts. Previously, we had to re-load these fallback fonts over and over again for each (new) glyph.
| * font: from_name() returns an allocated font structDaniel Eklöf2019-10-16-22/+19
| |
| * font: cache loaded fontconfig fallback fontsDaniel Eklöf2019-10-16-24/+59
| |
| * font: font_from_name() returns an allocated font structDaniel Eklöf2019-10-16-17/+21
|/
* selection: replace \r\n with \n in pasted textDaniel Eklöf2019-10-16-0/+16
|
* README: link to PKGBUILDDaniel Eklöf2019-10-05-3/+3
|
* desktop: clean up, remove unsupported entriesDaniel Eklöf2019-09-29-8/+0
| | | | | * We don't support startup notifications * We don't support a non-standard "new" action
* PKGBUILD: version has been bumped to 0.9.0Daniel Eklöf2019-09-29-1/+1
|
* csi: ignore invalid scrolling regions0.9.0Daniel Eklöf2019-09-29-7/+10
| | | | | | | | | | There must be at least one scrolling row. I.e. the bottom margin must be larger than the top margin. Note that trying to set an invalid region really will be *ignored*. I.e. we *don't* reset the scrolling region. This conforms to xterm's behavior.
* font: calculate underline/strikeout metrics in font, not mainDaniel Eklöf2019-09-29-43/+41
|
* vt: don't log ignored execute commandsDaniel Eklöf2019-09-28-1/+0
| | | | cat:ing a binary file would otherwise result in us spamming syslog.
* render: handle compositors that does buffer swappingDaniel Eklöf2019-09-27-45/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all compositors support buffer re-use. I.e. they will call the frame callback *before* the previous buffer has been released. Effectively causing us to swap between two buffers. Previously, this made us enter an infinite re-render loop, since we considered the window 'dirty' (and in need of re-draw) when the buffer is different from last redraw. Now, we detect the buffer swapping case; size must match, and we must not have any other condition that require a full repaint. In this case, we can memcpy() the old buffer to the new one, without dirtying the entire grid. We then update only the dirty cells (and scroll damage). Note that there was a bug here, where we erased the old cursor *before* checking for a new buffer. This worked when the buffer had *not* changed. Now that we need to handle the case where it *has* changed, we must do the memcpy() *before* we erase the cursor, or the re-painted cell is lost. This makes foot work on Plasma, without burning CPU. The memcpy() does incur a performance penalty, but we're still (much) faster than e.g. konsole. In fact, we're still mostly on par with Alacritty.
* render: attach buffer *before* generating damageDaniel Eklöf2019-09-27-2/+1
| | | | Fixes 'invisible window' on Plasma
* main: unset DESKTOP_STARTUP_IDDaniel Eklöf2019-09-26-0/+4
| | | | | | This is used in the desktop startup notification protocol. We don't support it (is it even used on Wayland?), but need to ensure programs launced from within foot doesn't inherit it.
* input: scale coordinates in wl_pointer_enter()Daniel Eklöf2019-09-26-2/+2
|
* main: initialize scale to '1'Daniel Eklöf2019-09-26-22/+7
| | | | | | | | | | This ensures we always have a valid (but possibly incorrect) scaling value. This allows us to simplify code that uses the scale - it doesn't have to verify the scale if valid. Furthermore, since render_resize() is the function that actually updates term->scale, make sure to call it *before* updating the cursor (otherwise, the cursor will use the old scaling value).
* PKGBUILD: explicitly set --term=xtermDaniel Eklöf2019-09-26-1/+1
| | | | | The 'foot' terminfo may not be installed/available when we run the intermediate foot binary, so explicitly use 'xterm' instead.
* selection: primary: don't require compositor to implement itDaniel Eklöf2019-09-25-8/+20
|
* main: we prefer xdg-output-manager version 2, but get by with 1Daniel Eklöf2019-09-24-1/+1
|
* main: log (at debug level) global interfaces and their versionsDaniel Eklöf2019-09-24-1/+1
|
* README: that -> theDaniel Eklöf2019-09-21-2/+2
|
* README: remove badges (added directly to gitlab project instead)Daniel Eklöf2019-09-21-1/+0
|
* README: add CI pipeline badgeDaniel Eklöf2019-09-21-0/+1
|
* doc: user Courier New instead of Arial in font examplesDaniel Eklöf2019-09-21-2/+2
| | | | Since Courier New is monospaced, while Arial is not.
* It's Hz, not HZDaniel Eklöf2019-09-21-2/+2
|
* main: -f,--font now accepts a list of fontsDaniel Eklöf2019-09-21-4/+34
| | | | | | | This makes -f,--font behave just like the configuration file option 'font'; the first font in the list is the primary font, and the remaining fonts are fallback fonts used when a glyph cannot be found in the primary font.
* doc: describe font fallback handlingDaniel Eklöf2019-09-21-2/+13
|
* PKGBUILD: need python to run generate-alt-random-writes.pyDaniel Eklöf2019-09-21-1/+1
|
* README: don't emphasize entries in "known issues" listDaniel Eklöf2019-09-21-2/+2
|
* README: add text reflow to list of known issuesDaniel Eklöf2019-09-21-0/+2
|
* config: change default bright5 and bright 6 colorsDaniel Eklöf2019-09-21-6/+6
| | | | | | | They where previously identical to the corresponding 'regular' colors. Now, we've done a saturated add with 0x202020 (which seems to be roughly the difference between the other regular and bright colors).
* config: change default 'regular0' colorDaniel Eklöf2019-09-21-2/+2
| | | | | 0x222222 appears to be more visible against the default background (0x111111) than 0x000000.
* main: round strikeout and underline position fallback handlingDaniel Eklöf2019-09-20-2/+2
|
* main: round strikeout position, and ceil strikeout thicknessDaniel Eklöf2019-09-20-2/+2
| | | | | | | This fixes an issue where sometimes the strikeout thickness where truncated to 0 (e.g. Cascadia Code). Note that we already do this for the underline calculations.
* render: remove assertion that isn't always trueDaniel Eklöf2019-09-20-1/+0
| | | | It's not true for e.g. Cascadia code.
* PKGBUILD: foot-terminfo depends on ncursesDaniel Eklöf2019-09-20-1/+2
|
* PKGBUILD: 'foot' optionally depends on 'foot-terminfo'Daniel Eklöf2019-09-20-0/+1
|
* PKGBUILD: break out terminfo files to a separate packageDaniel Eklöf2019-09-20-8/+17
|