summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-05test_output: fix build failureDavid Herrmann1-1/+1
Use new uterm_video constructor. This requires hard-coding the DRM card but this is needed until we use the uterm_monitor interface. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05test_input: use new input APIDavid Herrmann1-43/+66
Use new uterm_monitor and input API instead. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_monitor: correctly enumerate input devicesDavid Herrmann1-26/+43
We are actually not interested in the main input device but rather in the evdev interface. However, the evdev interface is a child of the input device and therefore has no seat values specifies. This patch removes the scan-filter for seat tags and performs seat matching in user-space by first finding the parent of the input device. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_monitor: refresh seats before scanning the systemDavid Herrmann1-0/+2
We currently only scan devices in uterm_monitor_scan() but we should read the initial seat values before even searching for devices. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_monitor: initialize list heads correctlyDavid Herrmann1-0/+2
List heads must be initialized and cannot be set to NULL by default. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_monitor: add debug messagesDavid Herrmann1-2/+12
Be more verbose about added and removed devices. Otherwise, debugging is not as easy as it could be. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input: fix initializing device listDavid Herrmann1-0/+1
kmscon_dlist heads must be initialized and cannot be set to NULL by default! Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input_xkb: fix typoDavid Herrmann1-1/+1
We renamed kmscon_kbd to kbd_dev but forgot that single function. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input: fix typoDavid Herrmann1-1/+1
The header said *_is_asleep() instead of *_is_awake(). Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input: add xkb backendDavid Herrmann2-1/+1023
This mainly copies the kbd_xkb.c backend into the uterm library. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input: use new kbd APIDavid Herrmann1-11/+9
Use the uterm internal kbd API instead of the kmscon kbd API. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input: add kbd APIDavid Herrmann3-1/+458
Internally, we use a new kbd API to handle keyboard related stuff in uterm. It is a reimplementation of the old kbd_dumb.c backend. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_input: add input layer to utermDavid Herrmann4-0/+515
This is a rewrite of the input layer but integrated into uterm. It has the same functionality but is tightly bound to the concepts behind uterm and will soon supercede the old implementation. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_monitor: add input device supportDavid Herrmann2-0/+19
To allow moving all input handling to uterm, too, we need to detect input devices in the uterm-monitor like all other devices, too. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_video: remove hotplug awarenessDavid Herrmann5-251/+29
To introduce the new uterm-monitor object we need to remove all the udev handling from uterm_video. To not break "git bisect" we now remove all the udev code from uterm_video and uterm_video_drm and make kmscon use the static /dev/dri/card0 interface for now. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_video_drm: include xf86drmMode.h againDavid Herrmann1-1/+1
Upstream mesa fixed the missing header protection of xf86drmMode.h so we can include it again. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05uterm_monitor: add system monitor for full seat supportDavid Herrmann4-0/+770
The new uterm_monitor watches the system for seat-changes and puts all devices under the correct seat. This allows to run kmscon on multiple seats in a single process. It now also correctly handles seat-changes, that is, devices that are reattached to a different seat on runtime. It is not integrated into the kmscon source, yet, but will soon be. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05misc: add safe list iteratorDavid Herrmann1-0/+4
New for-each implementation that keeps a safe pointer to the next element so you can remove the current element from the list. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05eloop: allow flushing an fdDavid Herrmann2-0/+14
Sometimes one wants to remove all pending events for an fd. The new ev_eloop_flush_fd() call allows this in a safe way. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-03uterm_video: add udev device parameter to video_new()David Herrmann3-3/+3
When triggered by seat monitor we need to be able to create uterm_video objects on a concrete device so enable passing it in. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-03build: fix build for automake 1.12David Herrmann1-0/+1
automake-1.12 complains about missing AC_PROG_AR so add it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-03uterm: fix commentsDavid Herrmann1-9/+5
Update comments to resemble new uterm_video logic. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-25uterm_video_drm: return -EINVAL if already activatedDavid Herrmann1-1/+1
If a display is already activated we return EINVAL. Otherwise, the user might think that the requested mode was activated even though a totally different mode may be still active. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-25uterm_video: allow explicitely activating GL ctxDavid Herrmann5-13/+55
We may have to use multiple GL contexts if we mix DRM and fbdev devices. Therefore, we need explicit GL-ctx management. We now allow to explicitely activate a specific GL context. This means, the user needs to use the right GL context before he creates textures or similar. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22uterm_video: disable egl context on destructionDavid Herrmann1-0/+1
Make sure to reset the egl-context before destroying it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22test_input: use new test_include.h infrastructureDavid Herrmann1-50/+27
test_input compiles again and uses the same helpers as the other tests do. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22tests: remove unneeded testsDavid Herrmann3-461/+3
test_buffer and test_terminal no longer compile and are not needed so remove them. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22test_vt: use new test_include.h codeDavid Herrmann1-44/+18
test_vt now compiles again and uses the new infrastructure. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22test_console: removeDavid Herrmann1-345/+0
This test doesn't compile and is no longer needed. We can now use the kmscon program or test_terminal for the same functionality. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22console: avoid unneeded matrix transformationsDavid Herrmann2-4/+3
We now assume a screen of -1,-1 to 1,1 instead of 0,0 to 1,1 to avoid matrix transformations. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22font_pango: add debug messagesDavid Herrmann1-0/+4
Add debug messages so we always know what kind of screen is created. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22gl: disable texture stride supportDavid Herrmann1-2/+7
This currently does not work properly so disable it. However, we definitely need to fix this later. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22eloop: fix memory leak for shared signalsDavid Herrmann1-0/+2
A shared signal owns an eloop_fd object. This has a reference of its connected eloop. Therefore, we must free a shared signal to drop a reference to the connected eloop and cannot postpone this to eloop-destruction. Otherwise, the eloop will never get destroyed. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22eloop: use kmscon_dlist for shared signalsDavid Herrmann1-9/+16
Move to new list-implementation instead of the single-linked list. This allows removal of elements in O(1). Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22misc: add double-linked list implementationDavid Herrmann1-0/+62
This adds a generic double-linked list implementation so we don't have to write all list-handling over and over again. The list-type is similar to the kernel list where we use the same type for heads and entries. This is a _very_ convenient list-type so we copy it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22misc: add type-safe "offsetof"David Herrmann1-0/+8
This uses the GCC extension "typeof" to implement a type-safe "offsetof" similar to the implementation in the linux kernel. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22misc: fix header protectionDavid Herrmann1-1/+1
There was a typo in the macros for header protection. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-15misc: add kmscon_hook_num() helperDavid Herrmann2-0/+12
This helper returns the number of registered callbacks for an hook. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: always enable all outputsDavid Herrmann1-28/+15
Instead of accepting a list of outputs we now enable all outputs when testing the video subsystem. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: run eloop for 5s instead of sleep()David Herrmann1-2/+4
The new eloop implementation allows to run the eloop for a fixed amount of time. Use this instead of sleeping for 5s which would prevent us from catching signals as the eloop blocks them in favor of signalfd. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: use new test_include.h headerDavid Herrmann3-13/+109
The test_include.h header now provides the basic initialization that will later be used in all other tests. This allows us to use the same program-parameters that kmscon uses and makes sure everything is initialized properly before we run the tests. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: remove signal handlerDavid Herrmann1-11/+0
It will be replaced by the event loop signal handler. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: remove old font-factory codeDavid Herrmann5-103/+6
Remove the code that is no longer needed due to the new font renderer. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01terminal: use new font backendDavid Herrmann3-56/+41
Instead of using the slow old font-factory we now use the new font_screen object which allows faster software rendering with pango/cairo. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: remove margin_bottom cacheDavid Herrmann1-24/+18
margin_bottom was always the last index of the scroll-region, in contrast to cells->mbottom_y which is the bottom margin size. However, this cache is inconvenient so this replaces all calls to margin_bottom with a correct immediate calculation of the bottom margin. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: remove mtop cacheDavid Herrmann1-14/+3
We can directly access the buffer now so no need to cache the value. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: remove cells_x/y cacheDavid Herrmann1-65/+44
We don't need this anymore as we now have direct access to the buffer structure. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: add "fixed_position" optionDavid Herrmann1-54/+102
The fixed_position option allows to explicitely keep the scrollback-buffer position instead of scrolling on new input. This was already the current behavior but now we can also scroll on new input if this is set to false. Also fix up the formatting of the comments and remove old information. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: remove refcnt of buffer objectDavid Herrmann1-17/+3
The buffer object is used internally only and should never be shared. Hence, we can safely remove the refcnt. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-01console: make buffer code privateDavid Herrmann2-175/+150
The buffer should not be accessed from code outside of console.c so make it private. This includes some code-moving but no bigger changes. The diff might look scary, though. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>