Commit graph

741 commits

Author SHA1 Message Date
Daniel Eklöf
ce5f5e4d51
slave: rename slave_spawn() -> slave_exec() 2019-10-30 17:30:58 +01:00
Daniel Eklöf
4ec9db8e18
term: no need to stack-allocate an array of worker contexts 2019-10-28 19:23:41 +01:00
Daniel Eklöf
8e6f87eb17
render worker context: allocate, and let worker threads free
Since we now initialize the worker threads from term_init(), which
returns before the threads terminate, we can no longer use
stack-allocated worker contexts.

We _could_ put them in the terminal struct. But a simpler solution is
to allocate them in term_init(), and let the threads free them when
they don't need them anymore.
2019-10-28 18:51:04 +01:00
Daniel Eklöf
720d0df067
term: open FDs before allocating terminal struct 2019-10-28 18:46:03 +01:00
Daniel Eklöf
fe974956b0
term: integrate directly with FDM 2019-10-28 18:35:16 +01:00
Daniel Eklöf
0979a0e2e5
terminal: implement term_init() and term_destroy() 2019-10-28 18:25:19 +01:00
Daniel Eklöf
957fb25559
wayland: move reload_cursor_theme() and update_cursor_surface() to wayland 2019-10-27 19:36:45 +01:00
Daniel Eklöf
664641104c
main: remove a couple of includes 2019-10-27 19:28:23 +01:00
Daniel Eklöf
3684547fd7
main: kbd repeat FD is handled by the wayland backend 2019-10-27 19:23:22 +01:00
Daniel Eklöf
4a63defeb1
wayland: backend now configures FD as non-blocking, not main 2019-10-27 19:21:36 +01:00
Daniel Eklöf
2eaa258e11
main: cleanup 2019-10-27 19:21:27 +01:00
Daniel Eklöf
9a31c1ed96
wayland: free wayland/wl_window instances 2019-10-27 19:16:42 +01:00
Daniel Eklöf
6314de554d
wayl_destroy: early return on NULL 2019-10-27 19:16:25 +01:00
Daniel Eklöf
251cf98388
wayland: move keyboard repeat handling into wayland 2019-10-27 19:16:12 +01:00
Daniel Eklöf
1e75b89552
wayland: integrate directly with the FDM 2019-10-27 19:11:35 +01:00
Daniel Eklöf
61cc8c3c55
wayland: implement wayl_init()
Wayland instantiation is now done by the wayland backend, not in main.
2019-10-27 19:08:48 +01:00
Daniel Eklöf
1adab32906
term: wayland struct is now not a part of the terminal struct
We do however need access to it, so provide a pointer. The difference
is that now we can have a *single* wayland instance, but multiple
terminal instances.
2019-10-27 18:51:14 +01:00
Daniel Eklöf
33e4b8a5b8
wayland: pull in sys/time.h, for 'struct timeval' 2019-10-27 18:46:36 +01:00
Daniel Eklöf
8c534d0520
input: input_repeat() takes a 'struct wayland' pointer 2019-10-27 18:44:58 +01:00
Daniel Eklöf
9f0b1f94c2
wayland: change all wayland callbacks to take a wayland pointer
Instead of passing the terminal to the wayland callbacks, pass a
'struct wayland' pointer.
2019-10-27 18:43:07 +01:00
Daniel Eklöf
eda04d0560
wayland: add back-pointer to terminal
This can, in the future, be extended to e.g. a list, to support
multiple windows.
2019-10-27 17:13:29 +01:00
Daniel Eklöf
c9455d5f21
kbd: move into wayland 2019-10-27 17:10:32 +01:00
Daniel Eklöf
061bbd7049
kbd: break out XKB kbd struct to a separate file 2019-10-27 16:21:19 +01:00
Daniel Eklöf
5ca1ee701b
wayland: move clipboard/primary structs into the wayland struct
These are application global and very wayland specific
2019-10-27 16:15:32 +01:00
Daniel Eklöf
9e6c28f5b6
wayland: implement wayl_win_destroy() 2019-10-27 16:01:44 +01:00
Daniel Eklöf
942ff566a2
wayland: implement wayl_destroy() 2019-10-27 15:57:23 +01:00
Daniel Eklöf
0120c57ed5
wayland: move wayland struct definitions to a separate file 2019-10-27 13:06:39 +01:00
Daniel Eklöf
a2b3cc6cfe
term: convert anonymous 'window' struct to named 'wl_window' struct 2019-10-27 13:04:26 +01:00
Daniel Eklöf
f63458ef33
term: move per-window wayland objects from wayland struct to terminal struct
Short term, we want to break out the wayland backend from the terminal
struct. Long term, we might want to support multiple windows.

