aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* changelog: 'not' -> 'now'Daniel Eklöf2020-07-14-1/+1
|
* grid: reflow: always emit *all* cells of a multi-column characterDaniel Eklöf2020-07-14-1/+7
|
* term: remove assert, as we're already checking for this in the loop conditionDaniel Eklöf2020-07-14-1/+0
|
* term: print: manually increment cursor columnDaniel Eklöf2020-07-14-3/+4
| | | | | We know we're within bounds, and thus we don't need the extra overhead of term_cursor_right().
* grid: reflow: use width=1 for invalid charactersDaniel Eklöf2020-07-14-1/+1
|
* term: line-wrap: need to update grid->cur_row when we did *not* scrollDaniel Eklöf2020-07-14-0/+1
|
* changelog: prefix all C0 names with 'C0::'Daniel Eklöf2020-07-14-3/+3
|
* term: print: also require width > 1 when checking if we need to force-wrap or notDaniel Eklöf2020-07-14-1/+3
| | | | | | While this might seem like it would slow down things, it should in fact help the compiler optimize: the "normal" code path, that prints regular ASCII characters, always call term_print() with width == 1.
* term: line-wrap: manually set cursor row+colDaniel Eklöf2020-07-14-3/+7
| | | | | line-wrap is in the hot path, and term_cursor_down/left adds additional checks that we don't need.
* grid: reflow: force line-wrap if a multi-column character does not fit on current lineDaniel Eklöf2020-07-14-14/+1
|
* term: print: force line-wrap if a multi-column character does not fit on current lineDaniel Eklöf2020-07-14-0/+9
|
* csi: DECAWM: clear LCFDaniel Eklöf2020-07-14-0/+5
|
* csi: IND+RI now clears LCFDaniel Eklöf2020-07-14-0/+3
|
* term: print: manually increment cursor column for multi-column charsDaniel Eklöf2020-07-14-2/+2
| | | | | There's nothing wrong with using term_cursor_right(), but it is unnecessary since we already check for the end-of-line.
* term: insert: move assert() after checking whether insert mode is enabled or notDaniel Eklöf2020-07-14-2/+2
|
* term: linefeed: explicitly clear LCFDaniel Eklöf2020-07-14-2/+6
| | | | | | LF should always clear LCF. Previously, it was done implicitly in term_cursor_down(). I.e it was cleared as long as the cursor wasn't at the bottom of the scrolling region
* vt: change HT (horizontal tab) to *not* clear LCFDaniel Eklöf2020-07-14-0/+8
| | | | | | According to the specification, HT **should** clear LCF. However, nearly all emulators do not. In particular, XTerm doesn't. So we follow suite.
* term: line-wrap: use term_cursor_{down,left}Daniel Eklöf2020-07-14-4/+4
|
* term: rename term_formfeed() -> term_carriage_return()Daniel Eklöf2020-07-14-5/+9
|
* vt: implement C0::FF - processed in the same way as C0::LFDaniel Eklöf2020-07-14-0/+3
|
* vt: process C0::VT the same way we process C0::LFDaniel Eklöf2020-07-14-6/+5
| | | | | | | | Previously, C0::VT was implemented as a simple 'cursor down'. I.e. it would behave as LF **until** it reached the bottom of the screen, where instead of scrolling, it became a no-op. See https://vt100.net/docs/vt102-ug/chapter5.html
* vt: sort C0's in the switch statement, and use escaped character possibleDaniel Eklöf2020-07-14-16/+16
|
* input: keyboard: keymap: close(fd) on early-return when failing to mmapDaniel Eklöf2020-07-14-0/+1
|
* input: keyboard: keymap: use xkb_keymap_new_from_buffer()Daniel Eklöf2020-07-14-2/+4
|
* input: keyboard: detect failure to mmap keymapDaniel Eklöf2020-07-14-0/+17
|
* Merge branch 'merge-wl-surface-damage'Daniel Eklöf2020-07-14-77/+100
|\ | | | | | | Closes #35
| * changelog: mention fix for 'too many wl_surface_damage_buffer()' callsDaniel Eklöf2020-07-13-0/+2
| |
| * wayland: configure: do a regular resize instead of a force resizeDaniel Eklöf2020-07-13-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The commit log says that was needed to get tiling in GNOME working. However, I don't know *which* extension that was. Force resizing in a configure event means we'll trash a perfectly valid buffer on e.g. 'activated' state changes. So, let's revert this for now, and if this breaks GNOME, let's try to find another solution. If worse comes to worse, we can detect if we're running under GNOME and do a force-resize then, but not on sane compositors.
| * term: set_fonts: describe why we force resizeDaniel Eklöf2020-07-13-0/+1
| |
| * render: render_margin: don't damage margins when rendering scroll damageDaniel Eklöf2020-07-13-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying scroll damage, we may have to re-render the margins. This is because when we SHM-scroll, we actually move the entire surface, and thus we end up overwriting the top margin area with old window content, and scroll in uninitialized memory in the bottom margin. But, we don't have to tell the compositor about this - the last frame always contains correct margins; i.e. there's no change between the last frame and current frame being rendered. TODO: we _could_ micro-optimize and only damage the margins after a surface resize. We do it slightly more often now, when dealing with state changes in screen flash or scrollback searching. But I don't think it's worth the effort.
| * render: doh! flush the last surface damage *outside* of the rendering loopDaniel Eklöf2020-07-13-8/+8
| |
| * main: free 'cwd' at exitDaniel Eklöf2020-07-13-1/+2
| | | | | | | | | | This fixes an issue where e.g. failing to initialize the Wayland backend would leave cwd un-free:d
| * render: render_margin: add 'damage_{top,bottom,left,right}' argumentsDaniel Eklöf2020-07-13-20/+24
| |
| * render: render_margin(): remove top/bottom argumentsDaniel Eklöf2020-07-13-24/+20
| | | | | | | | All calls to render_margin() set top=true and bottom=true anyway.
| * render: merge wl surface damage for consecutive dirty rowsDaniel Eklöf2020-07-13-38/+55
|/
* render: keep lock while pushing dirty rows to worker queueDaniel Eklöf2020-07-13-19/+3
| | | | | | | | | | | | | | | | Instead of locking the queue for each dirty row we append, and signaling a condition variable, just keep the lock while going through the visible rows. Release the lock once done. Since we take the lock *before* posting the 'start' semaphore, all workers will be waiting for the lock to be released. Then, one at a time they'll get the lock and pick a row to render. The queue will never get empty - when all rows have been rendered, each worker will pick a 'frame done' "job" from the queue, and break the rendering loop.
* Merge branch 'renderer-dont-special-case-cursor-cell'Daniel Eklöf2020-07-13-83/+52
|\
| * render: don't render cursor when it has been explicitly hiddenDaniel Eklöf2020-07-12-2/+2
| |
| * render: remove most of the special handling of cursor renderingDaniel Eklöf2020-07-12-83/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we had to explicitly render the old cursor cell *before* applying scrolling damage. We then rendered all the dirty rows, *without* rendering the cursor - even if the cursor cell was among the dirty rows. Finally, when everything else was done, we explicitly rendered the cursor cell. This meant a lot of code, and unnecessary render_cell() calls, along with unnecessary wl_surface_damage_buffer() calls. This was a necessary in the early design of foot, but not anymore. We can simply mark both the old cursor cell, and the current one, as dirty and let the normal rendering framework render it. All we need to do is pass the cursor column to render_row(), so that it can pass has_cursor=true in the appropriate call to render_cell(). We pass -1 here for all rows, except the cursor's row, where we pass the actual cursor column. With this, there's no need to calculate whether the cursor is visible or not; just mark it's cell as dirty, and if that row is visible, the normal rendering will take care of it. This also simplifies the state needed to be saved between two frames; we only need a row pointer, and the cursor column index. Part of https://codeberg.org/dnkl/foot/issues/35
* | doc: foot.5: 'runtime' -> 'at runtime'Daniel Eklöf2020-07-12-2/+3
|/
* changelog: hollow cursor is now based on keyboard focus, not visual focusDaniel Eklöf2020-07-11-0/+2
|
* term: update cursor on kbd focus changes, not visual focus changesDaniel Eklöf2020-07-11-2/+2
|
* input: include seat name in debug log outputDaniel Eklöf2020-07-11-4/+4
|
* render: use kbd-focus instead of visual focus for hollow block cursorDaniel Eklöf2020-07-11-5/+5
| | | | | | When determining whether we should render a hollow block cursor, i.e. to signal that we're unfocused, base the decision on the terminals current keyboard focus, not visual focus.
* term: remove term_has_kbd_focus(), use term->kbd_focus insteadDaniel Eklöf2020-07-11-18/+5
|
* term: cache kbd-focused state, just like we cache visual focus stateDaniel Eklöf2020-07-11-2/+12
| | | | | | There's one difference however, when we receive a kbd unfocus call, *all* seats must have us unfocused before we actually change the state.
* Merge branch 'multi-seat'Daniel Eklöf2020-07-11-707/+893
|\ | | | | | | Closes #32
| * wayland: destroy cursor theme when removing pointer capabilityDaniel Eklöf2020-07-10-0/+4
| |
| * wayland: seat: instantiate pointer surface in capabilities eventDaniel Eklöf2020-07-10-6/+12
| | | | | | | | | | This way we only instantiate the surface for seats that actually have a pointer.
| * wayland: read XCURSOR_{THEME,SIZE} in reload_xcursor themeDaniel Eklöf2020-07-10-34/+16
| |
| * seat: use separate 'enter' serials for keyboard and mouseDaniel Eklöf2020-07-09-12/+14
| |
| * multi-seat: improve handling of multiple (mouse) pointersDaniel Eklöf2020-07-09-90/+97
| | | | | | | | | | | | | | | | * xcursor always set for all pointers * xcursor sometimes not updated when it should be * mouse grabbed state wasn't per seat, but global (i.e. "does at least one seat enable mouse grabbing") * selection enabled state wasn't per seat
| * readme: add multi-seat support to the feature listDaniel Eklöf2020-07-09-0/+1
| |
| * changelog: add multi-seat supportDaniel Eklöf2020-07-09-0/+1
| |
| * focus in/out: terminal checks whether it is a state change or notDaniel Eklöf2020-07-09-19/+7
| |
| * wayland: globals: destroy: seat: use keyboard/pointer listener interfacesDaniel Eklöf2020-07-09-17/+9
| |
| * wayland: globals: destroy: handle seats being destroyedDaniel Eklöf2020-07-09-2/+39
| |
| * input: only call term_kbd_focus_{in,out}() on actual state changeDaniel Eklöf2020-07-09-7/+24
| | | | | | | | | | | | That is, only call term_kbd_focus_in() if we're the *first* seat focusing that terminal, and only call term_kbd_focus_out() if we're the *last* seat that focused it.
| * wayland: log: be clear that these are the XCRUSOR_* environment variablesDaniel Eklöf2020-07-08-2/+1
| |
| * xcursor: trigger theme reload in pointer-enter eventDaniel Eklöf2020-07-08-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we triggered a theme reload on output changes. This is completely wrong. We may get a new output with a scale different from the output the pointer is actually on. Now, we store the current scale along with the theme. We then trigger a call to reload the xcursor theme *every* time the pointer enters a surface. When it does, we use the current scale factor of the terminal that owns that surface. If the terminal covers multiple outputs, with different scale factors, we'll use the largest scale factor. This may not be 100% correct. But to fix that, we'd need to track which regions of a surface are mapped on which outputs. Too complicated I say.
| * wayland: seat: log keyboard/pointer capabilityDaniel Eklöf2020-07-08-1/+4
| |
| * multi-seat: re-enable OSC 52 supportDaniel Eklöf2020-07-08-15/+38
| |
| * multi-seat: re-enable selection support (excluding OSC 52)Daniel Eklöf2020-07-08-109/+104
| |
| * multi-seat: re-enable scrollback search supportDaniel Eklöf2020-07-08-29/+16
| |
| * multi-seat: re-enable mouse button+motion reporting supportDaniel Eklöf2020-07-08-38/+47
| |
| * multi-seat: enable xcursor theme support againDaniel Eklöf2020-07-08-143/+104
| |
| * wip: multi-seat supportDaniel Eklöf2020-07-08-452/+616
|/ | | | | Compiles and runs, but mouse, clipboard and other things have been disabled.
* meson/PKGBUILD: bump fcft requirement to 2.2.0Daniel Eklöf2020-07-07-2/+2
|
* term: don't use deprecated fcft_size_adjust()Daniel Eklöf2020-07-07-107/+126
| | | | | | | | | | | | | | | | | | | | | | | | | When resizing the font on-the-fly, we now do a complete font-reload (this is basically what fcft_size_adjust() did anyway). To get the correct size, we maintain the current size ourselves. We get the initial size from the user-provided font pattern, by converting the string to an FcPattern, and using FcPatternGet() to retrieve both the FC_SIZE and FC_PIXEL_SIZE attributes. These attributes are then removed from the pattern, and the pattern is converted back to a string. The terminal struct maintains a copy of the font sizes. These are initially set to the sizes from the config. When the user resizes the font, the terminal-local sizes are adjusted. To ensure the primary and user-configured fallback fonts are resizes equally much, convert any pixel sizes to point sizes at this point. When the font size is reset, we reload the font sizes from the config (thus once again returning actual pixel-sizes, if that's what the user has configured).
* sixel: overwrite_by_row: handle case where 'width' goes past end of rowDaniel Eklöf2020-07-07-1/+4
| | | | Cap 'width' to maximum number of columns available.
* readme: wiki: 'faq' has been renamed to 'troubleshooting'Daniel Eklöf2020-06-30-3/+3
|
* readme: add link to FAQ in the wikiDaniel Eklöf2020-06-30-0/+6
|
* doc: foot.5: make it clear that 'login-shell' is a boolean optionDaniel Eklöf2020-06-30-1/+2
|
* changelog: grammarDaniel Eklöf2020-06-30-1/+1
|
* config: add 'blink' option to cursor section in footrcDaniel Eklöf2020-06-30-2/+19
| | | | | This option controls whether the default cursor should blink or not. The default is to *not* blink.
* csi: '\E[0 q' resets the cursor style to the default, not '\E[2 q'Daniel Eklöf2020-06-30-7/+16
| | | | Also update 'Se' capability in the terminfo, to reflect this.
* csi: debug: print 'private' *after* parametersDaniel Eklöf2020-06-30-6/+6
|
* Merge branch 'sixel-performance'Daniel Eklöf2020-06-30-147/+200
|\
| * Merge branch 'master' into sixel-performanceDaniel Eklöf2020-06-29-8/+46
| |\ | |/ |/|
* | sixel: destroy all sixels when font size is decreasedDaniel Eklöf2020-06-29-1/+37
| | | | | | | | | | | | If changing the font size causes the cell size to decrease, either horizontally or vertically (or both), then delete all sixels since the grid space they allocated no longer is enough to hold the images.
* | changelog: slave -> clientDaniel Eklöf2020-06-29-2/+2
| |
* | changelog: 'capturing mouse events' -> 'capturing the mouse'Daniel Eklöf2020-06-29-1/+1
| |
* | changelog: make it easier to readDaniel Eklöf2020-06-29-1/+1
| |
* | term: use 'left_ptr' instead of 'hand2' as cursor when client is mouse grabbingDaniel Eklöf2020-06-29-3/+5
| |
| * scroll: destroy scrolled out sixels before scroll is appliedDaniel Eklöf2020-06-29-140/+62
| | | | | | | | | | | | | | | | | | | | | | | | The logic that breaks out of sixel loops does not work for rows that has already wrapped around. Thus, we need to destroy sixels that are about to be scrolled out *before* we actually scroll. Since this is the *only* time we destroy sixels (instead of overwriting it), rename the sixel functions. And, since they now do a very specific thing, they can be greatly simplified (and thus faster).
| * reflow: ensure sixels are correctly sorted when re-insertedDaniel Eklöf2020-06-29-32/+63
| | | | | | | | | | And make sure to remove re-inserted sixels that has wrapped around the scrollback (this may happen when the window size decreases).
| * changelog: group sixel related changes toghetherDaniel Eklöf2020-06-29-4/+4
| |
| * sixel: overwrite-by-rectangle: optimize: break out of loop as soon as possibleDaniel Eklöf2020-06-28-0/+18
| | | | | | | | | | | | | | | | | | Since the images are sorted, we can break out of the loop as soon as we detect an image that *ends before* the rectangle's top starts. In order for the row comparisons to work, the row numbers must be re-based against the current scrollback offset, or the scrollback *end*, to be precise.
| * Merge branch 'master' into sixel-performanceDaniel Eklöf2020-06-28-3/+100
| |\ | |/ |/|
* | readme: nope, how about a png then?Daniel Eklöf2020-06-28-1/+1
| |
* | readme: let's see if we can use the SVG in the top headerDaniel Eklöf2020-06-28-1/+1
| |
* | readme: link to PNG insteadDaniel Eklöf2020-06-28-1/+1
| |
* | readme: special thanks go to Ordoviz, for designing foot's logoDaniel Eklöf2020-06-28-0/+7
| |
* | Merge branch 'logo'Daniel Eklöf2020-06-28-2/+92
|\ \
| * | Add logo, fixes #27Lennard Hofmann2020-06-27-2/+92
| | | | | | | | | | | | | | | | | | The SVG can be scaled to any size, thus we only provide the "minimum" of PNGs as specified by XDG, see "Installing Application Icons" in https://specifications.freedesktop.org/icon-theme-spec/
| | * sixel: overwrite-by-row: optimize: break out of loop as soon as possibleDaniel Eklöf2020-06-28-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the images are sorted, we can break out of the loop as soon as we detect an image that *ends before* the row we're looking for. In order for the row comparisons to work, the row numbers must be re-based against the current scrollback offset, or the scrollback *end*, to be precise.
| | * render: sixel: regression: need to take current offset into account when early-quitting sixel ↵Daniel Eklöf2020-06-28-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | rendering The sixel images are sorted, that's true. But in order for our row numer comparisons to actually work, we need to rebase all numbers against the current scrollback offset (or, the scrollback *end*, to be precise).
| | * sixel: overwrite: pass 'width' to sixel_overwrite_at_cursor()Daniel Eklöf2020-06-28-4/+4
| | | | | | | | | | | | This is necessary to handle multi-column characters correctly.
| | * render: sixels: break out of loop when we're sure there aren't any more visible imagesDaniel Eklöf2020-06-28-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sixel list is sorted, with the most recent images *first* in the list (and thus the "oldest" images are at the back). This means we can break out of the loop when we see a sixel that *ends before* the current view starts. As a minor optimization, we also recognize sixels that *start after* the current view ends. We can't break out of the loop, but we can skip trying to render them (they wouldn't have been rendered, but more work would have been done in render_sixel() to reach this conclusion).
| | * sixel: insert: calculate end rows in a single statementDaniel Eklöf2020-06-28-8/+21
| | |