Commit graph

8 commits

Author SHA1 Message Date
Aleix Pol
4020056532 Make it possible to autodetect the tablet mode
Summary:
At the moment it's broken for many of the laptops I've seen, this opens the possibility to start toying with them. The right fix would be to get the kernel to emit the right signals but I'm afraid for some hardware it will be close to impossible.
This includes a kconfig variable variable that will detect it as follows: if there's a touchscreen, when the touchpad gets removed we are on tablet mode (i.e. the pointing will be done using the finger), when it's connected back tablet mode will be restored.

Reviewers: #kwin, #plasma, davidedmundson

Reviewed By: #kwin, #plasma, davidedmundson

Subscribers: mart, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19604
2019-03-22 18:29:21 +01:00
Martin Flöser
137b954add Remove remaining HAVE_INPUT ifdef sections
Somehow they sneaked in between creating the patch for making libinput
mandatory and pushing the patch.
2018-02-10 20:36:43 +01:00
David Faure
1a46b663b4 Merge branch 'Plasma/5.12' 2018-02-09 09:13:18 +01:00
David Faure
b1035b6826 Fix compilation without libinput
CCMAIL: notmart@gmail.com
2018-02-09 09:12:29 +01:00
Martin Flöser
bbf00fdd98 Require libinput and udev
Summary:
The main reason for not having it as a mandatory dependency was that BSD
doesn't support it. But as I learned recently it is available on our CI
system. So BSDs have support now.

Even more it showed that the code doesn't compile if the dependency is
missing. And there's one thing I hate: broken build configuration
options.

So let's make UDEV and libinput a required dependency and get rid of the
problems.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10057
2018-02-04 15:00:42 +01:00
Marco Martin
87b688daae Expose if the tablet mode switch is available
Summary:
expose in the libinput wrapper a property that tells whether
a tablet mode switch input device is present on the machine,
expose it trough dbus

Test Plan:
still not complete, I need a way to either access the connection
from TabletModeManager or setting to TabletModeManager from input.cpp

Reviewers: #kwin, #plasma, graesslin

Reviewed By: #kwin, #plasma, graesslin

Subscribers: graesslin, ngraham, davidedmundson, plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9944
2018-01-25 12:46:38 +01:00
Marco Martin
8510f31340 don't double delete m_spy
dtor not needed
BUG:388910
2018-01-15 10:56:05 +01:00
Marco Martin
1be5256b1b A basic TabletModeManager
Summary:
depends from D9521

listens to switch events and updates the tablet mode status
which is exposed to dbus in the org.kde.KWin.TabletModeManager
interface

Test Plan:
as hardware support is limited, testing of clients
so far is done by the setter in the dbus property,
which should be removed from the final version.
It has been tested to successfully work on a Thinkpad.

Reviewers: #plasma, #kwin, graesslin

Reviewed By: #plasma, #kwin, graesslin

Subscribers: graesslin, davidedmundson, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9764
2018-01-11 13:11:00 +01:00