aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* README: mention that ctrl+mouse creates a block selectionDaniel Eklöf2020-01-04-0/+2
|
* PKGBUILD: remove old *.gcda filesDaniel Eklöf2020-01-04-1/+2
|
* Merge branch 'block-selection'Daniel Eklöf2020-01-04-127/+267
|\
| * selection: min_bufsize_for_extraction: add one extra column for *all* rowsDaniel Eklöf2020-01-04-7/+4
| |
| * selection: rename selection_cell_count -> min_bufsize_for_extractionDaniel Eklöf2020-01-04-2/+2
| |
| * selection: cell count now adds one extra column per row, for \nDaniel Eklöf2020-01-04-3/+11
| | | | | | | | | | | | | | | | When we extract text, we may insert '\n' at the end of each line (or last column of selection, for block selections). These newlines doesn't occupy any physical cells, and thus we must **make** room for them in the extraction buffer.
| * selection: fix bug where first column on all rows but the first was lostDaniel Eklöf2020-01-04-10/+12
| | | | | | | | | | | | | | | | | | | | When extracting text from the selection, we lost the first column on all rows but the first. This is because the algorithm changed slightly when we moved to foreach_selection(); the end-of-line detection is now done on the first column of the new line, instead of the last column on the previous line.
| * selection: simplify extraction by converting to UTF-8 at the endDaniel Eklöf2020-01-04-21/+25
| | | | | | | | | | Instead of converting a cell at a time to UTF-8, copy the wide characters as is, and then convert everything at once at the end.
| * selection: extract_selection now uses foreach_selected()Daniel Eklöf2020-01-04-57/+105
| | | | | | | | | | This "automagically" adds support for block selections, since foreach_selected already handles block selections.
| * term: mouse_grabbed: ctrl may be pressed too (for block selection)Daniel Eklöf2020-01-04-1/+1
| |
| * selection: selection_cancel() now sets 'kind' to SELECTION_NONEDaniel Eklöf2020-01-04-1/+6
| |
| * selection: store cell 'selected' state in the cells' attributesDaniel Eklöf2020-01-04-78/+129
| | | | | | | | | | | | | | | | | | Instead of having the renderer calculate, for each cell, whether that cell is currently selected or not, make selection_update() mark/unmark the selected cells. The renderer now only has to look at the cells' 'selected' attribute. This makes the renderer both smaller and faster.
| * render: coord_is_selected: handle block selectionsDaniel Eklöf2020-01-03-8/+22
| |
| * selection: track selection type; normal or block selectionDaniel Eklöf2020-01-03-7/+18
|/
* wayland: window: optimize: set opaque regionDaniel Eklöf2020-01-03-0/+11
| | | | | | | When background alpha is 1.0 (0xffff), i.e. completely opaque, tell the compositor this, via wl_surface_set_opaque_region(). This allows it to optimize drawing of surfaces _behind_ our window.
* term: background alpha is not a floating point numberDaniel Eklöf2020-01-03-1/+1
|
* wayland: don't use wl_display_dispatch()Daniel Eklöf2020-01-03-8/+30
| | | | | | | | | | | | | | | | | | | | | | wl_display_dispatch() calls poll(), which is unnecessary since we already know the FD is readable. Use the more lower level wl_display_read_events() + wl_display_dispatch_pending(). These require wl_display_prepare_read() to have been called. The idea is to call wl_display_prepare_read() **before** calling poll(). Thus, we do this more or less last in wayl_init(), and at the **end** of the FDM handler. However, having taking this lock also means we no longer can call wl_display_roundtrip() directly (it will hang). So, add a wrapper, wayl_roundtrip(), that cancels the read intent, does the roundtrip, and then re-acquires the read intent.
* selection: remove unneeded wayland display roundtripsDaniel Eklöf2020-01-03-2/+0
|
* term: init: don't resize if compositor has already resized usDaniel Eklöf2020-01-03-13/+16
|
* term: no need to call render_refresh() when starting/stopping blink timerDaniel Eklöf2020-01-03-2/+1
|
* wayland: flush after commit new pointer surfaceDaniel Eklöf2020-01-03-0/+1
|
* wayland: configure: resize before changing visual focusDaniel Eklöf2020-01-03-2/+2
| | | | | | | | | | | | | | This hopefully fixes and issue where the visual focus in/out caused a render refresh with the *old* size. This caused the occasional flicker at startup, or when resizing the window. By placing the resize call before the visual focus in/out, we ensure the refresh uses the new size. This is a temporary workaround. The correct solution is to ensure we only call refresh() once.
* render: refresh: ensure window has been configuredDaniel Eklöf2020-01-03-0/+5
|
* Merge branch 'cleanup-wayland-window-callbacks'Daniel Eklöf2020-01-03-84/+59
|\
| * render: remove 'refresh' from render_resize()Daniel Eklöf2020-01-03-9/+8
| |
| * wayland: window: apply all configure changes after acking the eventDaniel Eklöf2020-01-03-22/+25
| |
| * wayland: remove wayl_terminal_from_xdg_{surface,toplevel}Daniel Eklöf2020-01-03-30/+0
| |
| * wayland: window: pass window pointer to xdg toplevel callbacksDaniel Eklöf2020-01-03-6/+6
| |
| * wayland: window: pass window pointer to xdg-surface-listener callbacksDaniel Eklöf2020-01-03-3/+4
| |
| * wayland: window: pass window pointer to wl-surface callbacksDaniel Eklöf2020-01-03-8/+8
| |
| * wayland: window now keeps pointer to owning terminal, not waylandDaniel Eklöf2020-01-03-8/+10
|/
* render: render_resize(): don't do anything if width or height is 0Daniel Eklöf2020-01-03-2/+4
|
* wayland: fix release buildDaniel Eklöf2020-01-03-2/+4
|
* Merge branch 'visual-focus'Daniel Eklöf2020-01-03-67/+173
|\
| * wayland: debug log state changes in xdg-toplevel-configureDaniel Eklöf2020-01-03-3/+45
| |
| * wayland: xdg-surface-configure: refresh terminalDaniel Eklöf2020-01-03-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any changes done in any of the configure events are ignored before we've ack:ed the configure event. In particular, this means the resize done in xdg-toplevel-configure isn't displayed until the next time we call render_refresh(). Unless we do something ourselves, this can take quite some time, since we're basically need the slave to write something. So, in xdg-surface-configure, *after* having ack:ed the configure event, call render_refresh() to make the changes done in xdg-toplevel-configure visible as soon as possible.
| * term: render_resize() now takes a 'refresh' argumentDaniel Eklöf2020-01-03-1/+1
| |
| * wayland: render_resize() now takes a 'refresh' argumentDaniel Eklöf2020-01-03-4/+8
| |
| * render: resize() now only calls refresh() if asked toDaniel Eklöf2020-01-03-3/+4
| |
| * Merge branch 'master' into visual-focusDaniel Eklöf2020-01-03-1/+1
| |\ | |/ |/|
* | render: use a unique buffer cookie for the 'search' surfaceDaniel Eklöf2020-01-03-1/+1
| | | | | | | | | | | | | | | | This fixes an issue where rendering the 'search' box caused the last normal buffer from being purged. This meant the terminal had a pointer to a now freed buffer, which we de-referenced and occasionally memcpy:ied from.
| * wayland: term_visual_focus_{in,out} handles already being focused/defocusedDaniel Eklöf2020-01-03-2/+2
| |
| * term: visual_focus_{in,out}: do nothing if already focused/defocusedDaniel Eklöf2020-01-03-0/+6
| |
| * wayland: xdg-toplevel-configure: no need to detect early configure eventsDaniel Eklöf2020-01-03-7/+2
| | | | | | | | | | | | | | | | We can now lookup terminal instances at all times, making it unnecessary to detect "early" configure events. Note that we still need to prevent a resize from happening when width/height is 0.
| * term: term_init() calls wl_display_roundtrip()Daniel Eklöf2020-01-03-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having `wayl_win_init()` call `wl_display_roundtrip()` (which it itself doesn't need), call it from `term_init()`. This allows us to add ourselves (the new terminal instance) to the terminal list in the wayland backend, before triggering the wayland events caused by `wayl_win_init()`. This is turn allows the wayland backend to find/lookup the new terminal when those events occur..
| * term: spell 'initialize' correctlyDaniel Eklöf2020-01-03-1/+1
| |
| * render: draw_cursor: use terminal's visual focus to determine cursor shapeDaniel Eklöf2020-01-02-5/+3
| |
| * wayland: xdg-top-level-configure: call term_visual_focus_{in,out}Daniel Eklöf2020-01-02-1/+5
| |
| * term: add term_visual_focus_{in,out}Daniel Eklöf2020-01-02-8/+19
| | | | | | | | | | | | | | These functions should be called when the terminal gets or loses visual focus. Note that this isn't necessarily the same as having keyboard focus.
| * input: keyboard-leave: move comment to where it belongsDaniel Eklöf2020-01-02-3/+3
| |
| * term: rename term_focus_{in,out} -> term_kbd_focus_{in,out}Daniel Eklöf2020-01-02-6/+6
| |
| * Merge branch 'master' into visual-focusDaniel Eklöf2020-01-02-0/+0
| |\ | |/ |/|
* | fcft: ignore `embeddedbitmap` for non-scalable fontsDaniel Eklöf2020-01-02-0/+0
| |
| * wayland: xdg-toplevel-configure: check for stateless configure callsDaniel Eklöf2020-01-02-8/+11
| | | | | | | | | | Ignore configure calls without state, instead of checking for width/height == 0.
| * wayland: ignore early configure callsDaniel Eklöf2020-01-02-3/+4
| | | | | | | | | | At this point, not everything has been setup and we crash when trying to convert the surface pointer to a terminal pointer.
| * term: add visually focused attribute to terminal structDaniel Eklöf2020-01-02-4/+14
| |
| * wayland: rename focused/moused to kbd_focus/mouse_focusDaniel Eklöf2020-01-02-34/+34
|/
* README: add missing '+' in keyboard shortcut ctrl+shift+wDaniel Eklöf2020-01-01-1/+1
|
* wayland: warn when presentation timings have been requested but is not supportedDaniel Eklöf2020-01-01-0/+4
|
* Merge branch 'readme-pimping'Daniel Eklöf2020-01-01-55/+48
|\
| * README: use footnoteDaniel Eklöf2020-01-01-2/+5
| |
| * README: add keyboard::normal-mode and keyboard::scrollback-search to indexDaniel Eklöf2020-01-01-0/+2
| |
| * README: use headings to separate normal key bindings from scrollback search bindingsDaniel Eklöf2020-01-01-3/+3
| |
| * Revert "README: try removing empty lines between list items"Daniel Eklöf2020-01-01-0/+4
| | | | | | | | This reverts commit 7e39d113b7471b67a50db2cfb22923898b6850f4.
| * Revert "README: that didn't work - try with a hard line break"Daniel Eklöf2020-01-01-2/+2
| | | | | | | | This reverts commit 7489cae576edbfbf1f0b6db36a3c657c0260f91c.
| * README: that didn't work - try with a hard line breakDaniel Eklöf2020-01-01-2/+2
| |
| * README: try removing empty lines between list itemsDaniel Eklöf2020-01-01-4/+0
| |
| * README: list items should be indented by **4** spacesDaniel Eklöf2020-01-01-8/+9
| |
| * README: make GNOME SSD reply italicDaniel Eklöf2020-01-01-1/+1
| |
| * README: use a definition list for keyboard shortcutsDaniel Eklöf2020-01-01-44/+31
|/
* render: presentation: cleanupDaniel Eklöf2020-01-01-6/+20
|
* render: call wl_display_flush() right after wl_surface_commit()Daniel Eklöf2020-01-01-2/+1
| | | | This groups the two calls, for readability.
* render: presentation: clean up frame interval count calculationDaniel Eklöf2020-01-01-1/+1
|
* term: bump lower delay limit to 500µsDaniel Eklöf2019-12-31-1/+1
| | | | | Emacs with a split screen often goes above 200µs. 500µs is still much better than 2000µs...
* term: ptmx timing: use a define instead of #if 0Daniel Eklöf2019-12-31-3/+5
|
* render: presentation: space between value and "µs"Daniel Eklöf2019-12-31-3/+3
|
* term: lower the lower delay timeout from 2ms to 200µsDaniel Eklöf2019-12-31-1/+1
|
* term: commented out code to measure time between slave outputDaniel Eklöf2019-12-31-0/+24
| | | | | | | | | | | | | | This allows us to measure the time between to refresh delays. That is, when we decide to delay a refresh, we store the current time. If we hit that code path _again_, without having refreshed, we calculate the time that has passed. This gives us an estimate for how we should set our lower delay timeout. This is of course application dependent, but is still much better than simply guessing a value...
* render: presentation: also use seconds when calculating frame interval countDaniel Eklöf2019-12-31-2/+2
|
* render: presentation: log both input -> commit and commit -> presented timesDaniel Eklöf2019-12-31-29/+40
|
* wayland: only bind to 'presentation' interface if -p,--presentation-timingsDaniel Eklöf2019-12-31-10/+16
|
* wayland: remove empty lineDaniel Eklöf2019-12-31-1/+0
|
* render: reset input/commit timestamps on presentation discarded eventDaniel Eklöf2019-12-31-0/+3
|
* wayland: make zxdg_output_v1_listener struct constDaniel Eklöf2019-12-31-1/+1
|
* wayland: optionally use the presentation time protocol to measure input lagDaniel Eklöf2019-12-31-11/+187
| | | | | | | | | | | | | | | | | | | This adds a flag, -p,--presentation-timings, that enables input lag measuring using the presentation time Wayland protocol. When enabled, we store a timestamp when we *send* a key to the slave. Then, when we commit a frame for rendering to the compositor, we request presentation feedback. We also store a timestamp for when the frame was committed. The 'presented' callback then looks at the input and commit timestamps, and compares it with the presented timestamp. The delay is logged at INFO when the delay was less than one frame interval, at WARN when it was one frame interval, and at ERR when it was two or more frame intervals. We also update statistic counters that we log when foot is shut down.
* main: let getopt_long() print error messageDaniel Eklöf2019-12-29-6/+1
|
* main: third member in "struct option" is a pointerDaniel Eklöf2019-12-29-8/+8
|
* main: use a single printf() when printing usageDaniel Eklöf2019-12-29-11/+13
|
* README: use triple quoted blocks for meson/ninja examplesDaniel Eklöf2019-12-29-12/+18
| | | | This allows us to specify which syntax highlighting (sh) to use.
* PKGBUILD: add 'wayland-protocols' to makedependsDaniel Eklöf2019-12-29-1/+1
|
* README: expand the 'install' sectionDaniel Eklöf2019-12-29-1/+58
| | | | | | | * Talk about tllist + fcft * Mention that the PKGBUILD requires tllist+fcft to be installed as system libraries * Provide a short how-to-configure-and build with meson description
* README: remove combining character example that doesn't render in browsersDaniel Eklöf2019-12-29-2/+1
|
* terminfo: set RGB flag in foot-directDaniel Eklöf2019-12-26-0/+1
|
* csi: change DA3 reply to "FOOT", in hexDaniel Eklöf2019-12-21-1/+1
|
* server: verify CWD string length matches the indicated lengthDaniel Eklöf2019-12-21-0/+6
|
* server: move forward the indicated number of TERM bytesDaniel Eklöf2019-12-21-1/+1
|
* server: bug: move forward 2 bytes, not whatever the client sentDaniel Eklöf2019-12-21-1/+1
|
* term: term_init: add 'cwd' argumentDaniel Eklöf2019-12-21-18/+28
| | | | | | | | | | This is used when spawning the slave, to set its current working directory just before we exec() the client. In a regular foot instance, we set the cwd from getcwd(). In a foot server instance, each connecting client sends its cwd to the server, and we use that.
* client/server: client sends its CWD to serverDaniel Eklöf2019-12-21-1/+20
|
* Merge branch 'launch-new-instance'Daniel Eklöf2019-12-21-5/+159
|\