Age | Commit message (Collapse) | Author |
|
Terminals use pseudo color-codes mixed with 8bit and 24bit colors. Provide
a color-converter so external renderers only have to deal with ARGB32
colors.
This requires a color-palette as input as there's no fixed mapping. We
provide a default, but maybe we wanna support external palettes in the
future.
|
|
This is the most simple way to render cursors: flip attr->inverse of the
cursor cell. This causes the background and foreground colors of the
cursor-cell to be inversed.
Now that we render cursors ourselves, make subterm not call into the
parent terminal to render cursors.
|
|
If we hide or show the cursor, we change visual attributes and have to
mark the underlying cell as dirty. Otherwise, the terminal will not be
redrawn.
|
|
Matching keyboard shortcuts on internationalized keyboards is actually
non-trivial. Matching the actual key is easy, but the modifiers can be
used by both, the matching and the translation step. Therefore, XKB
exports "consumed-modifiers" that we use to figure out whether a modifier
was already used by the translation step.
The new IDEV_KBDMATCH() helper can be used to match on any keyboard
shortcut and it will do the right thing.
|
|
Implement the feed_keyboard() handling by mapping XKB keys according to
DEC-VT behavior.
Public information on terminal key-mappings is pretty scarce. We only
implement the most basic mapping for now. Further improvements welcome!
|
|
XKB_KEY_NoSymbol is defined as 0 but does not correspond to a VT key with
ASCII value 0. No such key exists, so don't try to find such a key.
|
|
In case we cannot render a glyph, we want a fallback we can display
instead. If we rely on the font itself to provide the fallback character,
we have nothing to display if that character is not available. Therefore,
add a static fallback that we can use at any time.
|
|
Don't hard-code the screen renderer but use the newly introduced
term_screen_draw() helper.
|
|
We don't want to expose the term_screen internals for rendering.
Therefore, provide an iterator that allows external renderers to draw
terminals.
|
|
If a pipe is enabled/disabled, we have to clear crtc->applied of the
linked CRTC. Otherwise, we will not run a deep modeset, but leave the crtc
in the pre-configured state.
|
|
Instead of limiting fb-aging to 64bit integers, allow any arbitrary
context together with a release function to free it once the FB is
destroyed.
|
|
We really want more sophisticated aging than just 64bit integers. So
always provide front *and* back buffers to renderers so they can compare
arbitrary aging information and decide whether to re-render.
|
|
Instead of looking for available back-buffers on each operation, set it to
NULL and wait for the next frame request. It will call back into the pipe
to request the back-buffer via ->target(), where we can do the same and
look for an available backbuffer.
This simplifies the code and avoids double lookups if we run short of
buffers.
|
|
Coverity complained about this code and is partially right. We are not
really protected against integer overflows. Sure, unlikely, but lets just
avoid any overflows and properly protect our parser loop.
|
|
Lets return the parsed length in term_utf8_decode() instead of a buffer
pointer. Store the pointer in the passed argument.
This makes it adhere to the systemd coding-style, were we always avoid
returning pointers, but store them in output arguments. In this case, the
storage is not allocated, so it doesn't fit 100% to this idiom, but still
looks much nicer.
|
|
We currently select front-buffers as new back-buffer if they happen to be
the last buffer in our framebuffer-array. Fix this by never selecting a
new front buffer as back buffer.
|
|
The status of actually writing the file was totally ignored.
|
|
The --utc option was introduced by commit
9fd290443f5f99fca0dcd4216b1de70f7d3b8db1.
Howerver, the implementation was incomplete.
|
|
Spotted with coverity. If parsing both /etc/os-release and
/usr/lib/os-release fails then null would be passed on. The calls
to parse the two files are allowed to fail. A empty /etc may not
have had the /etc/os-release symlink restored yet and we just
try again in the loop. If for whatever reason that does not happen
then we now pass on 'n/a' instead of null.
|
|
|
|
Not needed in an example. Should still shorten the license, but should make sure it is still complete so people can copy-paste without problems.
|
|
Coverity seems to think that we can later end up with the "them"
fd having a negative value. Even after a succesful barrier_create.
Add some test to verify that the constructor went well. If coverity
still complains then it must mean that it thinks the the value is
overwritten later.
|
|
|
|
Example from Tom Gundersen is included using xi:include.
The copyright notice stands out a bit. Maybe it should be removed,
and the code placed in public domain.
|
|
CID#1237537
|
|
This reverts commit 141a1ceaa62578f1ed14f04cae2113dd0f49fd7f.
People should fix their libc's getopt(), instead of us using a weird
option ordering...
|
|
|
|
keep function invocations and variable declarations separate
|
|
|
|
|
|
|
|
This would make it simple to verify that the data is on the right format when
the type is known.
|
|
|
|
The caller may have an existing DUID that it wants to use, and may
want to use some other DUID generation scheme than systemd's
default DUID-EN.
[tomegun: whitespace - we never use tabs]
|
|
struct kdbus_cmd_match got a flags field, which systemd currently makes no
use of.
|
|
|
|
Fixup for 718880ba0d 'add a transient user unit directory'.
|
|
This makes this function name similar to user_config_home() and makes
it match the name of the environment variable.
|
|
This patch adds a transient user unit directory under
`$XDG_RUNTIME_DIR/systemd/user/` and stores transient user-instance
units (such as those created by `systemd-run --user`) under there
instead of putting them in $XDG_CONFIG_HOME/systemd/user/.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67331
|
|
Introduce option to display time in UTC.
|
|
They really should got to stderr, not stdout.
|
|
That way the we make our code safe regarding reordering of the variables
in the enum.
|
|
struct kdbus_cmd_conn_info takes a list of items now instead of a string.
Fix the only user in SD of that ioctl.
|
|
|
|
We cannot rely on "errno" to be non-zero on failure, if we perform
multiple glibc calls. That is, if the first eventfd() call fails, but the
second succeeds, we cleanup the barrier but return 0.
Fix this by always testing the return value immediately. This should also
fix all the coverity warnings.
|
|
Allow term users to retrieve the page dimensions of a terminal screen.
This is needed to properly calculate the grid dimensions when rendering.
|
|
Like all the other parts of libsystemd-terminal, split API of
term-internal.h into term.h so we can use it from systemd-consoled.
|
|
Lets avoid putting stuff into /usr/shared/unifont/, but keep it in
/usr/share/systemd/. Upstream lacks interest in this, so don't bother for
now.
|
|
Allow unifont users to retrieve the width and height of unifont glyphs. In
version 1 this is hard-coded as 8/16, but may be changed in the future.
|
|
All the definitions are for outside users, so drop the -internal suffix.
Internal definitions are in unifont-def.h and unifont.c, no need to share
those.
|