Commit graph

2171 commits

Author SHA1 Message Date
Daniel Eklöf
b6342bb36d
wayland: globals: destroy: handle seats being destroyed 2020-07-09 08:47:56 +02:00
Daniel Eklöf
fc9fde88c3
input: only call term_kbd_focus_{in,out}() on actual state change
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.
2020-07-09 08:46:25 +02:00
Daniel Eklöf
98f3ccfe79
wayland: log: be clear that these are the XCRUSOR_* environment variables 2020-07-08 20:04:02 +02:00
Daniel Eklöf
d377221e24
xcursor: trigger theme reload in pointer-enter event
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.
2020-07-08 19:52:17 +02:00
Daniel Eklöf
5539af2597
wayland: seat: log keyboard/pointer capability 2020-07-08 19:30:34 +02:00
Daniel Eklöf
11373a6561
multi-seat: re-enable OSC 52 support 2020-07-08 19:28:08 +02:00
Daniel Eklöf
4c7d29f7eb
multi-seat: re-enable selection support (excluding OSC 52) 2020-07-08 18:41:09 +02:00
Daniel Eklöf
04e566492c
multi-seat: re-enable scrollback search support 2020-07-08 18:20:34 +02:00
Daniel Eklöf
58415428cf
multi-seat: re-enable mouse button+motion reporting support 2020-07-08 18:16:43 +02:00
Daniel Eklöf
be2490022d
multi-seat: enable xcursor theme support again 2020-07-08 18:08:39 +02:00
Daniel Eklöf
c470825067
wip: multi-seat support
Compiles and runs, but mouse, clipboard and other things have been
disabled.
2020-07-08 16:45:26 +02:00
Daniel Eklöf
bd0a003a4c
meson/PKGBUILD: bump fcft requirement to 2.2.0 2020-07-07 11:57:07 +02:00
Daniel Eklöf
69e4213e4a
term: don't use deprecated fcft_size_adjust()
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).
2020-07-07 10:44:55 +02:00
Daniel Eklöf
3063204289
sixel: overwrite_by_row: handle case where 'width' goes past end of row
Cap 'width' to maximum number of columns available.
2020-07-07 10:42:59 +02:00
Daniel Eklöf
b1214bf635
readme: wiki: 'faq' has been renamed to 'troubleshooting' 2020-06-30 19:49:55 +02:00
Daniel Eklöf
45b7db06bf
readme: add link to FAQ in the wiki 2020-06-30 19:43:10 +02:00
Daniel Eklöf
c3cf05f8fb
doc: foot.5: make it clear that 'login-shell' is a boolean option 2020-06-30 17:46:35 +02:00
Daniel Eklöf
db7a51e3a4
changelog: grammar 2020-06-30 17:46:25 +02:00
Daniel Eklöf
a259eda535
config: add 'blink' option to cursor section in footrc
This option controls whether the default cursor should blink or
not. The default is to *not* blink.
2020-06-30 17:45:34 +02:00
Daniel Eklöf
7f65bd1c20
csi: '\E[0 q' resets the cursor style to the default, not '\E[2 q'
Also update 'Se' capability in the terminfo, to reflect this.
2020-06-30 17:44:43 +02:00
Daniel Eklöf
fd4904d82a
csi: debug: print 'private' *after* parameters 2020-06-30 17:42:57 +02:00
Daniel Eklöf
08309537ce
Merge branch 'sixel-performance' 2020-06-30 17:41:59 +02:00
Daniel Eklöf
fad5838dba
Merge branch 'master' into sixel-performance 2020-06-29 22:03:26 +02:00
Daniel Eklöf
62be729c45
scroll: destroy scrolled out sixels before scroll is applied
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).
2020-06-29 22:01:02 +02:00
Daniel Eklöf
a136987678
reflow: ensure sixels are correctly sorted when re-inserted
And make sure to remove re-inserted sixels that has wrapped around the
scrollback (this may happen when the window size decreases).
2020-06-29 21:59:40 +02:00
Daniel Eklöf
6ee76c21f2
changelog: group sixel related changes toghether 2020-06-29 21:57:01 +02:00
Daniel Eklöf
8f5e6e85e0
sixel: destroy all sixels when font size is decreased
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.
2020-06-29 21:53:29 +02:00
Daniel Eklöf
2c4ebec4da
changelog: slave -> client 2020-06-29 21:53:07 +02:00
Daniel Eklöf
b56dbfa854
changelog: 'capturing mouse events' -> 'capturing the mouse' 2020-06-29 21:52:50 +02:00
Daniel Eklöf
a6d35d41c4
changelog: make it easier to read 2020-06-29 21:52:32 +02:00
Daniel Eklöf
2ea32398c3
term: use 'left_ptr' instead of 'hand2' as cursor when client is mouse grabbing 2020-06-29 21:51:53 +02:00
Daniel Eklöf
1140dd37d3
sixel: overwrite-by-rectangle: optimize: break out of loop as soon as possible
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.
2020-06-28 19:22:23 +02:00
Daniel Eklöf
43b890c8e4
Merge branch 'master' into sixel-performance 2020-06-28 14:27:12 +02:00
Daniel Eklöf
aa1951a4d2
sixel: overwrite-by-row: optimize: break out of loop as soon as possible
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.
2020-06-28 14:24:30 +02:00
Daniel Eklöf
c7b2dcc0f4
render: sixel: regression: need to take current offset into account when early-quitting sixel 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).
2020-06-28 14:19:43 +02:00
Daniel Eklöf
4006fc86e4
sixel: overwrite: pass 'width' to sixel_overwrite_at_cursor()
This is necessary to handle multi-column characters correctly.
2020-06-28 11:01:19 +02:00
Daniel Eklöf
5158be86d2
render: sixels: break out of loop when we're sure there aren't any more visible images
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).
2020-06-28 10:45:30 +02:00
Daniel Eklöf
0483466f68
sixel: insert: calculate end rows in a single statement 2020-06-28 10:45:05 +02:00
Daniel Eklöf
32e84fbc54
readme: nope, how about a png then? 2020-06-28 09:32:54 +02:00
Daniel Eklöf
dc5b6ca73a
readme: let's see if we can use the SVG in the top header 2020-06-28 09:32:16 +02:00
Daniel Eklöf
a3adc5724e
readme: link to PNG instead 2020-06-28 09:30:23 +02:00
Daniel Eklöf
81968b989e
readme: special thanks go to Ordoviz, for designing foot's logo 2020-06-28 09:29:20 +02:00
Daniel Eklöf
4cea9d910e
Merge branch 'logo' 2020-06-28 09:22:48 +02:00
Daniel Eklöf
4a0042ba15
sixel: insert: sort sixels such that those furthest up in the scrollback is at the back 2020-06-28 09:16:43 +02:00
Daniel Eklöf
247e0c42d3
sixel: add local function sixel_insert()
Replace all tll_push_*() calls with calls to this function.
2020-06-28 08:37:25 +02:00
Lennard Hofmann
6b889564f7 Add logo, fixes #27
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/
2020-06-27 21:23:50 +02:00
Daniel Eklöf
deb61d20d8
grid: reflow: delete sixels that end up crossing the scrollback wrap around
Our sixel handling code requires sixels to *not* cross the scrollback
wrap around.

Until we've fixes the reflow code that split up such sixels (much like
we do when we generate a sixel), simply delete it.
2020-06-27 20:16:39 +02:00
Daniel Eklöf
ad8f293d96
terminfo: add remaining keypad keys 2020-06-27 20:05:50 +02:00
Daniel Eklöf
26528f6a73
input: add key mapping for XKB_KEY_KP_Decimal 2020-06-27 20:03:41 +02:00
Daniel Eklöf
9f31cfa764
terminfo: add ka1, ka3, kc1 and kc3 (upper/lower left/right keypad keys) 2020-06-27 19:39:27 +02:00