One step towards both the above is separating global wayland objects
from per-window objects.
2019-10-27 12:57:37 +01:00
Daniel Eklöf
5fefb950b3
fdm: use the FDM's poll loop 2019-10-27 11:46:18 +01:00
Daniel Eklöf
293adbb295
PKGBUILD: fix breakage after pacman 5.2 upgrade 2019-10-24 21:21:44 +02:00
Daniel Eklöf
6643fe5456
completions: add zsh completions 2019-10-20 11:54:58 +02:00
Daniel Eklöf
286db002f8
meson: fix version generation from git
run_command() was only run at configure time, meaning the generated
version (that was passed on to the sources via -DFUZZEL_VERSION)
became stale.

Fix by implementing a shell script that generates a header file, and
wrap this in a custom target that is run every time (but the generated
file is only updated when the version changes)
2019-10-19 22:09:52 +02:00
Daniel Eklöf
6fd4f6000b
font: glyph_for_wchar(): ensure glyph->valid == false, in *all* error cases 2019-10-18 19:50:48 +02:00
Daniel Eklöf
3c42691e1b
font: load fallback fonts on demand
When instantiating a primary font, build the fallback font list, but
don't actually instantiate the fallback fonts.

Instead, remember the (full) pattern that we should use if/when we
instantiate it.

Then, when looking up a glyph and we need a fallback font, loop the
list and instantiate the font(s) there and then.
2019-10-17 17:53:03 +02:00
Daniel Eklöf
e218e19ea3
font: load all fallbacks when instantiating a primary font
The caching of fallback fonts didn't work. It "worked" because we
didn't free the fonts... When we started doing that, the fallback
fonts were no longer cached.

Another solution would have been to keep the cached fallback fonts
around until exit, and free them there. But that didn't seem very
clean.

So, for now, load *all* fallbacks when instantiating a
primary (non-fallback) font.

Note that this slows down initial startup time.
2019-10-17 17:43:40 +02:00
Daniel Eklöf
5a80bcff18
font: rename cache -> glyph_cache 2019-10-17 17:12:04 +02:00
Daniel Eklöf
1875f98945
font: fc_idx may not be the requested one 2019-10-17 17:07:37 +02:00
Daniel Eklöf
af85c10127
font: rename fc_loaded_fonts -> fc_loaded_fallbacks 2019-10-17 17:07:22 +02:00
Daniel Eklöf
6f52b86105
Merge branch 'font-cache' 2019-10-16 22:35:44 +02:00
Daniel Eklöf
04edd96018
font: cache top-level fonts
This greatly improves the performance when loading user-configured
fallback fonts.

Previously, we had to re-load these fallback fonts over and over again
for each (new) glyph.
2019-10-16 22:34:23 +02:00
Daniel Eklöf
bf5ad13df0
font: from_name() returns an allocated font struct 2019-10-16 22:22:26 +02:00
Daniel Eklöf
928e86b423
font: cache loaded fontconfig fallback fonts 2019-10-16 22:18:57 +02:00
Daniel Eklöf
a789230cf9
font: font_from_name() returns an allocated font struct 2019-10-16 21:52:12 +02:00
Daniel Eklöf
3ca6f9fe0b
selection: replace \r\n with \n in pasted text 2019-10-16 21:14:45 +02:00
Daniel Eklöf
bb0ce50b24
README: link to PKGBUILD 2019-10-05 16:41:20 +02:00
Daniel Eklöf
6280d58434
desktop: clean up, remove unsupported entries
* We don't support startup notifications
* We don't support a non-standard "new" action
2019-09-29 20:50:27 +02:00
Daniel Eklöf
33250bb781
PKGBUILD: version has been bumped to 0.9.0 2019-09-29 15:05:14 +02:00
Daniel Eklöf
4594899114
csi: ignore invalid scrolling regions
There must be at least one scrolling row. I.e. the bottom margin must
be larger than the top margin.

Note that trying to set an invalid region really will
be *ignored*. I.e. we *don't* reset the scrolling region.

This conforms to xterm's behavior.
2019-09-29 14:58:02 +02:00
Daniel Eklöf
5a0bb292ee
font: calculate underline/strikeout metrics in font, not main 2019-09-29 13:03:48 +02:00