aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * | selection: implement support for drag-and-dropDaniel Eklöf2020-10-26-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We accept COPY and MOVE actions, for text/plain;charset=utf-8 mime-types. To implement DnD, we need to track the current DnD data offer *and* the terminal instance it is (currently) targeting. To do this, a seat has a new member, ‘dnd_term’. On a DnD enter event, we lookup the corresponding terminal instance and point ‘dnd_term’ to it. On a DnD leave event, ‘dnd_term’ is reset. The DnD data offer is tracked in the terminal’s wayland window instance. It is reset, along with the seat’s ‘dnd_term’ on a DnD leave event. On a drop event, we immediately clear the seat’s ‘dnd_term’, to ensure we don’t reset it, or destroy the offer before the drop has been completed. The drop’s ‘done()’ callback takes care of destroying and resetting the DnD offer in the terminal’s wayland window instance. Closes #175
| * | wayland: bind to data-device-manager version 3, for drag-and-drop supportDaniel Eklöf2020-10-26-1/+1
|/ /
* | main: remove trailing ‘, ’ from arch log lineDaniel Eklöf2020-10-25-1/+1
| |
* | render: blink switches between foreground and dimmed foregroundDaniel Eklöf2020-10-22-3/+8
| |
* | Merge branch 'custom-bold-italic-fonts'Daniel Eklöf2020-10-21-69/+158
|\ \ | | | | | | | | | Closes #169
| * | doc: foot.ini.5: mention how one can disable bold/italic fonts completelyDaniel Eklöf2020-10-20-0/+3
| | |
| * | config: add font-bold, font-italic and font-bold-italic optionsDaniel Eklöf2020-10-20-69/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These options lets the user configure custom fonts and styles, to use with the bold and italic cell attributes. By default, they are unset, meaning we use the bold/italic variants of the regular font. Closes #169.
* | | changelog: restored -> restoreDaniel Eklöf2020-10-20-1/+1
|/ /
* | osc: change info logging to debug logging when changing the cursor colorDaniel Eklöf2020-10-20-1/+1
| |
* | input: handle XKB errorsDaniel Eklöf2020-10-20-58/+74
| | | | | | | | | | | | | | | | | | | | | | * Don’t de-reference the xkb context/keymap/state if we failed to instantiate them. * Don’t try to send a translated utf8 key sequence if the translation failed. * Handle xkb_compose_state_get_utf8() and xkb_state_key_get_utf8() returning more than 64 bytes. This _may_ fix #171.
* | input: don’t allow diagonal resize when tiledDaniel Eklöf2020-10-20-8/+13
| |
* | wayland: properly restore window size when being un-tiledDaniel Eklöf2020-10-20-17/+52
| | | | | | | | | | | | | | | | Bind to xdg-shell version 2 if available, as this enables us to track our window’s ‘tiled’ state in the ‘configure’ events. This in turn allows us to stash the ‘old’ window size when being tiled, to be used again when restoring the window size when un-tiled.
* | Merge branch 'dont-require-a-compose-file' into masterDaniel Eklöf2020-10-20-8/+30
|\ \ | | | | | | | | | Closes #170
| * | input: don’t crash if xkbcommon cannot find a compose fileDaniel Eklöf2020-10-19-8/+30
|/ / | | | | | | | | | | | | | | Handle xkb_compose_table_new_from_locale() returning NULL. When this happens, log a warning that “dead keys” will be disabled, and make sure to never de-reference the compose table pointer. Closes #170
* | term: reset: enable/disable cursor blink depending on user configurationDaniel Eklöf2020-10-13-1/+4
| |
* | term: reset: kill blink timerDaniel Eklöf2020-10-13-0/+1
| |
* | term: remove unneeded blink.active fieldDaniel Eklöf2020-10-13-4/+0
| | | | | | | | We now use the timer FD instead; if it is -1, blinking is not active.
* | term: instantiate cursor blink timer on-demandDaniel Eklöf2020-10-13-9/+21
| |
* | term: create/destroy blink timer on-demandDaniel Eklöf2020-10-13-15/+21
| | | | | | | | | | | | | | | | Blinking text is uncommon. It doesn’t make that much sense to keep a timer opened (but unarmed) at all times. This patch makes it so the timer is instantiated on-demand, and destroyed again when it no longer is needed.
* | term: subpixel changed: fix build with LOG_ENABLE_DBG=1Daniel Eklöf2020-10-13-6/+6
| |
* | selection: re-factor: break out code shared between clipboard/primary sendDaniel Eklöf2020-10-13-59/+21
| | | | | | | | | | The send functions are called by the compositor when another application wants to paste data *from* foot.
* | Merge branch 'releases/1.5' into masterDaniel Eklöf2020-10-13-9/+20
|\|
| * meson/pkgbuild: bump version to 1.5.21.5.2Daniel Eklöf2020-10-13-2/+2
| |
| * input: regression: don’t pass on mouse click to application if we consumed itDaniel Eklöf2020-10-13-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When we ‘consume’ a mouse button event (i.e. when we have a shortcut mapped to it), the event should *not* be passed on to the client application. In 5f64c5c33590a41afd3f621870c6abd89b859073, button handling was refactored and unfortunately introduced a regression where we once again started passing consumed button presses to the client application. Fixes #168
* | Merge branch 'scroll-up-down-while-selecting' into masterDaniel Eklöf2020-10-12-1/+164
|\ \ | | | | | | | | | Closes #149
| * | selection: auto-scroll: call cmd_scrollback_{up,down}() with number of rowsDaniel Eklöf2020-10-11-4/+2
| | | | | | | | | | | | | | | No need to loop and call cmd_scrollback_{up,down}() with ‘1’ each loop iteration; just call it with the total number of lines to scroll.
| * | selection: cancel: call selection_stop_scroll_timer()Daniel Eklöf2020-10-11-4/+1
| | | | | | | | | | | | | | | Instead of re-implementing the same logic, simply call selection_stop_scroll_timer().
| * | input: comment: ‘measures’ -> ‘measured’Daniel Eklöf2020-10-11-1/+1
| | |
| * | input: comment: ‘fast’ -> ‘faster’Daniel Eklöf2020-10-11-1/+1
| | |
| * | changelog: auto-scroll while selectingDaniel Eklöf2020-10-11-0/+3
| | |
| * | selection: auto-scroll: add SELECTION_SCROLL_NOT as a scroll ‘direction’Daniel Eklöf2020-10-11-10/+32
| | |
| * | input: auto-scroll: apply scrollback.multiplier to the interval divisorDaniel Eklöf2020-10-11-2/+3
| | |
| * | selection: auto-scroll: selection keeps scrolling while mouse is outside gridDaniel Eklöf2020-10-11-7/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving the mouse outside the grid while we have an on-going selection now starts a timer. The interval of this timer depends on the mouse’s distance from the grid - the further away the mouse is, the shorter interval. On each timer timeout, we scroll one line, and update the selection. Thus, the shorter the interval, the faster we scroll. The timer is canceled as soon as the mouse enters the grid again, or the selection is either canceled or finalized. The timer FD is created and destroyed on-demand. Most of the logic is now in selection.c. The exception is the calculation of the timer interval, which depends on the mouse’s position. Thus, this is done in input.c. The scroll+selection update logic needs to know a) which direction we’re scrolling in, and b) which *column* the selection should be updated with. If the mouse is outside the grid’s left or right margins, the stored mouse column will be -1. I.e. we don’t know whether the mouse is on the left or right side of the grid. This is why the caller, that starts the timer, must provide this value. The same applies to top and bottom margins, but since we already have the scroll *direction*, which row value to use can be derived from this.
| * | input: motion: scroll up/down while selectingDaniel Eklöf2020-10-11-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the cursor moves above the grid top, or below the grid bottom, while selecting text, scroll up/down the scrollback before updating the selection. TODO: this only scrolls when the mouse is *moved*. I.e. you can’t move the cursor outside the grid once and for all, and then let foot auto-scroll.
* | | Merge branch 'releases/1.5' into masterDaniel Eklöf2020-10-11-5/+12
|\ \ \ | | |/ | |/|
| * | meson/pkgbuild: bump version to 1.5.11.5.1Daniel Eklöf2020-10-11-2/+2
| | |
| * | changelog: prepare for 1.5.1Daniel Eklöf2020-10-11-6/+3
| | |
| * | changelog: remove duplicate entryDaniel Eklöf2020-10-11-4/+0
| | |
| * | readme/doc: add shift+insert to list of default key bindingsDaniel Eklöf2020-10-11-0/+6
| | |
| * | changelog: update ‘contributors’ listDaniel Eklöf2020-10-11-0/+1
| | |
| * | selection: use appropriate check for PRIMARY pasteSergey Nazaryev2020-10-11-2/+3
| | | | | | | | | | | | | | | | | | Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.
| * | config: bind shift+insert to primary-paste by defaultDaniel Eklöf2020-10-11-2/+6
| | |
| * | changelog: add contributorDaniel Eklöf2020-10-11-0/+2
| | |
| * | config: fix "-Wformat-nonliteral" warningsCraig Barnes2020-10-11-3/+3
| | |
| * | readme: minor rewrite of server/daemon sectionDaniel Eklöf2020-10-11-7/+5
| | |
| * | csi: only respond to Primary DA when Ps == 0Daniel Eklöf2020-10-11-0/+6
| | |
| * | readme: clearer descriptions of secondary and tertiary DA responsesDaniel Eklöf2020-10-11-9/+5
| | |
| * | term: remove unused bit in xtsave structDaniel Eklöf2020-10-11-1/+0
| | |
| * | changelog: we’ve fixed several sixel+reflow related bugsDaniel Eklöf2020-10-11-0/+2
| | |
| * | sixel: reflow: drop sixels that crosses the scrollback history’s endDaniel Eklöf2020-10-11-0/+23
| | | | | | | | | | | | | | | This fixes various crashes that occurred after a reflow due to the sixel image list invariants no longer being true.
| * | sixel: unhook: do overwrite *after* linefeedingDaniel Eklöf2020-10-11-2/+5
| | | | | | | | | | | | | | | This ensures the overwrite is done when the scrollback history is in the same state as when we then insert the new image.
| * | sixel: overwrite: use pixman to calculate new the sixel boundariesDaniel Eklöf2020-10-11-75/+74
| | | | | | | | | | | | | | | | | | When punching a hole in a sixel (and thus splitting it up into up to four new sixels), use pixman to calculate the new sixel coordinates and sizes.
| * | sixel: ovewrite-by-rectangle: in debug builds, cross-reference against pixmanDaniel Eklöf2020-10-11-2/+38
| | | | | | | | | | | | | | | Use pixman to calculate the intersection of the rectangle being overwritten, and the sixel(s). Verify our code matches.
| * | sixel: verify scrollback consistency: new verify functionDaniel Eklöf2020-10-11-0/+26
| | | | | | | | | | | | Verifies sixels have been scrolled out correctly
| * | sixel: add comments to verify_*() functionsDaniel Eklöf2020-10-11-0/+23
| | |
| * | sixel: verify-*: don’t return anything; rely on asserts onlyDaniel Eklöf2020-10-11-18/+7
| | |
| * | sixel: scroll up/down: early return when list is emptyDaniel Eklöf2020-10-11-0/+6
| | | | | | | | | | | | Branch tagged as ‘likely’ for performance reason
| * | sixel: cell-size-changed: don’t verify sixels hereDaniel Eklöf2020-10-11-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state after this function is an intermediate state and isn’t necessarily valid. This sixels needs to be ‘reflowed’ to ensure a valid state. This is something that should be done by the caller after the text grid has been reflowed and the sixel coordinates have been re-mapped to the new grid. TODO: can/should we update the sixel cols/rows in sixel_reflow() instead?
| * | sixel: unhook: look total number of sixelsDaniel Eklöf2020-10-11-0/+3
| | | | | | | | | | | | | | | This helps debug sixel overwrites, as it makes it more visible when there are sixels that _should_ have been removed.
| * | sixel: scroll-up: don’t break out early of loopDaniel Eklöf2020-10-11-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function loops the list of sixels, and discards those that would be scrolled out if the grid offset is moved forward by the specified number of rows. The criteria is when the rebased row value is less than the number of rows to scroll. A rebased row number is a zero-based number starting at the beginning of the scrollback. Thus, when scrolling 5 rows, rows with a rebased row number between 0-4 will be scrolled out. For performance reasons, we used to break out of the loop as soon as a row number *larger* than the scroll count. This however does not work. The sixels are sorted by their *end* row. While this works in most cases (think images outputted in the shell in the normal screen), it doesn’t always. In the alt screen, where applications can print images just about anywhere, it is possible to have *any* start row number anywhere in the sixel list. Just as long as their *end* row numbers are sorted. For example, a huuuge sixel that covers the entire scrollback. This sixel will naturally be first in the list (and thus sixel_scroll_up() will visit it *last*, since it iterates the list in reverse), but should still be destroyed when scrolling.
| * | sixel: verify-list-order: add an ‘index’ variableDaniel Eklöf2020-10-11-0/+4
| | | | | | | | | | | | This will make it easier when debugging assertions in this function.
| * | sixel: overwrite-by-rectangle: assert sixels don’t cross scrollback wrap-aroundDaniel Eklöf2020-10-11-4/+7
| | |
| * | sixel: scroll: call sixel_erase() instead of sixel_destroy()Daniel Eklöf2020-10-11-2/+2
| | | | | | | | | | | | | | | This ensures the screen is updated correctly. Without this, the sixel image would remain on screen until force-refreshed by some other means.
| * | sixel: TOOD -> TODO (fixes codespell build error)Daniel Eklöf2020-10-11-1/+1
| | |
| * | sixel: verify-no-overlap: free pixman regionsDaniel Eklöf2020-10-11-0/+5
| | |
| * | sixel: verify-no-overlap: initialize ‘intersection’ pixman regionDaniel Eklöf2020-10-11-0/+1
| | |
| * | render: resize: call sixel_reflow() after reflowing gridsDaniel Eklöf2020-10-11-0/+3
| | |
| * | sixel: unhook: only call render_refresh() onceDaniel Eklöf2020-10-11-2/+3
| | |
| * | sixel: implement reflowDaniel Eklöf2020-10-11-54/+51
| | | | | | | | | | | | | | | | | | | | | Move sixel reflow from grid_reflow() to sixel_reflow(). This lets us use internal sixel functions to update the sixels. Note that grid_reflow() still needs to remap the sixelss coordinates.
| * | term: update sixel rows/cols *after* cell dimension change, *before* resizeDaniel Eklöf2020-10-11-39/+27
| | | | | | | | | | | | | | | This fixes an issue where we resized+reflowed with bad rows/cols values in the sixels.
| * | sixel: verify-sixels: check for bad list order lastDaniel Eklöf2020-10-11-2/+2
| | |
| * | sixel: verify-no-wraparound-crossover: fix calculation of ‘end’ rowDaniel Eklöf2020-10-11-1/+1
| | |
| * | sixel: add sixel_cell_size_changed()Daniel Eklöf2020-10-11-0/+25
| | | | | | | | | | | | | | | This function should be called *after* the cell dimensions have changed, but *before* resizing/reflowing the grids.
| * | sixel: debug: more fine-grained verification of sixel image listDaniel Eklöf2020-10-11-5/+63
| | | | | | | | | | | | | | | * Verify no sixel crosses the scrollback wrap-around * Verify no sixels overlap
| * | grid: reflow: re-insert sixels *after* new grid offset has been setDaniel Eklöf2020-10-11-40/+51
| | | | | | | | | | | | | | | | | | Also make sure to destroy sixels that are too big to fit in the scrollback. Fixes issues with the sixel list not being sorted correctly.
| * | sixel: overwrite: calculate split-up image pieces’ rows/cols from their width/heightDaniel Eklöf2020-10-11-8/+3
| | |
| * | sixel: overwrite: remove assertsDaniel Eklöf2020-10-11-12/+1
| | | | | | | | | | | | Sixels may extend outside the visible screen area
| * | term: re-calculate sixel images’ rows/cols values when cell size changesDaniel Eklöf2020-10-11-0/+14
| | |
| * | sixel: fix sheared image when image crosses scrollback wrap-aroundDaniel Eklöf2020-10-11-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a sixel image crosses the scrollback wrap-around, it is split up into (at least) two pieces. We use cursor->point.col for all pieces’ x-coordinate. This caused the final image to appear sheared, since we do a carriage-return (after a number of linefeeds) after each piece - this causes the cursor’s position to be reset to the left margin. The solution is simple; remember the cursor’s initial x-coordinate, and use that to position all image pieces. Closes #151.
| * | sixel: overwrite-by-rectangle expects ‘width’ to not exceed screenDaniel Eklöf2020-10-11-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a crash when the emitted sixel extends beyond the right margin. The crash only happens when there are other sixel images already emitted. Fixes part of #151
| * | sixel: fold long lineDaniel Eklöf2020-10-11-1/+3
| | |
| * | doc: foot.1: remove ‘--’ from example command lineDaniel Eklöf2020-10-11-1/+1
| | |
| * | doc: foot.ini: mention that ‘lines’ is rounded up to nearest power of 2Daniel Eklöf2020-10-11-1/+3
| | |
| * | doc: foot.ini: “top at” -> “top of”Daniel Eklöf2020-10-11-1/+1
| | |
| * | doc: foot.ini: it’s foot.ini, not foot.initDaniel Eklöf2020-10-11-1/+1
| | |
| * | render: apply opacity correctly when in reverse video modeDaniel Eklöf2020-10-11-2/+9
| | |
| * | doc: foot.ini: the tweak section is called ‘tweak’, not ‘tweaks’Daniel Eklöf2020-10-11-1/+1
| | |
| * | config: ignore key/value pairs following an invalid section nameDaniel Eklöf2020-10-11-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we detected an invalid section name, we correctly logged this and warned the user. However, the internal state machine now had an invalid section enum value. This caused a crash when the next key/value pair was to be parsed and we tried to lookup which parser function to call. Closes #159.
| * | changelog: trackpad scrolling: ‘multiplier’ is in the ‘scrollback’ sectionDaniel Eklöf2020-10-11-2/+2
| | |
| * | changelog: multiplier: the option belongs to the ‘scrollback’ sectionDaniel Eklöf2020-10-11-2/+2
| | |
| * | changelog: multiplier default value changed from 1.0 -> 3.0Daniel Eklöf2020-10-11-0/+5
| | |
| * | config: change default multiplier from 1.0 -> 3.0Daniel Eklöf2020-10-11-3/+3
| | |
| * | changelog: reword trackpad scrolling speed entryDaniel Eklöf2020-10-11-0/+5
| | |
| * | input: trackpad scroll: correctly convert pixel movements to line movementsDaniel Eklöf2020-10-11-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trackpad scroll movements are in pixels. Foot previously “translated” these directly to line movements (i.e. a one pixel scroll event was translated into a one line scroll). Now we use the line height of the terminal and correctly convert pixels to lines. This makes the trackpad scroll speed in foot consistent with the scroll speed in e.g. Alacritty and Kitty.
| * | grid: reflow: fix release build; ‘idx’ is only used in an assert()Daniel Eklöf2020-10-11-1/+2
| | |
| * | grid: reflow: handle viewport being too far down when enlarging the windowDaniel Eklöf2020-10-11-2/+17
| | | | | | | | | | | | | | | | | | If the viewport is close to the bottom, but not *at* the bottom, and we’re enlarging the window, the translated viewport will be too far down.
| * | grid: reflow: retain scrollback positionDaniel Eklöf2020-10-11-1/+12
| | | | | | | | | | | | Closes #142
| * | changelog: fixed color flashes with OSC 4,10,11Daniel Eklöf2020-10-11-0/+2
| | |
| * | render: remove render_refresh_margins()Daniel Eklöf2020-10-11-9/+0
| | |
| * | osc: don’t explicitly call render_refresh() when changing the color paletteDaniel Eklöf2020-10-11-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing so will schedule the renderer “as soon as possible”. I.e we’re by-passing the regular scheduler, and thus we’re by-passing the user’s setting of the delayed-render-* timers. The fact that we’re scheduling “as soon as possible” also means we’re much more likely to trigger flickering, or color flashes, if the application is changing colors which are on the screen. To handle changes to the cursor color(s), use the new term_damage_cursor() instead of render_refresh(). To handle background color changes, which affect the margins, use the new term_damage_margins() instead of render_refresh_margins(), Closes #141