detecting tablet mode

Marco Martin notmart at gmail.com
Fri Jan 5 15:11:23 UTC 2018


debugging a bit what happens currently on my machine, i don't seem to
have any event device which libinput_device_switch_has_switch,
however, when i flip it, i do get an event, but oddly from the event
device called
"intel virtual button driver" and i get a key event of id 240.
do you think it's a kernel problem and can'tbe made work on our level?
I can also try to do the patch blindly, but how to test not having the
proper hardware support? (on a running kwin, i know autotests have a
fake libinput that injects events)
I wonder on how many devices thoise events will actually work as intended...

On Fri, Jan 5, 2018 at 6:23 AM, Martin Flöser <mgraesslin at kde.org> wrote:
> I want to provide a dbus service in KWin to export the state. Apps cannot use libinput directly, one needs root for that.
>
> Cheers
> Martin
>
> Am 4. Januar 2018 23:22:43 MEZ schrieb Marco Martin <notmart at gmail.com>:
>>Hi all,
>>one thing i wanted to look into, is to detect when a trasformable
>>laptop goes
>>in tablet mode from applications, so that plasmashell and kirigami apps
>>can
>>adapt themselves and do things(tm)
>>KWin does that (on wayland) already, and i see it uses libinput for
>>that, like
>>i seem to evince from this recent commit (and the logic when to show
>>the on
>>screen keyboard)
>>https://cgit.kde.org/kwin.git/commit/?
>>id=ac2f41c86d3b5b13ba3655e6c2f17f59a4cb7f01
>>
>>would a normal application use libinput too or is something reserved to
>>the
>>compositor?
>>what would be the right way(tm) there? a dbus signal from KWin?


More information about the Plasma-devel mailing list