Commit Graph

13 Commits (37fc20d3c0b70a4a4641bccfab428220377d9982)

Author SHA1 Message Date
Martin Gräßlin 6b95705f24 [libinput] Don't change default log level
With this change libinput is less noisy and only prints errors to stderr.

In addition one could install a dedicated log handler and forward to
qCDebug and friends.
2015-08-21 14:38:57 +02:00
Martin Gräßlin fe28ca1d8a [libinput] Add dedicated logging category for libinput 2015-07-31 12:43:35 +02:00
Martin Gräßlin efa0500313 [libinput] Bind libinput support to VirtualTerminal
This change is motivated by the fact that we need to suspend libinput
before switching the virtual terminal. Also we don't want to take over
libinput if we do not have a VirtualTerminal created - in windowed mode
we don't want libinput to be started. So binding it to the backends which
create the VirtualTerminal makes sense.

The KWin::Application gains a new signal virtualTerminalCreated which is
emitted from VirtualTerminal once it's properly setup. This is used by
Input to create Libinput integration instead of binding it to logind.

Furthermore Libinput gets suspended when the VirtualTerminal reports that
it is no longer active. For re-activation we still just use logind's
session active property.
2015-04-24 12:03:19 +02:00
Martin Gräßlin e6b076df9c Move Udev into an own header and implementation
For a DRM backend we also need Udev, so don't bundle with libinput.
2015-04-24 12:03:19 +02:00
Martin Gräßlin 61579506e3 [input] Only update seat state if session is active
When our session gets inactive libinput loses all devices, thus our
Seat would not have neither keyboard, pointer nor touch. To not confuse
all connected clients we block updates while libinput is suspended. After
resume we check whether something actually changed and emit the
corresponding signals to ensure everything is up to date.
2015-04-01 11:05:45 +02:00
Martin Gräßlin f7bed6a003 [libinput] Pass device capabilities to Wayland::Server::SeatInterface
We handle device added/remove to monitor whether we have keyboard,
pointer and touch devices and emit signals. Those are used to update
the SeatInferface from InputRedirection.
2015-03-26 16:19:26 +01:00
Martin Gräßlin 93b3626a37 [libinput] Try to dispatch events directly after setup
Without we might end in a race as kwin_wayland might start the Xwayland
server before we have a populated seat interface.
2015-03-26 16:17:51 +01:00
Martin Gräßlin 60783b8228 Touch support in libinput 2015-03-25 16:40:17 +01:00
Martin Gräßlin e886bd7c78 Adjust to newer libinput and require at least 0.10
There was API changes regarding axis event handling.
CCBUG: 342893
2015-03-20 12:42:57 +01:00
Martin Gräßlin 11fd9f69c1 Fix build with clang and gcc 5.0
BUG: 343529
FIXED-IN: 5.2.1
2015-02-03 14:01:53 +01:00
Martin Gräßlin 6a032e78b7 Suspend/Resume libinput when logind session Active changes
LogindIntegration starts monitoring the Active property on the session
and emits a signal when the state changes. The LibInput::Connection
connects to this signal during the setup and uses it to suspend/resume
the libinput context.
2014-10-20 14:51:24 +02:00
Martin Gräßlin a918591fef Use Logind to open/close devices needed by libinput
With libinput we have the problem that we need to have privileges to
open the device files. In order to not need wrappers or suid bits, we
use logind. This means that kwin_wayland has to be the session controler.

A LogindIntegration is added to connect to logind and wrap the dbus
calls. This is based on the logind integration done for ksld in
ksmserver. The LogindIntegration is started by Workspace and the
InputRedirection tries to become the session controller and starts the
libinput integration only after this succeeded.
2014-10-20 14:51:24 +02:00
Martin Gräßlin c4bb3d11fc Initial support for libinput
Libinput is an optional dependency for getting low level input events.
As opening the input devices requires root privs this is rather
pointless in the current state. But there is a small added test app which
can be executed with root privs to demonstrate the functionality. To
properly get input events we need a wrapper like it's used in weston.

So far the following is setup:
* opening devices found by udev
* forwarding keyboard events to InputRedirection
* forwarding pointer button events to InputRedirection
* forwarding pointer axis events to InputRedirection
* signals emitted for pointer motion events

Pointer motion events need some further work as they are provided
as delta events. We need to track that and map them properly.

Also missing are touch events due to me not having a touch screen.
It should be fairly simple to setup the touch events, though.

Also hotplugging of devices is not yet implemented.
2014-10-20 14:51:24 +02:00