<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Plasma.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: kwin, plasma-devel.<br />Restricted Application edited projects, added Plasma; removed KWin.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9516" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This change adds support for the switch devices introduces with libinput<br />
1.7 (lid) and 1.9 (tablet mode). So far it's not yet used internally in<br />
KWin, but only exposed through the Device and Events.</p>
<p>As KWin currently only requires libinput 1.5 and we are rather late in<br />
the release cycle the new functionality is ifdef'ed. The requirement<br />
will be raised once master is 5.13. It is already available on<br />
build.kde.org, but e.g. Neon only has 1.6.</p>
<p>The switch events are interesting as they report whether the lid is<br />
closed (might be interesting for e.g. powerdevil) and whether a<br />
convertible is in tablet mode (supported for e.g. Lenovo Yogas with<br />
recent kernel). This can be used by KWin internally to enable/disable<br />
the virtual keyboard. And can be exposed globally to switch to Plasma<br />
Mobile shell in future.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Only through test case as my Lenovo Yoga uses Neon which has a<br />
too old libinput</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>libinput-switch</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9516" rel="noreferrer">https://phabricator.kde.org/D9516</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
autotests/libinput/CMakeLists.txt<br />
autotests/libinput/device_test.cpp<br />
autotests/libinput/mock_libinput.cpp<br />
autotests/libinput/mock_libinput.h<br />
autotests/libinput/switch_event_test.cpp<br />
config-kwin.h.cmake<br />
libinput/connection.cpp<br />
libinput/connection.h<br />
libinput/device.cpp<br />
libinput/device.h<br />
libinput/events.cpp<br />
libinput/events.h</div></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>