Commit graph

949 commits

Author SHA1 Message Date
Daniel Eklöf
34eac2dbe3
keyboard repeat: pass current input serial to keyboard_key()
This fixes an assertion when holding in ctrl+shift+c (copy to
clipboard); subsequent "presses" would set the clipboard serial to 0,
which we would then assert on in the next iteration when we tried to
cancel the previous copy.
2019-11-22 21:55:46 +01:00
Daniel Eklöf
ee45c48deb
term: shutdown: handle *not* being unmapped
When we're shutting down a terminal, we destroy our Wayland window,
and assume that will unmap us.

There are cases when this isn't true (most likely when e.g. a screen
locker is active, and the unmap is being deferred).

Handle by explicitly setting focused to NULL.
2019-11-21 18:18:35 +01:00
Daniel Eklöf
8c945c9832
input: may get keyboard_exit() event with no focused terminal
This happens on Sway when exiting a screen locker. Or at least that's
when we see the problem; it's unclear if the event occurs when
starting the screen locker, or when exiting it. Or maybe its both.

Anyway, don't try to unfocus a NULL-terminal.
2019-11-21 18:17:02 +01:00
Daniel Eklöf
55a23a5b29
log: set syslog facility to LOG_DAEMON when run in server mode 2019-11-20 19:43:31 +01:00
Daniel Eklöf
4f4ee5b39d
main: mention why we initialize a font set
Since fonts are destroyed and removed from the font cache when the
last instance is destroyed, closing the "last" terminal window in
server mode would destroy the fonts, and their glyph caches.

By instantiating the set in main, we ensure the fonts, and the glyph
caches, remain. This makes launching new terminals (much) faster.

Note that in "normal" (non-server) mode, this isn't really necessary,
but also doesn't have any penalty.
2019-11-20 19:27:16 +01:00
Daniel Eklöf
f3d212224b
README: here -> hear (doh!) 2019-11-20 11:59:11 +01:00
Daniel Eklöf
e87612fecb
Revert "PKGBUILD: set b_pgo=generate in first call to meson"
This reverts commit 7c2dd93690.

Or repeated pkgbuilds will fail since the first meson call
doesn't *re*configure an already configured build tree, causing us to
build with pgo=use when we should be using pgo=generate.
2019-11-20 10:45:15 +01:00
Daniel Eklöf
1bc9835246
Revert "input: remove unneeded(?) term_reset_view() calls"
This reverts commit 739c5cf7f0.

The original commit stated:

  Not sure why these were added here; they don't appear to be
  needed (we're writing to the client - it's up to the client to echo
  stuff, in which case we redraw as usual).

But, client output doesn't cause a scrollback/view reset.
2019-11-20 10:41:40 +01:00
Daniel Eklöf
fc961bb30e
PKGBUILD: add check() 2019-11-20 10:36:12 +01:00
Daniel Eklöf
a8c0770ce2
PKGBUILD: run 'ninja test' in pgo=generate phase
Otherwise the build fails in the pgo=use phase.
2019-11-20 10:35:44 +01:00
Daniel Eklöf
7c2dd93690
PKGBUILD: set b_pgo=generate in first call to meson
This avoids a meson re-configure right off the bat.
2019-11-20 10:34:57 +01:00
Daniel Eklöf
8deba5fdb7
font: don't spam failures to lookup glyphs 2019-11-20 10:23:17 +01:00
Daniel Eklöf
3c8a87168a
fonts: use 'weight' and 'slant', not 'style' when loading fonts 2019-11-19 17:35:02 +01:00
Daniel Eklöf
7b55f90b5b
doc: foot.1: highlight 'command' in the synopsis 2019-11-19 15:36:15 +01:00
Daniel Eklöf
1980345618
osc: copy to/from clipboard: alias 's' to 'p'
'p' means 'primary', while 's' means 'selection'. Thus, a client can
now request 'selection' clipboard data and will receive it from the
primary selection.
2019-11-19 14:05:31 +01:00
Daniel Eklöf
e8c0bf6350
doc: foot.1: fix highlighting of reference to footclient 2019-11-19 14:02:17 +01:00
Daniel Eklöf
20765a04d6
README: add 'server mode' to the index 2019-11-19 00:18:02 +01:00
Daniel Eklöf
73e2d2acde
README: write a section about the server mode 2019-11-19 00:17:13 +01:00
Daniel Eklöf
0ad975374a
README: mention 'server mode' in the feature list 2019-11-19 00:01:55 +01:00
Daniel Eklöf
248935cce6
tllist: switch to codeberg repo + bump 2019-11-18 22:28:31 +01:00
Daniel Eklöf
28131e9dc9
ci: run unit tests 2019-11-18 17:03:30 +01:00
Daniel Eklöf
4cc9b15f55
ci: verbose ninja output 2019-11-18 17:03:19 +01:00
Daniel Eklöf
310ead65ec
meson: add 'version' dependency to footclient
footclient (`client.c`, to be precise) includes `version.h`, which is
a generated file.
2019-11-18 17:01:34 +01:00
Daniel Eklöf
df9a77663c
tllist: bump 2019-11-18 16:55:07 +01:00
Daniel Eklöf
443e568ddd
terminfo: add tab stop related entries, hts and tbc
hts - Horizontal Tab Set (?)
tbc - Tab Clear
2019-11-18 13:03:35 +01:00
Daniel Eklöf
d41c4b9195
csi: implement "Send Device Attributes (Tertiary DA)" 2019-11-18 12:46:52 +01:00
Daniel Eklöf
612bf9ef4f
csi: adjust reply to primary DA
Report us as being VT220, as VT420 causes vttest to send a
DECRQSS. This is a DCS request that we don't implement (there's no DCS
handling *at all* - all DCS strings are ignored).

