summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-05terminal/screen: add support for alternate screen buffersTom Gundersen
Hook up SM/RM 47/1047-1049 and enable alternate screen buffers for term applications. (David: rebased on top of -git, renamed helpers and added docs)
2014-10-05terminal/screen: save state in separate objectDavid Herrmann
Terminal state can be saved/restored by applications. To simplify our internal handling, put all affected state into a separate object. Especially with alternate screen buffers, this will simplify our code significantly.
2014-10-05terminal/subterm: skip setting parent's cursorDavid Herrmann
We draw our own cursor in subterm now, so there's no reason to update the cursor-position of the parent terminal on each frame. The parent's cursor is hidden, anyway.
2014-10-05terminal: fix TERM_FLAG_* commentDavid Herrmann
7BIT mode is enabled by default. Fix the comment to state this correctly.
2014-10-05terminal: fix restoring of screen flagsTom Gundersen
2014-10-04test: only use assert_seThomas Hindoe Paaboel Andersen
The asserts used in the tests should never be allowed to be optimized away
2014-10-04consoled: add a unit fileTom Gundersen
The unit file is statically enabled, but still requires --enable-terminal to actually get installed.
2014-10-04consoled: move from /bin to /lib/systemdTom Gundersen
This should not normally be run manually, but rather through systemd.
2014-10-04systemd-bus-proxyd: distribute the .in file also for the user versionTom Gundersen
2014-10-03build-sys: fix make distcheckZbigniew Jędrzejewski-Szmek
2014-10-03man: say that SecureBits= are space separatedZbigniew Jędrzejewski-Szmek
2014-10-03sd-id128: do stricter checking of random boot idZbigniew Jędrzejewski-Szmek
If we are bothering to check whether the kernel is not feeding us bad data, we might as well do it properly. CID #1237692.
2014-10-03fstab-generator: Small cleanupTobias Hunger
2014-10-03sd-bus: split out cleanup into separate functionZbigniew Jędrzejewski-Szmek
m is always non-null at this point. This function is too long anyway.
2014-10-03core/namespace: remove invalid checkZbigniew Jędrzejewski-Szmek
dir cannot be NULL here, because it was allocated with alloca. CID #1237768.
2014-10-03core/namespace: remove invalid checkZbigniew Jędrzejewski-Szmek
root cannot be NULL here, because it was allocated with alloca. CID #1237769.
2014-10-03sd-event: check the value of received signalZbigniew Jędrzejewski-Szmek
Appease coverity report #1237775. Also rename ss to n, to make it visually different from ss.
2014-10-03man: use more markup in daemon(7)Zbigniew Jędrzejewski-Szmek
2014-10-03console: add user console daemonDavid Herrmann
This adds a first draft of systemd-consoled. This is still missing a lot of features and does some rather primitive rendering. However, it shows the direction this code is going and serves as basis for further testing. The systemd-consoled binary should be run as `systemd --user' unit. It automatically picks up any session marked as Desktop=SYSTEMD-CONSOLE. Therefore, you can use any login-manager you want (ranging from /bin/login to gdm) to create sessions for systemd-consoled. However, the sessions managers must be prepared to set the Desktop= variable properly. The user-session is called `systemd-console', only the daemon providing the terminal environment is called `systemd-consoled' (mind the 'd'). So far, only a single terminal session is provided on each opened user-session. However, we support multiple user-sessions (even across multiple seats) just fine. In the future, the workspace logic will get extended so you can have multiple terminal sessions in a single user-session for easier access. Note that this is still experimental! Instructions on how to run it will follow shortly.
2014-10-03pty: optimize read loopDavid Herrmann
As it turns out, I can actually send data to the pty faster than the terminal can read. Therefore, make sure we read as much data as possible but bail out early enough to not cause starvation. Kernel TTY buffers are 4k, so reduce the overall buffer size, but read more than once if possible (up to 8 times sounds reasonable).
2014-10-03terminal/screen: adjust screen age only on updateDavid Herrmann
Instead of increasing the screen-age on redraw, we now increase it only on real updates. This is effectively the same, but avoids increased age counters on backbuffer rendering. Therefore, we can now check age counters against fronbuffers safely, while rendering frames in background.
2014-10-03terminal/screen: add color converterDavid Herrmann
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.
2014-10-03terminal/screen: add cursor renderingDavid Herrmann
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.
2014-10-03terminal/screen: mark cursor dirty on enabled/disableDavid Herrmann
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.
2014-10-03terminal/idev: add helper to match keyboard shortcutsDavid Herrmann
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.
2014-10-03terminal/screen: add keyboard mappingDavid Herrmann
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!
2014-10-03terminal/idev: don't map XKB_KEY_NoSymbol as ASCII 0David Herrmann
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.
2014-10-03terminal/unifont: add built-in fallback glyphDavid Herrmann
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.
2014-10-03terminal/subterm: use screen rendererDavid Herrmann
Don't hard-code the screen renderer but use the newly introduced term_screen_draw() helper.
2014-10-03terminal: add screen rendererDavid Herrmann
We don't want to expose the term_screen internals for rendering. Therefore, provide an iterator that allows external renderers to draw terminals.
2014-10-03terminal/drm: clear 'applied' flag when changing stateDavid Herrmann
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.
2014-10-03terminal/grdev: allow arbitrary fb-age contextsDavid Herrmann
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.
2014-10-03terminal/grdev: provide front and back buffer to renderersDavid Herrmann
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.
2014-10-03terminal/drm: provide pipe->target() callbackDavid Herrmann
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.
2014-10-03terminal/grdev: simplify DRM event parsingDavid Herrmann
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.
2014-10-03terminal: make utf8 decoder return lengthDavid Herrmann
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.
2014-10-03terminal: fix back-buffer selection on DRM page-flipDavid Herrmann
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.
2014-10-03fileio-label: return error when writing failsZbigniew Jędrzejewski-Szmek
The status of actually writing the file was totally ignored.
2014-10-03journalctl: make --utc work everywhereJan Synacek
The --utc option was introduced by commit 9fd290443f5f99fca0dcd4216b1de70f7d3b8db1. Howerver, the implementation was incomplete.
2014-10-03bootchart: use 'n/a' if PRETTY_NAME is not foundThomas Hindoe Paaboel Andersen
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.
2014-10-03man: fix sd_event_set_name compilationTom Gundersen
2014-10-03glib-event-glue: remove some unnecessary linesTom Gundersen
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.
2014-10-03test-barrier: add checks after the barrier constructorThomas Hindoe Paaboel Andersen
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.
2014-10-02man: add sd_event_set_name(3)Zbigniew Jędrzejewski-Szmek
2014-10-02man: add sd_event_get_fd(3)Zbigniew Jędrzejewski-Szmek
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.
2014-10-02firstboot: silence coverityThomas Hindoe Paaboel Andersen
CID#1237537
2014-10-02Revert "mount: order options before other arguments to mount"Lennart Poettering
This reverts commit 141a1ceaa62578f1ed14f04cae2113dd0f49fd7f. People should fix their libc's getopt(), instead of us using a weird option ordering...
2014-10-02systemctl: remove spurious newlineLennart Poettering
2014-10-02kdbus: don't clobber return values, use strjoin() instead of asprintf(), ↵Lennart Poettering
keep function invocations and variable declarations separate
2014-10-02kdbus: make sure we never invoke free() on an uninitialized pointer on OOMLennart Poettering