Commit graph

2324 commits

Author SHA1 Message Date
Daniel Eklöf
a98484c6eb
render: scrollback indicator: add top margin 2020-07-26 12:37:57 +02:00
Daniel Eklöf
1a65b161dc
input: handle the scrollback indicator surface in pointer events 2020-07-26 12:37:35 +02:00
Daniel Eklöf
76350c568e
term: term_surface_kind(): recognize the scrollback indicator sub-surface 2020-07-26 12:37:12 +02:00
Daniel Eklöf
c1f35731e0
input: margins are not selectable
* Fix col/row calculation in pointer-enter event; we did not take the
  margins into account.
* seat->mouse.col,row are now set to -1 if the cursor is inside the
  margins. That is, col/row are only ever valid when the mouse is
  actually over the grid, and not in the margins.
* Use regular 'left-ptr' mouse cursor when mouse is inside the
  margins, to not make the user think he/she can start a selection.

Besides making things clearer, this also fixes a crash that occurred
if you started a selection in e.g. the right margin.
2020-07-26 12:37:02 +02:00
Daniel Eklöf
50d116dcb9
config: scrollback-indicator-format: percent -> percentage 2020-07-26 11:39:02 +02:00
Daniel Eklöf
9a9e876d6e
render: scrollback indicator: use black on bright blue 2020-07-26 10:42:38 +02:00
Daniel Eklöf
2e519ed5b6
render: scrollback indicator: implement 'relative' and 'line' variants
We now implement all combinations of 'scrollback-indicator-style' and
'scrollback-indicator-format'.
2020-07-26 10:18:05 +02:00
Daniel Eklöf
67758a7cb7
render: scrollback indicator: wip: implement 'fixed:percent' indicator
When scrollback indicator has been enabled, and the viewport isn't at
the bottom, we now render a *static* indicator with the position in
percent.

We use the color scheme's blue color as background, and it's white
color as foreground. This is subject to change... Should maybe be
configurable as well.

The Wayland surface + sub-surface are instantiated on-demand, and
automatically destroyed when no longer used.
2020-07-26 10:01:26 +02:00
Daniel Eklöf
c2362c10f1
render: search: fix subpixel argument to fcft_glyph_rasterize() 2020-07-26 10:01:05 +02:00
Daniel Eklöf
2815c1c076
wayland: add scrollback indicator surface + sub-surface to wl_window 2020-07-26 10:00:50 +02:00
Daniel Eklöf
a39c490d9b
shm: add shm_cookie_scrollback_indicator() 2020-07-26 10:00:21 +02:00
Daniel Eklöf
d180de00a9
config: fix error message for 'scrollback-indicator-style' 2020-07-26 09:44:16 +02:00
Daniel Eklöf
be7d0a5615
config: fix key check for 'scrollback-indicator-style' 2020-07-26 09:43:58 +02:00
Daniel Eklöf
9edd71a741
config: rename scrollback-indicator-style value 'static' to 'fixed' 2020-07-25 14:40:46 +02:00
Daniel Eklöf
e3be2cbd6f
config: rename scrollback-indicator-style value 'moving' to 'relative' 2020-07-25 14:38:36 +02:00
Daniel Eklöf
c4679e474e
config: rename scrollback-indicator to scrollback-indicator-style
And turn it from a boolean to an enum. It can be set to:

* `none` - disables the indicator
* `static` - always rendered near the top of the window
* `moving` - position reflects the scrollback position
2020-07-25 14:31:45 +02:00
Daniel Eklöf
5b868fd0c9
config: add 'scrollback-indicator-format' option
The value of this option must be either 'percent', or 'line', and
determines _how_ we render the scrollback indicator.
2020-07-24 18:35:34 +02:00
Daniel Eklöf
e945063620
config: rename show-scrollback-position to scrollback-indicator 2020-07-24 18:26:44 +02:00
Daniel Eklöf
2c6f7adc17
config: add 'show-scrollback-position' option to footrc 2020-07-24 18:20:26 +02:00
Daniel Eklöf
b1950ac222
render: add code that calculates current position in scrollback 2020-07-24 17:51:40 +02:00
Daniel Eklöf
c50a442810
readme: add section describing how to identify foot 2020-07-24 17:50:48 +02:00
Daniel Eklöf
8d81dde5b8
search: improve viewport movements
* Don't move the viewport if the new match is already fully visible
* When we do have to move the viewport, position it such that the new
  match ends up roughly in the middle.
2020-07-24 17:49:50 +02:00
Daniel Eklöf
60984e7a24
csi: secondary DA: do not pretend we're xterm
Previously, our secondary DA response indicated a) VT420, b) an XTerm
version number.

Now, we indicate VT220 (which corresponds to the primary DA response),
and we report foot's version number as MMmmpp. I.e major, minor and
patch versions, using two digits.