Should be ok as no one appears to care about this one. Other terminals
report a much lower level (urxvt for example, replies with vt100. We
used to reply with vt102, which also was fine).
2019-11-18 12:41:10 +01:00
Daniel Eklöf
2c99f692b3
csi: improve "Send Device Attributes (Primary DA)"
Pretend we're a VT420, with a couple of supported features
indicated. Note that I haven't verified we support *everything* that
each features entails - or even what exactly a feature *is* (locator
port?)
2019-11-18 12:07:17 +01:00
Daniel Eklöf
aa692d19e4
csi: document "Send Device Attributes (Secondary DA)" 2019-11-18 12:06:29 +01:00
Daniel Eklöf
0250a703e4
csi: implement 'Query Device Status'
By replying with "Device OK"
2019-11-18 11:44:03 +01:00
Daniel Eklöf
7ff5a8027a
term: report_mouse_click(): legacy mode only supports rows/cols up to 223.
In the legacy mouse reporting mode, line and column numbers are
limited to 223 (255-32). In case the current coordinate falls outside
this, simply ignore it (don't report it).
2019-11-18 11:31:21 +01:00
Daniel Eklöf
2d0c4928ee
csi: add debug logs for the various mouse reporting modes 2019-11-18 11:31:05 +01:00
Daniel Eklöf
832cc8c269
term: assert(false) on MOUSE_X10
This mouse mode is never enabled. I.e. we don't support it. Add
asserts to catch usage of it, should we ever decide to implement it.
2019-11-18 11:18:48 +01:00
Daniel Eklöf
29cccadd1d
tllist: is now an external "library", so use <> includes 2019-11-17 19:19:55 +01:00
Daniel Eklöf
dd7058d368
tllist: use tllist from external git repository 2019-11-17 19:10:35 +01:00
Daniel Eklöf
9902a5732f
term: try to improve on a performance regression
When support was added for DECOM (absolute/relative row addressing), a
small but noticeable (~3.5%) performance regression was introduced.

Try to improve the situation by simplifying the relative-to-absolute
conversion; only the row needs to be transformed.
2019-11-17 18:52:27 +01:00
Daniel Eklöf
cf75528e86
Revert "term: new function: term_autowrap()"
This reverts commit 686405b703.
2019-11-17 17:22:34 +01:00
Daniel Eklöf
04cbee7593
Revert "vt: replace pre_print() with term_autowrap()"
This reverts commit fd8a399274.
2019-11-17 17:22:16 +01:00
Daniel Eklöf
7f4b2c5755
csi: implement 'CHT' - Cursor Horizontal Tab 2019-11-17 12:29:52 +01:00
Daniel Eklöf
fd8a399274
vt: replace pre_print() with term_autowrap() 2019-11-17 12:14:45 +01:00
Daniel Eklöf
686405b703
term: new function: term_autowrap()
Adds a linebreak (+ scroll if necessary) if we're in a deferred wrap
and auto-margins are enabled.

Return true when we wrapped, false otherwise.
2019-11-17 12:13:36 +01:00
Daniel Eklöf
f4be84871f
csi: implement 'CPL' - Cursor Previous Line 2019-11-17 11:36:24 +01:00
Daniel Eklöf
d8708d1105
csi: implement 'CNL' - Cursor Next Line 2019-11-17 11:35:30 +01:00
Daniel Eklöf
53f4273b17
csi: implement 'HPR' - Horizontal Position Relative 2019-11-17 11:31:35 +01:00
Daniel Eklöf
616e506f2e
csi: fix bad implementation of CBT (back tab)
* It takes a parameter, that indicates the number of tab stops to move
  through
* Use the tab stops defined in the tab stops list, not hard coded mod
  8 columns.
2019-11-17 11:20:59 +01:00
Daniel Eklöf
ca58c4c621
csi: implement 'HPA' - Horizontal Position Absolute 2019-11-17 11:09:16 +01:00
Daniel Eklöf
045f55a8c6
vt: bug (tab regression): don't get stuck on the same tab stop
There were actually two bugs here:

* When checking for a tab stop, make sure the new tab stop is at a
  different column. Otherwise you can't tab away from a tab stop.

* When there aren't any tab stops configured, or when we're already
  beyond the last tab stop, then tab to the last column (at least I
  think that's what we're supposed to do).
2019-11-17 10:15:56 +01:00
Daniel Eklöf
c9ebd527cf
term: save/restore charsets on save/restore cursor+attributes 2019-11-17 10:02:46 +01:00
Daniel Eklöf
3f3feedde2
term: convert anonymous 'charsets' struct to a named struct 2019-11-17 10:00:30 +01:00
Daniel Eklöf
ce544776ab
term: move charset variables into an anonymous struct 2019-11-17 09:59:12 +01:00