David Herrmann [Sun, 13 Jan 2013 14:58:40 +0000 (15:58 +0100)]
pty: reset signal-handlers for childs
If signal-handlers are set to SIG_IGN, then this behavior is preserved
across an execve(). We don't want that so reset the handlers for all
childs before executing them.
kmscon may be executed with pre-set signal handlers for good reasons. So
reset the handlers in setup_child() so we have a clean environment.
This fixes a bug where child-programs assume SIGPIPE is not ignored but do
not explicitly set it to SIG_DFL.
Reported-by: Swift Geek [github issue #62]
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 14:26:56 +0000 (15:26 +0100)]
uterm: drm: share mode-setting between dumb+drm
The modesetting code of both DRM backends is almost the same so share it.
This also works around several race-conditions in some DRM drivers. In
particular, we cannot call drmModeSetCrtc while a drmModePageFlip is still
pending. Therefore, we wait for page-flips to complete before performing
an immediate mode-set.
This requires us to handle page-flip events synchronously so we can wait
for kernel page-flip events but the user-space bottom-half is executed in
an idle-handler.
Note that the chance that we have to wait for a page-flip to complete is
pretty small. In fact, without hacking the code to do fast page-flips, I
couldn't get kmscon to run into this condition.
Last but not least, this patch also makes the dumb-backend support
immediate page-flips like the DRM backend did all the time.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 10:54:29 +0000 (11:54 +0100)]
eloop: add EV_ONESHOT and EV_SINGLE flags for idle sources
EV_ONESHOT will remove idle sources once they have been processed and
EV_SINGLE will only register the source if it hasn't been registered, yet.
For source removal EV_ONESHOT has no effect but EV_SINGLE causes all
events with this cb+data combination to be removed.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 10:42:04 +0000 (11:42 +0100)]
shl: hook: add 'oneshot' flag
If an entry is marked as 'oneshot' then it will get deleted after it has
been called once. Note that the entry is unlinked _before_ the callback is
called.
If you use 'oneshot'-entries and normal entries with the same cb+data
combination, then you will probably get unexpected behavior. It is not
recommended to do that. In detail, you cannot control which entry is
deleted via a shl_hook_rm() call so you can never be sure whether the
oneshot entry or a normal entry is deleted.
Do not mix oneshot entries with normal entries!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 10:23:05 +0000 (11:23 +0100)]
shl: hook: add helpers to add callbacks only once
Very often we want to avoid adding callbacks multiple times. Currently we
have to keep track of this in each module with a boolean value.
To simplify this procedure, we add helpers that guarantee that entries are
only added once and a helper to remove all entries with a given cb+data
combination.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 13:01:01 +0000 (14:01 +0100)]
uterm: drm: reread dpms state on wakeup
Other DRM users might change the DPMS state of a display while we are
asleep. Therefore, reread the state during wakeup and force DPMS to the
same value it had when we left. But do this only for displays that are
online, other displays are never touched by uterm-video.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 12:40:50 +0000 (13:40 +0100)]
uterm: remove uterm_video_use()
This function is a no-op and not used. Hence, remove it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 12:40:00 +0000 (13:40 +0100)]
tests: fix build with new uterm headers
These tests still use uterm.h which builds fine if you have an old uterm
version installed, however, with a new version this will fail horribly.
Hence, fix them to use the new headers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 12:31:17 +0000 (13:31 +0100)]
uterm: video: use shl_dlist for linked lists
uterm-video is actually older than shl_dlist and it used its own
single-linked lists until now. This had several drawbacks and produced
ugly code.
This commit converts all uterm-video elements to use shl_dlist and
introduces _bind and _unbind helpers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 07:21:40 +0000 (08:21 +0100)]
uterm: video: share set_dpms code
The set_dpms callback of dumb and drm backends is identical so share it in
drm-shared module.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 00:01:54 +0000 (01:01 +0100)]
uterm: share drm-video wakeup helpers
The dumb and drm backends still use the same code to perform wakeup/sleep
code. Hence, move it into the drm-shared file so we can use the same
helpers for both.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 23:53:01 +0000 (00:53 +0100)]
uterm: drm: fix y-invert bug
This fixes the last OpenGL user that still uses the wrong y-axis
direction. See the gltex helpers for more information.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 23:51:23 +0000 (00:51 +0100)]
uterm: share drm-video objects
This moves the gbm/drm shared properties into the drm-shared helper.
Furthermore, it removes the last static property in uterm_video objects so
everything is correctly accessed via ->data pointers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 18:18:15 +0000 (19:18 +0100)]
uterm: drm: fix y-inversion bug
OpenGL uses an inverted y-axis by default. However, the old gbm-surface
layer didn't correctly map this. But with the conversion to gbm_surface
objects, we now have the correct OpenGL framebuffers so we have to invert
the y-axis.
This was already fixed for the gltex renderer earlier but we forgot to fix
the uterm-drm blitting backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 18:09:42 +0000 (19:09 +0100)]
uterm: share drm-display helpers
dumb and drm video backends share quite a lot of logic. Hence, move common
helpers into the drm-shared module and use it in both backends.
This also moves the uterm-display objects of both backends to use the data
member instead of static fields.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 16:45:48 +0000 (17:45 +0100)]
uterm: share drm dpms code
drm and dumb backends use the same DPMS code so share it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 16:28:29 +0000 (17:28 +0100)]
uterm: share drm_mode between dumb and drm backend
The dumb and drm backends use the same mode structure so share the code as
drm_shared module.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 16:27:22 +0000 (17:27 +0100)]
uterm: fbdev: set mode dimensions after activation
We do not set the dimensions correctly but always use 0/0. Fix this by
overwriting the values on mode creation.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:35:25 +0000 (16:35 +0100)]
uterm: video: remove .blend and .blendv backends
We never implemented real blending and never hooked it up with the public
API. Hence, we can safely remove this. All functionality that was
available via .blend is now available via .fake_blendv.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:24:37 +0000 (16:24 +0100)]
uterm: split fbdev module into different files
This is the first step towards a uterm-fbdev module. It splits the huge
video file into a video backend and a render backend. A monitor backend
will follow later when a full uterm module infrastructure is available.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:01:23 +0000 (16:01 +0100)]
uterm: fbdev: use video-data pointer
Instead of hardcoding fbdev data in the header, we now store all data in
the "data" pointer so we can be loaded during runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:00:32 +0000 (16:00 +0100)]
uterm: video: add data pointer
If we want to load backends during runtime, we must allow them to store
their data. Instead of hardcoding it, we now provide a "data" pointer so
they can store arbitrary data.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 14:59:33 +0000 (15:59 +0100)]
uterm: video: include xf86drm.h for drmAvailable()
We need this include so drmAvailable() is declared correctly.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 11:16:43 +0000 (12:16 +0100)]
uterm: video: modularize video backends
We want to allow dynamic backend loading during runtime so we need to
avoid static definitions. This converts the backend IDs into module
structures which are then linked into the binary.
To make this fully modular, we need to load the backends dynamicly via
dlsym() and move all the static declarations from uterm_video.h into the
backends. But for now at least the backends can be easily exchanged and
configured during compile-time.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 8 Jan 2013 16:54:53 +0000 (17:54 +0100)]
build: link with -ldl
We use dlopen() and friends so link with libdl.so to be sure that they are
available.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 18:36:42 +0000 (19:36 +0100)]
uterm: move uterm.h to uterm_monitor.h
uterm.h contains only uterm-monitor related APIs so rename it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 18:31:27 +0000 (19:31 +0100)]
uterm: move uterm-vt into uterm_vt.h
This splits off uterm-vt from the main header to reduce the dependencies
on uterm.h.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 18:22:38 +0000 (19:22 +0100)]
uterm: move input related API to uterm_input.h
This splits off the uterm-input API from uterm.h to avoid depending on
uterm.h everywhere.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 17:03:45 +0000 (18:03 +0100)]
uterm: move video API into uterm_video.h
Split the main header to avoid having it as dependency in so many places.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 13:07:14 +0000 (14:07 +0100)]
uterm: monitor: avoid libdrm dependency
Instead of depending on libdrm, we simply copy the VERSION-IOCTL ABI and
perform the ioctl ourself. This reduces complexity and dependencies.
Why does the DRM layer not provide normal uapi headers via
linux-api-headers? We should fix that.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:40:26 +0000 (13:40 +0100)]
uterm: remove unused pciaccess helpers
We now detect primary GPUs via udev so the pciaccess helpers are no longer
needed.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:37:17 +0000 (13:37 +0100)]
uterm: video: remove drm_get_id() helper
This helper is no longer used so remove it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:34:44 +0000 (13:34 +0100)]
uterm: monitor: read boot_vga via uterm
Instead of using the pciaccess helpers, we now read the boot_vga flag via
uterm. This makes the whole process a lot simpler and removes a lot of
duplicated code that is already provided by the kernel.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:24:50 +0000 (13:24 +0100)]
uterm: move uterm_systemd.h to uterm_systemd_internal.h
Same as uterm_input.h, we want internal headers to have the *_internal
suffix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:24:09 +0000 (13:24 +0100)]
uterm: move uterm_video.h to uterm_video_internal.h
Same as uterm_input.h, we want internal headers to have the *_internal
suffix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:18:06 +0000 (13:18 +0100)]
uterm: move uterm_input.h to uterm_input_internal.h
We will split the public uterm header soon to avoid big headers. Hence,
rename internal headers to *_internal.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 5 Jan 2013 23:50:12 +0000 (00:50 +0100)]
build: fix build without libfont.la
We still have dead dependencies on libfont.la but don't build it anymore.
Remove the dependency as it is directly linked now.
Reported-by: Vladimir Kravets
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 5 Jan 2013 23:49:38 +0000 (00:49 +0100)]
build: remove getty@.service from makefiles
We removed this service unit earlier this week but the EXTRA_DIST variable
still mentions it. Remove it so kmscon builds cleanly again.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:49:39 +0000 (17:49 +0100)]
text: remove old init/deinit helpers
We no longer need these helpers so remove them. We require each backend to
register itself as part of module-loading so no need to keep these
helpers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:48:23 +0000 (17:48 +0100)]
kmscon: make bblit mandatory
Similar to the font backends we now require one backend to be always
available as safe fallback. The bblit backend is the most basic backend so
make it mandatory and link it unconditionally.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:47:42 +0000 (17:47 +0100)]
build: remove libfont.la and link directly
We no longer share libfont.la so link it directly into kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:41:50 +0000 (17:41 +0100)]
kmscon: move gltex renderer into module
Provide the gltex renderer via a module to allow loading it during
runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:36:23 +0000 (17:36 +0100)]
kmscon: move bbulk renderer into module
Provide the bbulk renderer via mod-bbulk.so so it can be loaded during
runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:24:41 +0000 (17:24 +0100)]
text: add owner field to text-ops
When text-ops are registered via modules, we need an owner field so
they're correctly tracked. Hence, add this field to all text-ops and
correctly keep module references.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:15:54 +0000 (17:15 +0100)]
COPYING: update copyright to 2013
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:09:18 +0000 (17:09 +0100)]
build: disable freetype2 by default
The freetype2 backend is no longer recommended. You should always prefer
the pango backend. Pango provides a lot more advanced font options and
internationalization.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:04:55 +0000 (17:04 +0100)]
kmscon: add freetype2 module
The freetype2 module register the freetype2 font backend with kmscon core.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:04:33 +0000 (17:04 +0100)]
kmscon: add unifont module
The unifont module registers the unifont font backend with kmscon core.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:03:31 +0000 (17:03 +0100)]
text: remove old font definitions
All font definitions have been moved to font.h so remove the old
definitions and include font.h instead.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:55:56 +0000 (16:55 +0100)]
text: move font layer into top-level font_* namespace
The font layer does not longer depend on the text layer so move it into
its own namespace.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:30:40 +0000 (16:30 +0100)]
kmscon: add pango module
The pango module registers the pango font-backend with kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:23:52 +0000 (16:23 +0100)]
text: font: add owner field to font_ops
The owner fields specifies the module that provides the code for the given
backend. The font-core is responsible of ref/unref'ing the module so its
code is always available as long as the module exists.
We cannot push this into the modules as modules _must_ never call
kmscon_module_unref(KMSCON_THIS_MODULE)! Because this might drop the last
reference and hence the function might disallocate the module. However,
this means that it cannot return because the caller is _part_ of the
module and so no longer valid.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:21:18 +0000 (16:21 +0100)]
kmscon: add module support
Several parts of kmscon have huge external dependencies. However, we allow
them to be disabled during build-time. But this is not enough as it
requires distributions to choose which options to use. Therefore, we now
allow dynamicly loadable modules that can optionally be installed and
kmscon automatically picks them up.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 14:53:01 +0000 (15:53 +0100)]
build: disable wlterm by default
wlterm hasn't been updated for long and it will take some more time to get
it to work with recent Wayland protocol. Hence, disable it so it doesn't
matter if it breaks for now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 13:03:58 +0000 (14:03 +0100)]
text: font: add .finalize callback
Each font-backend now also gets a .finalize callback that is called when
the last font-user drops its font. This will allow modules to destroy
themself when the last reference is dropped.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 13:00:57 +0000 (14:00 +0100)]
shl: register: add destroy callback
The new destroy callback is called whenever an entries last reference is
dropped. This will allow modules to keep reference of its code users.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 17:14:48 +0000 (18:14 +0100)]
text: remove load/unload helpers for text-font backends
With modules we no longer need to conditionally load backends. Instead
each module will register the backend with the main application on load.
This will temporarily break pango, freetype2 and unifont backends as they
are not registered until we introduce full module support.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 17:00:14 +0000 (18:00 +0100)]
build: link each text-font backend separately
We want to modularize the text-font library, so we need each backend as a
different library. This step links each of them into a different static
library so we can now link them either into the binary or into modules.
This step also makes 8x16 always compiled into the text-font backend so we
always have a working implementation even though no modules might be
loaded.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 16:34:47 +0000 (17:34 +0100)]
docs: remove getty@.service
This is no longer used and was replaced by kmsconvt@.service some time
ago.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 16:34:07 +0000 (17:34 +0100)]
build: include kmsconvt@.service in EXTRA_DIST
We need the new kmsconvt@.service file instead of the old kmscon@.service.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 16:32:49 +0000 (17:32 +0100)]
build: fix man-page compilation
The man_fixup_aliases thingy was a horrible hack. Replace it with a
temporary .man_fixup file that saves compilation timestamps so we have
post-recipies for man-fixups.
Also fix some minor out-of-tree build problems.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 31 Dec 2012 15:40:51 +0000 (16:40 +0100)]
build: provide git-head revision via githead.h
We need the git-revision for module-version checks so provide the
infrastructure now and print it in log_init().
Note that the git-describe string is distributed with the tarballs so
end-users will not have to generate it themself. But when building from
git, the revision will be automatically updated whenever something
changes.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 31 Dec 2012 14:41:00 +0000 (15:41 +0100)]
build: fix libuterm dependency typo
We didn't set the dependencies correctly for uterm libraries as a
backslash was missing. Fix this typo.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 31 Dec 2012 14:40:06 +0000 (15:40 +0100)]
build: mark man_fixup_aliases as PHONY target
We need to mark it as PHONY target as it has no corresponding source file.
It's unlikely that it causes problems, but lets be safe.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 18:41:08 +0000 (19:41 +0100)]
shl: misc: add shl_ends_with() helper
This helper checks whether a string has the given suffix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 18:40:04 +0000 (19:40 +0100)]
shl: misc: add shl_dirent() helper
"struct dirent" has always been a mess. As its size may differ between
systems, we need to dynamically allocate it. This helper does that for us.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 15:21:27 +0000 (16:21 +0100)]
text: use new shl-registry objects
Instead of implementing our own thread-safe backend-storage, we now use
the generic shl-registry object.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 15:20:51 +0000 (16:20 +0100)]
text: font: use new shl-registry objects
Instead of implementing a thread-safe backend-system we can now use the
new shl-registry storage module.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 15:18:25 +0000 (16:18 +0100)]
shl: add new register helper
The shl-register module is used to create registries of named-objects. The
main purpose for it will be for module-systems were we have different
backends implementing an interface. The registry can then be used to find
a specific module (or the default module).
No sophisticated filter/search mechanism is used as this cannot be done
efficiently in a generic way.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 11:50:47 +0000 (12:50 +0100)]
COPYING: add missing contributor's names
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Hoàng Đức Hiếu [Sat, 29 Dec 2012 14:05:57 +0000 (21:05 +0700)]
docs: fix systemd-unit name typo
We forgot to rename the templates from kmscon to kmsconvt in the comments.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 21 Dec 2012 14:30:19 +0000 (15:30 +0100)]
text: gltex: fix y-inversion with new gbm-surfaces
The standard OpenGL surfaces are y-inverted (which we didn't implement
correctly previously when using our own gbm-surfaces). Therefore, we need
to flip the y-coordinates now as we use correct GL surfaces with the new
drm-uterm backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 21 Dec 2012 14:15:16 +0000 (15:15 +0100)]
uterm: video: drm: use gbm surfaces
Until now we always created our buffers via gbm_bo_create() and used
surfaceless EGL contexts so we can schedule buffer-flips manually.
However, recent gbm and EGL mesa releases include gbm-surfaces that allow
us to ignore all this an let EGL manage the buffers.
This introduces some problems as we are no longer under control of the
buffers so we cannot know which buffer is active. That means, applications
that use the uterm-drm devices must redraw the screen on each frame.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 21 Dec 2012 13:13:00 +0000 (14:13 +0100)]
docs: fix default font-size=12 documentation
We used font-size=15 in the past but changed it long ago. However, the
documentation still used 15 so fix this now.
Reported-by: James Buren <ryu0@ymail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 17 Dec 2012 12:25:52 +0000 (13:25 +0100)]
docs: add kmsconvt@.service systemd template
This new template can be used as replacement for getty@.service. It has
the same semantics and can be used as drop-in replacement. It even uses
getty@.service as fallback if kmscon fails.
See the comments in the files for more information.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:29:23 +0000 (21:29 +0100)]
terminal: use COLORTERM=kmscon as default
We now set COLORTERM to "kmscon" so applications can identify their
controlling terminal. Note that COLORTERM is not used for terminfo/termcap
detection (unlike TERM).
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:24:51 +0000 (21:24 +0100)]
kmscon: use /bin/login -p as default login program
We must pass "-p" to make "login" preserve the environment. We make sure
the environment is correctly reset before calling it so it is safe.
Furthermore, this allows us to pass additional environment variables to
the child without having /bin/login reset it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:24:15 +0000 (21:24 +0100)]
kmscon: add --reset-env option
This option controls whether we reset the environment before spawning the
PTY child.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:20:45 +0000 (21:20 +0100)]
pty: add env_reset property
This property controls whether the environment should be reset before
spawning the child process. Defaults to "no" and affects whether "-p" is
passed as default argument to /bin/login.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 19:12:21 +0000 (20:12 +0100)]
pty: add "colorterm" property
The colorterm property is used (if set) as COLORTERM environment variable.
Note that this variable (despite the name) is not used with
terminfo/termcap. Instead, it's solely used to identify the running
terminal.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 15:21:32 +0000 (16:21 +0100)]
build: check for udev >=172
We need udev_device_has_tag() which was introduced in version 172.
Document that in README file.
Reported-by: Manuel Rüger <mrueg@rueg.eu>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 15:09:28 +0000 (16:09 +0100)]
tsm: screen: add support for multi-cell characters
The wcwidth() POSIX helper returns the number of cells that a character
occupies. This is normally 1, however, if it is 0 we simply discard this
input (this should never happen as all characters that wcwidth() returns 0
for should already be handled by the VTE layer).
But if it is >1, we write the character in the first cell, set the width
correctly and mark all following characters as width=0.
Everything else is left unchanged, that means, the running application has
to be aware of wcwidth() and correctly send two backspaces to clear a
width=2 character and so on.
This behavior almost exactly matches the xterm behavior. There are some
corner cases like erasing only one part of a multi-cell character etc.
that might differ. However, these are non-standard cases that no
application should never rely on.
Anyway, if we spot any of these differences between xterm and kmscon, we
should fix kmscon to behave like xterm does.
Thanks to Shixin for looking this up in other emulators.
Reported-by: Shixin Zeng
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 15:00:08 +0000 (16:00 +0100)]
text: add render-support for multi-cell glyphs
Multi-cell glyphs are glyphs that span across multiple horizontal cells.
The font renderers already support this. This patch fixes the console
renderers to take advantage of this.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 14:40:48 +0000 (15:40 +0100)]
text: font: draw multi-cell characters correctly
Instead of clipping every character to a one-cell boundary, we now render
multi-cell characters correctly into multiple cells.
This does not adjust the console-renderers but only the font renderers to
provide the correct glyphs.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 14:36:28 +0000 (15:36 +0100)]
docs: fix typos in unicode-test.txt
Two simple obvious typos.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 14:31:47 +0000 (15:31 +0100)]
tsm: unicode: add wcwidth() implementation
wcwidth() is a POSIX function that returns the number of cells that a
wide-character occupies. The glibc function cannot be used as it depends
on the locale and we need _always_ UTF8 no matter what the locale is.
This implementation is provided by Markus Kuhn and is equivalent to
xterm's behavior.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 14:23:10 +0000 (15:23 +0100)]
tsm: unicode: fix header-protection namespace
TSM is no longer part of main-kmscon libraries so move macro-names to
TSM_* prefix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 21:06:51 +0000 (22:06 +0100)]
uxkb: print warning if LED update fails
If we cannot write LED states to an input device, we should print proper
warnings instead of ignoring it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 20:55:32 +0000 (21:55 +0100)]
Release kmscon-6
This release contains a lot of fixes all over the place and introduces
many new features. See ./NEWS for a list of new features.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 19:49:28 +0000 (20:49 +0100)]
README: update readme-file
We updated configure.ac several times and need to update the README with
the newest command-line options.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 19:11:14 +0000 (20:11 +0100)]
NEWS: add further kmscon-6 news entries
We added some more features in the recent weeks so add them. Most of it
were bugfixes, though.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 18:53:27 +0000 (19:53 +0100)]
COPYING: add all contributors
Add name of all contributors to COPYING.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 18:52:35 +0000 (19:52 +0100)]
build: add systemd service files to EXTRA_DIST
These service files aren't installed, yet but they work so distribute
them.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 18:51:51 +0000 (19:51 +0100)]
build: add manpage-XML files to EXTRA_DIST
We need these XML files to build the man-pages so add them to EXTRA_DIST.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 18:51:22 +0000 (19:51 +0100)]
build: add kmscon_cdev.h to source files
This is needed to get "make distcheck" working again.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 17:40:26 +0000 (18:40 +0100)]
Add getty@.service replacement
This unit file is a new replacement for standard systemd-getty files.
Installed into /etc/systemd/system it replaces the standard systemd unit
and spawns kmscon instead of agetty on virtual terminals.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 17:34:26 +0000 (18:34 +0100)]
kmscon: add --seats=current option
This option uses XDG_SEAT to determine the current seat. If this is NULL,
we fall back to "seat0".
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 17:33:03 +0000 (18:33 +0100)]
pty: use /bin/login by default
kmscon does always pass a proper argv array so the default is never used.
However, for security reasons we shouldn't hardcode /bin/login. If some
other program uses the pty layer and forgets to pass in a suitable argv
all the time, they mind end up with opening a root shell.
Hence, use /bin/login as default.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 16:45:50 +0000 (17:45 +0100)]
build: add more verbose recursive error-messages to configure.ac
Our dependency checker should recursively report missing dependencies.
Otherwise, the user doesn't really know what is missing.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 9 Dec 2012 16:45:20 +0000 (17:45 +0100)]
build: add AC_PROG_SED to configure.ac
We need SED for man-page generation so explicitly look for it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>