This partly reverts commit 41e76d11dff6dd9bc08bf829751f9634f32cdd38. I
removed the "superfluous" errno-handling, which in fact is needed. Turns
out pathconf() might leave errno unchanged.
Reported-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
It can return -1 (feature not supported, denied by a security module, etc.),
resulting in wrong allocation later on.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
(remove superfluous errno-checks)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
text_bbulk.c and text_gltex.c contain text.h which depend on
libtsm. Without adding tsm flags to compile option, bbulk and
gltex can't be compiled.
Signed-off-by: Xiong Zhang <panda0626@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
We required GL headers for shl_gl.h. Even though the linker strips all the
GL dependencies if it's disabled during compilation, we still require it
as build-time dependency. Avoid that by not including shl_gl in any non-GL
builds.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Lets be safe here and activate the context before performing the
buffer-swap. Drivers might be inconsistent and require this in case the
background process changed the DRM state.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
We need to call drmModeSetCrtc during wakeup to prepare for page-flips. An
immediate modeset is needed, otherwise we cannot be sure the FB/Crtc
configuration is still the same.
Force an immediate DRM modeset on wakeup to reset the screen.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Be more verbose during wake-up and set VIDEO_HOTPLUG so we force the
hotplug-check. I don't know why it worked until now, but we definitely
need to force it as we have no idea what display-status changed.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Instead of letting xkbcommon write to stderr, we now forward these
messages via the llog handler.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
If the format string contains a trailing newline, we now skip writing our
own. We also skip the fn+file information as it would be written on the
next line.
Trailing newlines occur only when forwarding messages from other
libraries. In this case we don't need the fn+file information, anyway.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
We should use library-logging in uterm to avoid cluttering stderr for
applications. Hence, use llog instead of log directly.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
\r is rarely used and probably always escaped in strings so we can safely
erase it together with \n to reduce its size.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This adds a small US-keymap to the uterm library which is loaded if we
cannot find a suitable system default keymap. This allows using the keymap
if no XKB keymaps are installed.
Thanks to Ran Benita for the minimal US keymap.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Check for objcopy in configure.ac and then mark binary data as read-only
by renaming .data to .rodata and setting the correct flags.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This allows changing the path to XSLTPROC via the command-line option if
it cannot be found by autoconf.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Instead of generating C source files, we now use our binary-linker make
target which can link in any arbitrary binary file.
This way, we can delete genshader and instead link the files directly.
This speeds up compilation and makes the code more consistent.
We also strip the shaders from useless comments and whitespaces to reduce
memory consumption.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Shader sources may not be 0 terminated if we mmap() them. Hence, we need
to pass the length to the shader compiler. As glShaderSource() allows this
<0 as zero-terminated strings, we can simply add a parameter for the
shader length.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
No need to keep these static helpers outside of SHL. Instead, include them
in SHL to avoid any external linking.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
We're ready for a new bugfix release. Bump version to 8. No libraries are
installed, anymore, so no need to bump library versions.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
We removed all additional libraries/applications so we can now always
enable building kmscon. This also means we can remove a bunch of old now
unused options and flags.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
We shouldn't export libraries which we don't really allow linkink
externally. Link libuterm statically and avoid installing it into /lib.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
The freetype2 font backend lacks support for proper combining marks and I
do not intend to ever implement that. Use pango!
If you don't want heavy dependencies, you can use the unifont or 8x16
backends.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
TSM was extracted from kmscon sources so it can more easily be used by
other emulators. It is available at:
http://cgit.freedesktop.org/~dvdhrm/libtsm
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
cdev sessions are outdated. Use libuvt instead. Remove all references to
cdev-sessions and clean up the build chain.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Remove uvtd. The idea is outdated and not really needed. With recent
systemd-logind changes, all we need is a shim between legacy-programs
(like XServer) and logind. We can easily do that via libuvt without
requiring a huge daemon like uvtd.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Remove all wlterm sources. I never intended to maintain it longer than any
major terminal-emulator needs to get ported over to wayland. Hence, remove
it. It was buggy, anyway.
If anyone is interested, a GTK+ based wlterm is available on:
http://cgit.freedesktop.org/~dvdhrm/wlterm
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
If we get a display-refresh event, redraw the screen. Otherwise, we might
stay blank during VT switches if we get a delayed set-master.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
If we get a display-refresh event from the session layer, we must redraw
the screen to avoid staying blank.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
On UTERM_REFRESH events we now forward the event to all sessions on the
bound seat. Sessions can then react to it and repaint the screen.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>