[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: detecting tablet mode
From: Martin_Flöser <mgraesslin () kde ! org>
Date: 2018-01-09 18:56:34
Message-ID: bb10a218093ca4873679c5a738b47213 () kde ! org
[Download RAW message or body]
Am 2018-01-09 13:27, schrieb Marco Martin:
> On Fri, Jan 5, 2018 at 6:21 PM, Martin Flöser <mgraesslin@kde.org>
> wrote:
>>
>> So I would do something like a small class
>>
>> class TabletModeManager : public QObject, public InputEventSpy
>> {
>> };
>>
>
> I'm starting on this direction now, another thing: libinput has the
> event for the mode change, but is there a way to query the initial
> state to know whether kwi was started in tablet or desktop mode?
From documentation [1]:
"The default state of a switch is LIBINPUT_SWITCH_STATE_OFF and no event
is sent to confirm a switch in the off position. If a switch is
logically on during initialization, libinput sends an event of type
LIBINPUT_EVENT_SWITCH_TOGGLE with a state LIBINPUT_SWITCH_STATE_ON."
Cheers
Martin
[1]
https://wayland.freedesktop.org/libinput/doc/latest/group__device.html#ga63ae35419b521252bc5633912d032beb
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic