aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * grid: grid_reflow() now translates cursor coordinatesDaniel Eklöf2020-04-16-42/+54
| |
| * grid: move 'cursor' state from terminal to gridDaniel Eklöf2020-04-16-129/+136
|/ | | | | This way, the 'normal' and 'alt' grids have their own cursor state, and we don't need to switch between them.
* misc: replace all explicit zero-initializers with empty initializersDaniel Eklöf2020-04-13-15/+15
|
* mbstate: fix compile warning on systems where mbstate_t isn't an integralDaniel Eklöf2020-04-13-3/+3
| | | | | An empty initializer still ensures the entire object is zero-initialized.
* ci: alpine: add missing dependencies: pixman + libxkbcommonDaniel Eklöf2020-04-13-0/+2
|
* term: reset: plug memory leakDaniel Eklöf2020-04-13-27/+32
| | | | | | | | | | | In reset, we allocated new rows for all the currently visible lines. We did **not** however, free the 'old' rows. Fix by not explicitly allocating new rows, but instead allocating uninitialized rows when needed, and then explicitly erasing the row. If there already was a row allocated, it is simply erased. If there wasn't, the a new line is malloc:ed, and then erased.
* ci: initial FreeBSD build manifestDaniel Eklöf2020-04-12-0/+39
|
* ci: alpine: wlroots isn't needed (or used, at all)Daniel Eklöf2020-04-12-1/+0
|
* Fix clang warningsDaniel Eklöf2020-04-12-6/+6
| | | | | | | | All are printf() formatter related. Even if a variable is e.g. a 'short', when used in an expression like '<variable> - 1' it is promoted to an 'int'. Closes #16
* ci: move sr.ht's .build.yml to .builds/alpine.ymlDaniel Eklöf2020-04-11-0/+0
|
* themes: add a couple of color themesDaniel Eklöf2020-04-10-0/+141
| | | | | Foot doesn't really support themes, but with this, users can at least copy-paste from a couple of predefined themes into their footrc.
* input: slow trackpad scrolling now eventually scroll a lineDaniel Eklöf2020-04-10-1/+19
| | | | | | | | | | | | | | | Before, we converted each axis event's scroll amount to an integer and scrolled that many lines. However, axis events are speed sensitive - very slow scrolling will result in events with a scroll amount that is < 1.0. For us, this meant we never scrolled a single line. You could slow scroll all day if you wanted, and still we would never scroll a single line. Fix this by aggregating the scroll amount from axis events until the scroll amount is > 1.0, and then scroll.
* render: don't dim so much when in search modeDaniel Eklöf2020-04-10-3/+3
|
* render: strip 'pixman' from color function namesDaniel Eklöf2020-04-09-10/+10
|
* render: remove unused functionsDaniel Eklöf2020-04-09-18/+0
|
* config: use an unsigned constant, since we're shifting 31 bitsDaniel Eklöf2020-04-09-2/+2
|
* keymap: remove trailing whitespacesDaniel Eklöf2020-04-08-7/+7
|
* completions: zsh: foot: default geometry is 700x500, not 700x50Daniel Eklöf2020-04-08-1/+1
|
* changelog: alt+return now emits ESC \rDaniel Eklöf2020-04-08-0/+1
|
* keymap: return: all Alt+<mod> now emits \e\rDaniel Eklöf2020-04-08-2/+9
|
* keymap: \t -> spacesDaniel Eklöf2020-04-08-1/+1
|
* Merge branch 'mchackorg/foot-alt-return'Daniel Eklöf2020-04-08-0/+1
|\
| * Make Alt-Return send ESC ReturnMichael Cardell Widerkrantz2020-03-16-0/+1
| |
* | terminfo: foot: setaf/b: use colon-separated variantDaniel Eklöf2020-04-08-2/+2
| |
* | terminfo: foot-direct: setaf/b: set color space to '2' (RGB)Daniel Eklöf2020-04-08-2/+2
| |
* | README: describe how to report bugsDaniel Eklöf2020-04-04-0/+15
| |
* | doc: foot.1: list what a bug report should containDaniel Eklöf2020-04-04-0/+9
| |
* | doc: foot.1: add link to issue reportingDaniel Eklöf2020-04-04-0/+4
| |
* | readme: summary: add 'lightweight'Daniel Eklöf2020-04-04-1/+1
| |
* | readme: remove the 'non-features' and 'what doesn't work' sectionsDaniel Eklöf2020-04-04-22/+0
| |
* | meson: don't set -fno-stack-protectorDaniel Eklöf2020-04-04-2/+1
| | | | | | | | | | Disabling the stack protection is generally bad, and I can't measure any performance drops with it enabled.
* | Merge branch 'osc4-multi-parameter'Daniel Eklöf2020-04-04-47/+48
|\ \
| * | changelog: osc 4 multiple 'c;spec' pairsDaniel Eklöf2020-04-04-0/+1
| | |
| * | osc 104: handle multiple indices the same way we do in OSC 4 - use strtok()Daniel Eklöf2020-04-04-14/+13
| | |
| * | osc: 4: handle multiple idx;spec pairsDaniel Eklöf2020-04-04-33/+34
|/ /
* | readme: tweak presentation of OSC 555Daniel Eklöf2020-04-04-1/+1
| |
* | readme: markup of OSC sequencesDaniel Eklöf2020-04-04-13/+13
| |
* | readme: document implemented OSC sequencesDaniel Eklöf2020-04-04-0/+22
| |
* | Merge branch 'right-mouse-extend-selection'Daniel Eklöf2020-04-04-19/+189
|\ \
| * | doc: foot.1: right mouse button extends current selectionDaniel Eklöf2020-04-04-0/+3
| | |
| * | readme: right mouse button extends current selectionDaniel Eklöf2020-04-04-0/+3
| | |
| * | changelog: right mouse button extends current selectionDaniel Eklöf2020-04-04-0/+1
| | |
| * | selection: extend: new row must be offsetted with the current view offsetDaniel Eklöf2020-04-04-0/+2
| | |
| * | input: right mouse click extends the current selectionDaniel Eklöf2020-04-04-0/+4
| | |
| * | selection: add selection_extend()Daniel Eklöf2020-04-04-14/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function extends an existing selection in the following way: If the extension point is *before* the upper boundary of the current selection, extend the selection upwards. If the extension point is *after* the bottom boundary of the current selection, extend the selection downwards. If the extension point is *inside* the current selection, shrink the selection such that the new size is maximized. This means we move the *closest* start/end point from in the current selection.
| * | input: hardcoded left mouse button handler requires click-count <= 3Daniel Eklöf2020-04-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This enables user mappings for the left mouse button with click count > 3 I.e. it is now possible to create custom quad-click mappings (except we don't yet support this in footrc).
| * | input: only cancel selection on left mouse button clicksDaniel Eklöf2020-04-04-4/+3
|/ /
* | changelog: mention memfd sealing failures not being fatal errors fixDaniel Eklöf2020-04-03-0/+1
| |
* | changelog: mention OSC 7 hostname validation fixDaniel Eklöf2020-04-03-0/+1
| |
* | osc: ignore OSC 7 when hostname doesn't match our own hostnameDaniel Eklöf2020-04-03-9/+28
| |
* | shm: memfd seal failures are not fatal errorsDaniel Eklöf2020-04-03-1/+1
| |
* | doc: foot/footclient: fix highlighting of TITLE argument to --titleDaniel Eklöf2020-04-01-2/+2
| |
* | conf: add 'title' conf option and --title command line optionDaniel Eklöf2020-04-01-2/+65
| |
* | completions: zsh: repair -a,--app-id completionsDaniel Eklöf2020-04-01-2/+2
| |
* | conf: add app-id config option and --app-id command line optionDaniel Eklöf2020-04-01-15/+84
| |
* | doc: foot.5: minor updates to 'tweaks'Daniel Eklöf2020-03-30-7/+9
| |
* | doc: fcft.5: document the 'tweak' optionsDaniel Eklöf2020-03-30-0/+117
| |
* | meson: completions: join_paths() all the wayDaniel Eklöf2020-03-29-1/+1
| |
* | Merge branch 'scroll-damage-performance'Daniel Eklöf2020-03-29-162/+796
|\ \
| * | changelog: mention renderer performance improvements with scrollingDaniel Eklöf2020-03-29-0/+2
| | |
| * | Merge branch 'master' into scroll-damage-performanceDaniel Eklöf2020-03-27-10/+138
| |\ \
| * | | conf: max-shm-pool-size-mb=0 now disables SHM scrollingDaniel Eklöf2020-03-26-7/+6
| | | |
| * | | shm: make max pool size user configurable (via a 'tweak' setting)Daniel Eklöf2020-03-25-11/+39
| | | |
| * | | shm: handle ftruncate failureDaniel Eklöf2020-03-25-1/+5
| | | |
| * | | shm: seal the memfdDaniel Eklöf2020-03-25-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This both prevents accidental resizing of the memfd, and allows the Wayland server to optimze reads from the buffer - it no longer has to setup SIGBUS handlers.
| * | | shm: scroll: keep shm pool around, and fix its size at max allowedDaniel Eklöf2020-03-25-138/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lessens the burden on (primarily) the compositor, since we no longer tear down and re-create the SHM pool when scrolling. The SHM pool is setup once, and its size is fixed at the maximum allowed (512MB for now, 2GB would be possible). This also allows us to mmap() the memfd once. The exposed raw pointer is simply an offset from the memfd mmapping. Note that this means e.g. rouge rendering code will be able to write outside the buffer. Finally, only do this if the caller explicitly wants to enable scrolling. The memfd of other buffers are sized to the requested size.
| * | | app synchronized updates: set is_armed=false when enablingDaniel Eklöf2020-03-25-0/+1
| | | |
| * | | render: pace title updatesDaniel Eklöf2020-03-25-16/+34
| | | | | | | | | | | | | | | | Synchronize window title updates with window rendering.
| * | | render: explain _why_ we set a clip regionDaniel Eklöf2020-03-24-0/+1
| | | |
| * | | shm: scroll: implement offset wrap-aroundDaniel Eklöf2020-03-24-42/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Impose a maximum memfd size limit. In theory, this can be 2GB (wl_shm_create_pool() is the limiting factor - its size argument is an int32_t). For now, use 256MB. This is mainly to reduce the amount of virtual address space used by the compositor, which keeps at least one mmapping (of the entire memfd) around. One mmapping *per terminal window* that is. Given that we have 128TB with 48-bit virtual addresses, we could probably bump this to 2GB without any issues. However, 256MB should be enough. TODO: check how much we typically move the offset when scrolling in a fullscreen window on a 4K monitor. 256MB may turn out to be too small. On 32-bit shm_scroll() is completely disabled. There simply isn't enough address space. * Wrapping is done by moving the offset to "the other end" of the memfd, and copying the buffer contents to the new, wrapped offset. The "normal" scrolling code then does the actual scrolling. This means we'll re-instantiate all objects twice when wrapping.
| * | | render: bug: clear clip region before tinting the windowDaniel Eklöf2020-03-24-0/+1
| | | |
| * | | render: attach buffer just before commitDaniel Eklöf2020-03-24-1/+3
| | | |
| * | | render: clear scroll damage list when we force-refresh the entire windowDaniel Eklöf2020-03-24-0/+1
| | | |
| * | | quirks: add KDE quirk: surface must be damaged *after* being attachedDaniel Eklöf2020-03-24-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | KDE resets all surface damage when a buffer is attached. Add a quirk that adds a full-buffer damage to the surface. This quirk is intended to be called after attaching a buffer to a surface.
| * | | Merge branch 'master' into scroll-damage-performanceDaniel Eklöf2020-03-24-30/+22
| |\ \ \
| * | | | shm: shm_scroll(): initial implementation of reverse scrollingDaniel Eklöf2020-03-23-27/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented by truncating the file size and moving the offset backwards. This means we can only reverse scroll when we've previously scrolled forward. TODO: figure out if we can somehow do fast reverse scrolling even though offset is 0 (or well, less than required for scrolling).
| * | | | shm: scroll: move top/bottom region handling from renderer into shmDaniel Eklöf2020-03-23-59/+57
| | | | | | | | | | | | | | | | | | | | | | | | | This allows us to restore the regions without copying the contents to temporary memory.
| * | | | render: scroll: use shm scrolling even though we have a top regionDaniel Eklöf2020-03-23-3/+20
| | | | |
| * | | | render: scroll: take margins into account when restoring bottom scroll regionDaniel Eklöf2020-03-23-5/+5
| | | | |
| * | | | render: scroll: move comment to where it belongsDaniel Eklöf2020-03-23-12/+10
| | | | |
| * | | | render: margins: caller explicitly asks for top/bottom marginsDaniel Eklöf2020-03-23-7/+10
| | | | |
| * | | | render: margins: regression: fix incorrect marginsDaniel Eklöf2020-03-23-6/+17
| | | | |
| * | | | shm: add shm_can_scroll()Daniel Eklöf2020-03-23-0/+8
| | | | |
| * | | | Merge branch 'master' into scroll-damage-performanceDaniel Eklöf2020-03-23-13/+18
| |\ \ \ \
| * | | | | shm: print performance warning when FALLOC_FL_PUNCH_HOLE isn't supportedDaniel Eklöf2020-03-22-3/+6
| | | | | |
| * | | | | shm: verify the system supports FALLOC_FL_PUNCH_HOLEDaniel Eklöf2020-03-22-0/+12
| | | | | |
| * | | | | shm: scroll: no need to instantiate a new buffer when ftruncate() failsDaniel Eklöf2020-03-22-21/+1
| | | | | |
| * | | | | render: use shm_scroll() when we believe it will be fasterDaniel Eklöf2020-03-22-54/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shm_scroll() is fast when memmove() is slow. That is, when scrolling a *small* amount of lines, shm_scroll() is fast. Conversely, when scrolling a *large* number of lines, memmove() is fast. For now, assume the two methods perform _roughly_ the same given a certain number of bytes they have to touch. This means we should use shm_scroll() when number of scroll lines is less than half the screen. Otherwise we use memmove. Since we need to repair the bottom scroll region after a shm_scroll, those lines are added to the count when determining which method to use. TODO: * Check if it's worth to do shm scrolling when we have a top scroll region. * Do more performance testing with a) various amount of scrolling lines, and b) larger bottom scroll regions.
| * | | | | shm: new function, shm_scroll()Daniel Eklöf2020-03-22-72/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function "scrolls" the buffer by the specified number of (pixel) rows. The idea is move the image offset by re-sizing the underlying memfd object. I.e. to scroll forward, increase the size of the memfd file, and move the pixman image offset forward (and the Wayland SHM buffer as well). Only increasing the file size would, obviously, cause the memfd file to grow indefinitely. To deal with this, we "punch" a whole from the beginning of the file to the new offset. This frees the associated memory. Thus, while we have a memfd file whose size is (as seen by e.g. fstat()) is ever growing, the actual file size is always the original buffer size. Some notes: * FALLOC_FL_PUNCH_HOLE can be quite slow when the number of used pages to drop is large. * all normal fallocate() usages have been replaced with ftruncate(), as this is *much* faster. fallocate() guarantees subsequent writes wont fail. I.e. it actually reserves (disk) space. While it doesn't allocate on-disk blocks for on-disk files, it *does* zero-initialize the in-memory blocks. And this is slow. ftruncate() doesn't do this. TODO: implement reverse scrolling (i.e. a negative row count).
* | | | | | ci: initial sr.ht build manifestDaniel Eklöf2020-03-28-0/+42
| | | | | |
* | | | | | conf: rename 'startup-mode' to 'initial-window-mode'Daniel Eklöf2020-03-28-7/+8
| |_|_|/ / |/| | | |
* | | | | client: add --maximized and --fullscreenDaniel Eklöf2020-03-27-9/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now create a copy of the config for each client, and updates it with the values passed from the client. Since we're not actually cloning it (and e.g. strdup() all strings etc) we can't call conf_destroy() to free it, but need to free just the strings we've replaced.
* | | | | foot: add --maximized and --fullscreen command line optionsDaniel Eklöf2020-03-26-0/+30
| | | | |
* | | | | config: add 'startup-mode' optionDaniel Eklöf2020-03-26-1/+39
| |_|/ / |/| | | | | | | | | | | | | | | This option controls the initial window mode: windowed, maximized or fullscreen. The default is windowed.
* | | | render: fdm refresh handler: don't clear pending flagsDaniel Eklöf2020-03-24-22/+17
| | | | | | | | | | | | | | | | | | | | The pending flags may already be set (from a previous call to the FDM hook). In this case, they should not be cleared.
* | | | term: delayed rendering: failure to read timers is always an errorDaniel Eklöf2020-03-24-8/+5
| |/ / |/| |
* | | delayed rendering: ignore frame callback if delayed rendering is activeDaniel Eklöf2020-03-23-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we applied delayed rendering (that is, we gave the client a chance to do more writes before we scheduled a render refresh) only when the renderer were idle. However, with e.g. a high keyboard repeat rate, it is very much possible to start the render loop and then never break out of it while receiving keyboard input. This causes screen flickering, as we're no longer even trying to detect the clients transaction boundaries. So, let's rewrite how this is done. First, we give the user the ability to disable delayed rendering altogether, by setting either the lower or upper timeout to 0. Second, when delayed rendering is enabled, we ignore the frame callback. That is, when receiving input, we *always* reschedule the lower timeout timer, regardless of whether the render is idle or not. The render's frame callback handler will *not* render the grid if the delayed render timers are armed. This means for longer client data bursts, we may now skip frames. That is, we're trading screen flicker for the occasional frame hickup. For short client data bursts we should behave roughly as before. This greatly improves the behavior of fullscreen, or near fullscreen, updates of large grids (example, scrolling in emacs in fullscreen, with a vertical buffer split).
* | | term: delayed rendering: read timers even though is_armed = falseDaniel Eklöf2020-03-23-5/+8
|/ / | | | | | | | | | | | | | | | | There's a race/chance that we'll have disarmed the delayed rendering timers and still get the call. While it _shouldn't_ be anything to read from the timers, it doesn't hurt to try. And, if the timers *are* readable, not reading them means we'll end up in an infinite FDM loop.
* | render: resize: update saved 'normal' cursor if we're in alt screenDaniel Eklöf2020-03-22-0/+15
| | | | | | | | | | | | | | | | | | | | | | When resizing in alt mode, we never updated the saved 'normal' cursor. This meant that when we exited alt mode, the cursor would be positioned where it was in the old pre-resize/reflow grid. Now, we update the saved cursor in the same way we update visible cursor. The result is that when we exit the alt screen, the cursor is restored to the same coordinates it would have been updated to had the resize been done in the 'normal' screen.
* | server: purge *all* buffers when a terminal shuts downDaniel Eklöf2020-03-18-2/+7
| | | | | | | | | | Previously we only purged the main grid buffers. Now we also purge the search buffers and the CSD buffers.