D9516: [libinput] Add support for switch devices and events

Martin Flöser noreply at phabricator.kde.org
Wed Dec 27 17:02:57 UTC 2017


graesslin created this revision.
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.
Restricted Application edited projects, added Plasma; removed KWin.

REVISION SUMMARY
  This change adds support for the switch devices introduces with libinput
  1.7 (lid) and 1.9 (tablet mode). So far it's not yet used internally in
  KWin, but only exposed through the Device and Events.
  
  As KWin currently only requires libinput 1.5 and we are rather late in
  the release cycle the new functionality is ifdef'ed. The requirement
  will be raised once master is 5.13. It is already available on
  build.kde.org, but e.g. Neon only has 1.6.
  
  The switch events are interesting as they report whether the lid is
  closed (might be interesting for e.g. powerdevil) and whether a
  convertible is in tablet mode (supported for e.g. Lenovo Yogas with
  recent kernel). This can be used by KWin internally to enable/disable
  the virtual keyboard. And can be exposed globally to switch to Plasma
  Mobile shell in future.

TEST PLAN
  Only through test case as my Lenovo Yoga uses Neon which has a
  too old libinput

REPOSITORY
  R108 KWin

BRANCH
  libinput-switch

REVISION DETAIL
  https://phabricator.kde.org/D9516

AFFECTED FILES
  CMakeLists.txt
  autotests/libinput/CMakeLists.txt
  autotests/libinput/device_test.cpp
  autotests/libinput/mock_libinput.cpp
  autotests/libinput/mock_libinput.h
  autotests/libinput/switch_event_test.cpp
  config-kwin.h.cmake
  libinput/connection.cpp
  libinput/connection.h
  libinput/device.cpp
  libinput/device.h
  libinput/events.cpp
  libinput/events.h

To: graesslin, #kwin, #plasma
Cc: plasma-devel, kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171227/48fe0c38/attachment.html>


More information about the Plasma-devel mailing list