Update the README and the graphs showing libinput in the stack

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-05-15 14:18:46 +10:00
parent 3251ba2af0
commit bcd9b4d3ca
3 changed files with 51 additions and 32 deletions

View file

@ -1,39 +1,40 @@
libinput libinput
======== ========
libinput is a library that handles input devices for display servers and other libinput is a library that provides a full input stack for display servers
applications that need to directly deal with input devices. and other applications that need to handle input devices provided by the
kernel.
It provides device detection, device handling, input device event processing libinput provides device detection, event handling and abstraction so
and abstraction so minimize the amount of custom input code the user of minimize the amount of custom input code the user of libinput need to
libinput need to provide the common set of functionality that users expect. provide the common set of functionality that users expect. Input event
Input event processing includes scaling touch coordinates, generating processing includes scaling touch coordinates, generating
pointer events from touchpads, pointer acceleration, etc. relative pointer events from touchpads, pointer acceleration, etc.
libinput originates from
[weston](http://cgit.freedesktop.org/wayland/weston/), the Wayland reference
compositor.
Architecture Architecture
------------ ------------
libinput is not used directly by applications, rather it is used by the libinput is not used directly by applications. Think of it more as a device
xf86-input-libinput X.Org driver or wayland compositors. The typical driver than an application library. It is used by the xf86-input-libinput
software stack for a system running Wayland is: X.Org driver or Wayland compositors. The typical software stack for a system
running Wayland is:
@dotfile libinput-stack-wayland.gv @dotfile libinput-stack-wayland.gv
Where the Wayland compositor may be Weston, mutter, KWin, etc. Note that The Wayland compositor may be Weston, mutter, KWin, etc. Note that
Wayland encourages the use of toolkits, so the Wayland client (your Wayland encourages the use of toolkits, so the Wayland client (your
application) does not usually talk directly to the compositor but rather application) does not usually talk directly to the compositor but rather
employs a toolkit (e.g. GTK) to do so. employs a toolkit (e.g. GTK) to do so. The Wayland client does not know
whether libinput is in use.
The simplified software stack for a system running X.Org is: The simplified software stack for a system running X.Org is:
@dotfile libinput-stack-xorg.gv @dotfile libinput-stack-xorg.gv
Again, on a modern system the application does not usually talk directly to libinput is not employed directly by the X server but by the
the X server using Xlib but rather employs a toolkit to do so. xf86-input-libinput driver instead. That driver is loaded by the server
on demand, depending on the xorg.conf.d configuration snippets. The X client
does not know whether libinput is in use.
Source code Source code
----------- -----------

View file

@ -1,17 +1,25 @@
digraph stack digraph stack
{ {
compound=true;
rankdir="LR"; rankdir="LR";
node [ node [
shape="box"; shape="box";
] ]
kernel [label="Kernel"]; subgraph cluster_2 {
label="Kernel";
event0 [label="/dev/input/event0"]
event1 [label="/dev/input/event1"]
}
libinput; subgraph cluster_0 {
compositor [label="Wayland Compositor"]; label="Compositor process";
client [label="Wayland Client"]; libinput;
}
kernel -> libinput client [label="Wayland client"];
libinput -> compositor
compositor -> client event0 -> libinput;
event1 -> libinput;
libinput -> client [ltail=cluster_0 label="Wayland protocol"];
} }

View file

@ -1,19 +1,29 @@
digraph stack digraph stack
{ {
compound=true;
rankdir="LR"; rankdir="LR";
node [ node [
shape="box"; shape="box";
] ]
kernel [label="Kernel"]; subgraph cluster_2 {
label="Kernel";
event0 [label="/dev/input/event0"]
event1 [label="/dev/input/event1"]
}
subgraph cluster_0 {
label="X server process";
subgraph cluster_1 {
label="xf86-input-libinput"
libinput;
}
}
libinput; libinput;
xf86libinput [label="xf86-input-libinput"];
xserver [label="X Server"];
client [label="X11 client"]; client [label="X11 client"];
kernel -> libinput event0 -> libinput;
libinput -> xf86libinput event1 -> libinput;
xf86libinput -> xserver libinput -> client [ltail=cluster_0 label="X protocol"];
xserver -> client
} }