E.g. 1.4.2 is encoded as 010402
2020-07-24 17:47:47 +02:00
Daniel Eklöf
cc60d3a670
csi: primary DA: remove features we do not support
We do not implement

* Selective Erase
* Technical Character Set
* Terminal state interrogation
2020-07-24 17:46:18 +02:00
Daniel Eklöf
0c11542eca
changelog: add new 'unreleased' section 2020-07-23 18:56:47 +02:00
Daniel Eklöf
e838c0ce24
Merge branch 'releases/1.4' 2020-07-23 18:55:14 +02:00
Daniel Eklöf
c2a58451e0
meson/pkgbuild: bump to 1.4.2 2020-07-23 18:51:48 +02:00
Daniel Eklöf
0e0d6aea86
changelog: prepare for 1.4.2 2020-07-23 18:51:33 +02:00
Daniel Eklöf
1c8e103c92
Merge branch 'master' into releases/1.4 2020-07-23 18:50:50 +02:00
Daniel Eklöf
f6473756d9
sixel: remove sixel-to-be-splitted *before* splitting it
This fixes an assertion in debug builds, due to the pre-splitted and
splitted sixels overlapping.
2020-07-23 18:15:29 +02:00
Daniel Eklöf
fda6e9c2c9
sixel: overwrite: use target sixel's height, not cell height
When copying the image data for the left and right parts of the
splitted images, use the sixel's height, not the cell height.

This fixes a crash when the sixel didn't cover the entire cell height.
2020-07-23 18:13:54 +02:00
Daniel Eklöf
3869c7299f
render: bump maximum window title length from 100 to 2048 (bytes)
Apparently, the max is ~8K, but lets stay on the safe side.
2020-07-22 21:07:57 +02:00
Daniel Eklöf
d58f88661f
changelog: add new 'unreleased' section 2020-07-22 20:06:07 +02:00
Daniel Eklöf
90f0b6be0a
Merge branch 'releases/1.4' 2020-07-22 20:05:17 +02:00
Daniel Eklöf
b238443a71
meson/pkgbuild: bump version to 1.4.1 2020-07-22 20:03:48 +02:00
Daniel Eklöf
d1f02af308
changelog: prepare or 1.4.1 2020-07-22 20:03:28 +02:00
Daniel Eklöf
6b6db610cc
Merge branch 'master' into releases/1.4 2020-07-22 20:01:59 +02:00
Daniel Eklöf
10f53325e1
input: pipe: avoid goto's where variables may be uninitialized 2020-07-22 19:34:07 +02:00
Daniel Eklöf
63d73f8685
changelog: add a new 'unreleased' section 2020-07-22 19:11:57 +02:00
Daniel Eklöf
230555a89d
Merge branch 'releases/1.4' 2020-07-22 19:10:46 +02:00
Daniel Eklöf
591829bf50
meson/pkgbuild: bump version to 1.4.0, require fcft 2.2.2 2020-07-22 18:59:36 +02:00
Daniel Eklöf
8bb1607557
changelog: prepare for 1.4.0 2020-07-22 18:59:19 +02:00
Daniel Eklöf
ac7b229f7c
search: re-enable search-commit action
This was disabled while implementing multi-seat support, and I forgot
to fix and re-enable before that feature was merged.
2020-07-22 17:51:27 +02:00
Daniel Eklöf
2092185d29
readme: 'special thanks' -> 'credits' 2020-07-20 17:35:17 +02:00
Daniel Eklöf
ac42ce4303
Merge branch 'pipe-grid-to-external-tool'
Closes https://codeberg.org/dnkl/foot/issues/29
2020-07-17 09:34:51 +02:00
Daniel Eklöf
47e8c337dc
Merge branch 'master' into pipe-grid-to-external-tool 2020-07-16 17:50:34 +02:00
Daniel Eklöf
067cf6ccb1
wayland: don't assume data-device globals are added before seats
When we're handling the initial set of globals, the data-device and
primary-selection-device objects may, or may not be registered before
the seat(s).

We need to handle both cases.

When adding a seat, instantiate the data-device and
primary-selection-device **if available**.

When adding the device objects, instantiate them on **all** currently
available seats.
2020-07-16 17:47:47 +02:00
Daniel Eklöf
e5401c845c
extract: finish: allocate buffer before writing the terminator
When all cells were empty, we'll have written 0 bytes to the buffer
and hence it will still be un-allocated (i.e. NULL).
2020-07-16 17:46:02 +02:00
Daniel Eklöf
e1e52c706a
term: remove unused struct definition 'rgb' 2020-07-16 11:52:51 +02:00
Daniel Eklöf
de75a2035e
Merge branch 'master' into pipe-grid-to-external-tool 2020-07-16 08:53:20 +02:00