Commit Graph
11 Commits
Author SHA1 Message Date
David Herrmann d97fc0baf0 uterm: monitor: fix crash during device hotplug
We must make sure that the returned value is non-NULL, otherwise we crash
during device-change events for non-DRM-Hotplug events.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-12 13:26:16 +02:00
David Herrmann 6901c1df1b uterm: monitor: make systemd optional
If systemd is not used for multi-seat support, we simply fake-add seat
"seat0" and avoid looking for the "seat" tag. However, if devices still
use ID_SEAT, we still parse it but all other devices are taken for seat0
by default.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 16:43:09 +02:00
David Herrmann 7e7ab9c2e5 uterm: monitor: refactor systemd code
Move all systemd dependencies into local helper functions so we can easily
make them optional.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-30 12:53:23 +02:00
David Herrmann f1326b2728 static: move statically linked subsystems to static_*
Small stuff that is not worth putting into a separate library is no moved
into the "static" library which is statically linked into all our
subsystems.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 20:35:22 +02:00
Ran Benita de078499d2 monitor: fix small memory leak
The members of the array returned from get_all_seats are strdup'd as
well.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-26 14:47:47 +02:00
David Herrmann 2d2c92e6c2 uterm_monitor: correctly enumerate input devices
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-05 22:41:23 +02:00
David Herrmann fd9a68ae2e uterm_monitor: refresh seats before scanning the system
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-05 22:40:32 +02:00
David Herrmann c81a83fb3a uterm_monitor: initialize list heads correctly
List heads must be initialized and cannot be set to NULL by default.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 22:40:01 +02:00
David Herrmann c67b20d89e uterm_monitor: add debug messages
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-05 22:39:24 +02:00
David Herrmann 5a5bd3a6f2 uterm_monitor: add input device support
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-05 18:21:58 +02:00
David Herrmann 380868d54b uterm_monitor: add system monitor for full seat support
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-05 17:16:13 +02:00