Long-term plan to use more of udev_device here is to better protect us against
re-opening a different device that happens to have the same devnode.
This now also prints an error message for invalid devices, the log tests are
adjusted.
Signed-off-by: Peter Hutterer
---
src/path.c | 109 +
Using a udev_device instead of the various bits separately safes us
re-initializing udev contexts whenever we need to compare the device. And
having the actual udev device makes it a bit easier to ensure that we're not
re-initializing a different device as a current one.
Signed-off-by: Peter Hutte
We need it for each device anyway, keep the ref around. Makes error handling a
bit easier, we don't need to handle failing udev_new() and reduce the danger
of mis-refcounting it.
Signed-off-by: Peter Hutterer
---
src/path.c | 33 +++--
src/path.h | 1 +
2 files chang
The seat of a device is currently immutable, but a device may (in a
multi-pointer case) move between different logical seats. Moving it between
seats is akin to removing it and re-plugging it, so let's do exactly that.
The physical seat name stays immutable.
Pro:
- device handling after changing
Prep work for changing seat names on devices. No functional changes.
Signed-off-by: Peter Hutterer
---
src/udev-seat.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/udev-seat.c b/src/udev-seat.c
index 49c8f47..c69d175 100644
--- a/src/udev-seat.c
+++ b/src
Prep work for changing seat names on devices. No functional changes.
Signed-off-by: Peter Hutterer
---
src/path.c | 30 ++
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/path.c b/src/path.c
index 9d0632a..fef1d46 100644
--- a/src/path.c
+++ b/src/p
libinput devices are assigned to a struct libinput_seat that is immutable.
The seat consists of physical seat (e.g. "seat0", i.e. ID_SEAT) and a
logical seat ("default", WL_SEAT if available).
The physical seat is used as filter whether a device is added at all,
the logical seat effectively corr
Potential race condition:
- udev notifies us that a udev_device became available
- we go for a coffee and chat to the neighbours on the way
- the device is unplugged
- a new device is plugged in, gets the same devnode
- we finish our coffee and come back
- open(udev_device_get_devnode())
- new devi
No functional changes
Signed-off-by: Peter Hutterer
---
src/path.c | 57 -
1 file changed, 32 insertions(+), 25 deletions(-)
diff --git a/src/path.c b/src/path.c
index f986afd..5900775 100644
--- a/src/path.c
+++ b/src/path.c
@@ -236,6 +23
Signed-off-by: Peter Hutterer
---
test/path.c | 71 ++-
test/udev.c | 78 -
2 files changed, 147 insertions(+), 2 deletions(-)
diff --git a/test/path.c b/test/path.c
index ecb7839..3a2
On Fri, Nov 21, 2014 at 09:10:24PM -0700, Ales Katona wrote:
> I wanted to try and compile libinput under freeBSD seeing how epoll has
> been patched into kqueue on the platform, but I'm getting stopped by
> configure saying it can't find EPOLL_CLOEXEC. Is this just a configure
> block or is the co
11 matches
Mail list logo