| Commit message (Collapse) | Author | Age | Lines | ||
|---|---|---|---|---|---|
| ... | |||||
| * | shm: get_buffer(): remove 'copies' argument; it's not used | Daniel Eklöf | 2019-11-01 | -7/+4 | |
| | | |||||
| * | shm: add debug logging of how large the allocated memory buffer is | Daniel Eklöf | 2019-11-01 | -0/+3 | |
| | | |||||
| * | shm: fix name of memfd | Daniel Eklöf | 2019-11-01 | -1/+1 | |
| | | |||||
| * | client: bug: verify argv was sent correctly | Daniel Eklöf | 2019-11-01 | -1/+1 | |
| | | | | | We checked we had written 2 bytes (sizeof(len)), not <len> bytes. | ||||
| * | client: add debug logging of argc/argv | Daniel Eklöf | 2019-11-01 | -0/+4 | |
| | | |||||
| * | server: add debug logging of client argc/argv | Daniel Eklöf | 2019-11-01 | -0/+4 | |
| | | |||||
| * | Merge branch 'multi-window' | Daniel Eklöf | 2019-11-01 | -171/+923 | |
| |\ | |||||
| | * | client: register signal handler for SIGTERM too | Daniel Eklöf | 2019-11-01 | -1/+2 | |
| | | | |||||
| | * | client/server: add -t,--term to footclient | Daniel Eklöf | 2019-11-01 | -3/+40 | |
| | | | |||||
| | * | term_init(): initialize slave TERM from term_init() argument | Daniel Eklöf | 2019-11-01 | -6/+6 | |
| | | | |||||
| | * | slave: set TERM environment variable in slave process | Daniel Eklöf | 2019-11-01 | -4/+6 | |
| | | | |||||
| | * | PKGBUILD: need to execute footclient, to generate profiling data | Daniel Eklöf | 2019-11-01 | -0/+2 | |
| | | | |||||
| | * | client: add long options for --verbose and --help | Daniel Eklöf | 2019-11-01 | -1/+7 | |
| | | | |||||
| | * | wayland: wayl_win_destroy(): looks like we need another roundtrip | Daniel Eklöf | 2019-11-01 | -0/+2 | |
| | | | |||||
| | * | font: cache loaded fonts globally | Daniel Eklöf | 2019-11-01 | -0/+52 | |
| | | | | | | | | | | | | | | | | | | | Each font instance has a ref-counter. Whenever we want to instantiate a font that has already been loaded, we instead return the already-loaded instance, and bump the ref counter. When the last font instance is destroyed, it is also removed from the cache. | ||||
| | * | completions: zsh: add --server and --term to completions | Daniel Eklöf | 2019-11-01 | -4/+10 | |
| | | | |||||
| | * | client: a standalone binary that connects to a foot --server | Daniel Eklöf | 2019-11-01 | -0/+143 | |
| | | | |||||
| | * | server: implement a --server mode | Daniel Eklöf | 2019-11-01 | -2/+334 | |
| | | | | | | | | | | | | | | | | | | | | | | | In this mode, foot listens on a UNIX socket and creates terminal windows when clients connect. A connecting client sends argc/argv to the server, and the server instantiates a new terminal window. When the terminal window is closed, the exit code is sent back to the client. | ||||
| | * | main: register signal handlers for SIGINT and SIGTERM | Daniel Eklöf | 2019-11-01 | -0/+15 | |
| | | | |||||
| | * | terminal: call user-defined callback when destroying terminal | Daniel Eklöf | 2019-11-01 | -13/+38 | |
| | | | | | | | | | main uses this to get the exit code of the terminal. | ||||
| | * | term_shutdown(): cleanup | Daniel Eklöf | 2019-11-01 | -49/+35 | |
| | | | | | | | | | | | * Close FDs, then delay destruction to next epoll() call * Destroy window before destroying terminal | ||||
| | * | terminal: fdm_del() closes the FD | Daniel Eklöf | 2019-11-01 | -20/+6 | |
| | | | |||||
| | * | terminal: delayed rendering: fdm_delayed_render() may be called with is_armged==false | Daniel Eklöf | 2019-11-01 | -1/+2 | |
| | | | | | | | | | This would happen if *both* timers triggered in the same epoll() call. | ||||
| | * | terminal: no need to check for EAGAIN - we don't use non-blocking | Daniel Eklöf | 2019-11-01 | -18/+10 | |
| | | | |||||
| | * | render: limit length of title in call to xdg_toplevel_set_title() | Daniel Eklöf | 2019-11-01 | -1/+13 | |
| | | | | | | | | | | | | | Trying to pass a too long title (not sure what "too long" is though...) will trigger a call to abort() inside the wayland-client library. | ||||
| | * | wayland: wayl_destroy(): destroy any remaining terminals | Daniel Eklöf | 2019-11-01 | -0/+9 | |
| | | | |||||
| | * | Don't use non-blocking FDs | Daniel Eklöf | 2019-11-01 | -33/+6 | |
| | | | | | | | | | | | We use epoll() to determine when we can read/write FDs so there's absolutely no need for non-blocking. | ||||
| | * | wayland: wayl_win_destroy(): unmap windows before destroying | Daniel Eklöf | 2019-11-01 | -0/+23 | |
| | | | | | | | | | | | | | | | | | | | This will trigger e.d. keyboard_leave() and wl_pointer_leave() events, which ensures there aren't any references to the destroyed window from the global wayland struct. Call wl_display_roundtrip() to trigger those events *before* we destroy the window. | ||||
| | * | wayland: wayl_init(): call wl_display_roundtrip() when done | Daniel Eklöf | 2019-11-01 | -2/+3 | |
| | | | |||||
| | * | render: call wl_display_flush() after rendering | Daniel Eklöf | 2019-11-01 | -1/+2 | |
| | | | | | | | | | This allows us to remove that call from the main event loop. | ||||
| | * | wayland: fdm_del() now closes the FD | Daniel Eklöf | 2019-11-01 | -4/+3 | |
| | | | |||||
| | * | fdm: don't free FD data that may be referenced by epoll return data | Daniel Eklöf | 2019-11-01 | -9/+60 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is perfectly possible, and legal, for a FDM handler to delete another handler. The problem however is when the epoll returned array of FD events contain the removed FD handler *after* the handler that removed it. That is, if the epoll returned array is: [FD=13, FD=37] and the handler for FD=13 removes FD=37, then given the current implementation, the FD user data (our handler callback etc) will point to a free:d address. Add support for this situation by deferring FD handler removal *when called from another handler*. This is done by "locking" the FDM struct before looping the handlers for FDs with events (and unlocking afterwards). In fdm_del(), we check if the FDM has been locked, in which case the FD is marked as deleted, and put on a deferred list. But not *actually* deleted. Meanwhile, in the FDM poll function, we skip calling handlers for marked-for-deletion FDs. Then, when all FDs have been processed, we loop the deferred list and finally deletes the FDs for real. | ||||
| | * | term: fdm_shutdown(): remove debug output | Daniel Eklöf | 2019-10-30 | -1/+0 | |
| | | | |||||
| | * | main: get exit value from wayland struct | Daniel Eklöf | 2019-10-30 | -2/+3 | |
| | | | |||||
| | * | term: term_shutdown(): set exit value in wayland | Daniel Eklöf | 2019-10-30 | -5/+7 | |
| | | | |||||
| | * | wayland: temporary: track last terminal's exit value | Daniel Eklöf | 2019-10-30 | -0/+1 | |
| | | | |||||
| | * | wayland: wayl_win_destroy(): return early if win == NULL | Daniel Eklöf | 2019-10-30 | -0/+3 | |
| | | | |||||
| | * | term: assign client PID to term->slave | Daniel Eklöf | 2019-10-30 | -1/+1 | |
| | | | |||||
| | * | term: term_init(): create wayland window *last* | Daniel Eklöf | 2019-10-30 | -48/+57 | |
| | | | | | | | | | | | * Configure all FDs *completely* before moving on * Start client before creating the wayland window | ||||
| | * | slave: log child's errno, not parents | Daniel Eklöf | 2019-10-30 | -2/+2 | |
| | | | |||||
| | * | slave: fix debug logging (no 'term' variable) | Daniel Eklöf | 2019-10-30 | -2/+2 | |
| | | | |||||
| | * | wayland: xdg_toplevel_close(): call term_shutdown() | Daniel Eklöf | 2019-10-30 | -3/+1 | |
| | | | |||||
| | * | term: add term_shutdown() | Daniel Eklöf | 2019-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 terminals | Daniel Eklöf | 2019-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öf | 2019-10-30 | -137/+196 | |
| |\ | |||||
| | * | main: free 'config' on command line parse error | Daniel Eklöf | 2019-10-30 | -0/+4 | |
| | | | |||||
| | * | term: move client startup to a new function, slave_spawn() | Daniel Eklöf | 2019-10-30 | -61/+79 | |
| | | | |||||
| | * | term: break out font initialization to a separate function | Daniel Eklöf | 2019-10-30 | -32/+41 | |
| | | | |||||
| | * | term: break out render worker threads initialization to a separate function | Daniel Eklöf | 2019-10-30 | -21/+50 | |
| | | | |||||
| | * | term: break out color cube initialization to a separate function | Daniel Eklöf | 2019-10-30 | -24/+23 | |
| | | | |||||
| | * | term: require all font variants to load | Daniel Eklöf | 2019-10-30 | -5/+5 | |
| |/ | |||||
| * | Merge branch 'fdm' | Daniel Eklöf | 2019-10-30 | -1483/+1945 | |
| |\ | |||||
| | * | slave: rename slave_spawn() -> slave_exec() | Daniel Eklöf | 2019-10-30 | -3/+3 | |
| | | | |||||
| | * | term: no need to stack-allocate an array of worker contexts | Daniel Eklöf | 2019-10-28 | -6/+9 | |
| | | | |||||
| | * | render worker context: allocate, and let worker threads free | Daniel Eklöf | 2019-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 struct | Daniel Eklöf | 2019-10-28 | -42/+69 | |
| | | | |||||
| | * | term: integrate directly with FDM | Daniel Eklöf | 2019-10-28 | -222/+223 | |
| | | | |||||
| | * | terminal: implement term_init() and term_destroy() | Daniel Eklöf | 2019-10-28 | -328/+375 | |
| | | | |||||
| | * | wayland: move reload_cursor_theme() and update_cursor_surface() to wayland | Daniel Eklöf | 2019-10-27 | -61/+64 | |
| | | | |||||
| | * | main: remove a couple of includes | Daniel Eklöf | 2019-10-27 | -3/+1 | |
| | | | |||||
| | * | main: kbd repeat FD is handled by the wayland backend | Daniel Eklöf | 2019-10-27 | -1/+1 | |
| | | | |||||
| | * | wayland: backend now configures FD as non-blocking, not main | Daniel Eklöf | 2019-10-27 | -16/+17 | |
| | | | |||||
| | * | main: cleanup | Daniel Eklöf | 2019-10-27 | -7/+0 | |
| | | | |||||
| | * | wayland: free wayland/wl_window instances | Daniel Eklöf | 2019-10-27 | -0/+3 | |
| | | | |||||
| | * | wayl_destroy: early return on NULL | Daniel Eklöf | 2019-10-27 | -0/+3 | |
| | | | |||||
| | * | wayland: move keyboard repeat handling into wayland | Daniel Eklöf | 2019-10-27 | -31/+39 | |
| | | | |||||
| | * | wayland: integrate directly with the FDM | Daniel Eklöf | 2019-10-27 | -17/+23 | |
| | | | |||||
| | * | wayland: implement wayl_init() | Daniel Eklöf | 2019-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 struct | Daniel Eklöf | 2019-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öf | 2019-10-27 | -0/+2 | |
| | | | |||||
| | * | input: input_repeat() takes a 'struct wayland' pointer | Daniel Eklöf | 2019-10-27 | -10/+10 | |
| | | | |||||
| | * | wayland: change all wayland callbacks to take a wayland pointer | Daniel Eklöf | 2019-10-27 | -215/+269 | |
| | | | | | | | | | | | Instead of passing the terminal to the wayland callbacks, pass a 'struct wayland' pointer. | ||||
| | * | wayland: add back-pointer to terminal | Daniel Eklöf | 2019-10-27 | -0/+5 | |
| | | | | | | | | | | | This can, in the future, be extended to e.g. a list, to support multiple windows. | ||||
| | * | kbd: move into wayland | Daniel Eklöf | 2019-10-27 | -155/+141 | |
| | | | |||||
| | * | kbd: break out XKB kbd struct to a separate file | Daniel Eklöf | 2019-10-27 | -44/+56 | |
| | | | |||||
| | * | wayland: move clipboard/primary structs into the wayland struct | Daniel Eklöf | 2019-10-27 | -45/+45 | |
| | | | | | | | | | These are application global and very wayland specific | ||||
| | * | wayland: implement wayl_win_destroy() | Daniel Eklöf | 2019-10-27 | -27/+37 | |
| | | | |||||
| | * | wayland: implement wayl_destroy() | Daniel Eklöf | 2019-10-27 | -52/+85 | |
| | | | |||||
| | * | wayland: move wayland struct definitions to a separate file | Daniel Eklöf | 2019-10-27 | -68/+76 | |
| | | | |||||
| | * | term: convert anonymous 'window' struct to named 'wl_window' struct | Daniel Eklöf | 2019-10-27 | -15/+17 | |
| | | | |||||
| | * | term: move per-window wayland objects from wayland struct to terminal struct | Daniel Eklöf | 2019-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 loop | Daniel Eklöf | 2019-10-27 | -201/+408 | |
| | | | |||||
| * | | scrollback: regression: fix rendering of scrollback diffs less than a screen | Daniel Eklöf | 2019-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 scrollback | Daniel Eklöf | 2019-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 upgrade | Daniel Eklöf | 2019-10-24 | -2/+2 | |
| | | |||||
| * | completions: add zsh completions | Daniel Eklöf | 2019-10-20 | -0/+17 | |
| | | |||||
| * | meson: fix version generation from git | Daniel Eklöf | 2019-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 cases | Daniel Eklöf | 2019-10-18 | -4/+6 | |
| | | |||||
| * | font: load fallback fonts on demand | Daniel Eklöf | 2019-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 font | Daniel Eklöf | 2019-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_cache | Daniel Eklöf | 2019-10-17 | -14/+16 | |
| | | |||||
| * | font: fc_idx may not be the requested one | Daniel Eklöf | 2019-10-17 | -2/+4 | |
| | | |||||
| * | font: rename fc_loaded_fonts -> fc_loaded_fallbacks | Daniel Eklöf | 2019-10-17 | -11/+12 | |
| | | |||||
| * | Merge branch 'font-cache' | Daniel Eklöf | 2019-10-16 | -52/+151 | |
| |\ | |||||
| | * | font: cache top-level fonts | Daniel Eklöf | 2019-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 struct | Daniel Eklöf | 2019-10-16 | -22/+19 | |
| | | | |||||
| | * | font: cache loaded fontconfig fallback fonts | Daniel Eklöf | 2019-10-16 | -24/+59 | |
| | | | |||||
| | * | font: font_from_name() returns an allocated font struct | Daniel Eklöf | 2019-10-16 | -17/+21 | |
| |/ | |||||
| * | selection: replace \r\n with \n in pasted text | Daniel Eklöf | 2019-10-16 | -0/+16 | |
| | | |||||
| * | README: link to PKGBUILD | Daniel Eklöf | 2019-10-05 | -3/+3 | |
| | | |||||
