Re: detecting tablet mode

2018-01-18 Thread Martin Flöser
Am 2018-01-17 13:26, schrieb Marco Martin: On Wed, Jan 17, 2018 at 10:33 AM, Marco Martin wrote: Another thing that i think would be needed, is to detect if the tabet mode switch is present at all on the hardware (my use case would be wether show options related to that on the gui side) is tha

Re: detecting tablet mode

2018-01-17 Thread Marco Martin
On Wed, Jan 17, 2018 at 10:33 AM, Marco Martin wrote: > Another thing that i think would be needed, is to detect if the tabet mode > switch is present at all on the hardware (my use case would be wether show > options related to that on the gui side) is that possible at all, in libinput > or other

Re: detecting tablet mode

2018-01-17 Thread Marco Martin
On giovedì 4 gennaio 2018 23:22:43 CET Marco Martin wrote: > 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) alrea

Re: detecting tablet mode

2018-01-09 Thread Martin Flöser
Am 2018-01-08 11:13, schrieb Marco Martin: On Fri, Jan 5, 2018 at 6:24 PM, Martin Flöser wrote: Am 2018-01-05 16:11, schrieb Marco Martin: 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

Re: detecting tablet mode

2018-01-09 Thread Martin Flöser
Am 2018-01-09 13:27, schrieb Marco Martin: On Fri, Jan 5, 2018 at 6:21 PM, Martin Flöser 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 m

Re: detecting tablet mode

2018-01-09 Thread Marco Martin
A first draft is in https://phabricator.kde.org/D9764 as i can't try the real switch yet, for now the setter is exposed via dbus, which won't be in the end. then i want to expose that into plasma (i think libplasma, as a property in corona) then containments/plasmoids will be able to access it an

Re: detecting tablet mode

2018-01-09 Thread Marco Martin
On Fri, Jan 5, 2018 at 6:21 PM, Martin Flöser 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 qu

Re: detecting tablet mode

2018-01-08 Thread Marco Martin
On Mon, Jan 8, 2018 at 11:06 AM, Sebastian Kügler wrote: > > FWIW, I have two X1 Yoga laptops (gen1 and gen2) with recent kernels at my > disposal that I could probably test this feature on. to see if it "just works", can you try to just put some dobug output in connection.cpp around line 467 at

Re: detecting tablet mode

2018-01-08 Thread Marco Martin
On Fri, Jan 5, 2018 at 6:24 PM, Martin Flöser wrote: > Am 2018-01-05 16:11, schrieb Marco Martin: >> >> 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 f

Re: detecting tablet mode

2018-01-08 Thread Sebastian Kügler
On Friday, January 5, 2018 6:24:38 PM CET Martin Flöser wrote: > Am 2018-01-05 16:11, schrieb Marco Martin: > > 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, b

Re: detecting tablet mode

2018-01-05 Thread Martin Flöser
Am 2018-01-05 16:11, schrieb Marco Martin: 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 ge

Re: detecting tablet mode

2018-01-05 Thread Martin Flöser
Am 2018-01-05 12:48, schrieb Marco Martin: I would like to give it a try about it if you don't mind(ie had precise plans or code started).. I don't mind :-) so i was thinking about a property for the current state, plus a signal for state change. as for the location, into ConnectionAdaptor wo

Re: detecting tablet mode

2018-01-05 Thread Marco Martin
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

Re: detecting tablet mode

2018-01-05 Thread Marco Martin
I would like to give it a try about it if you don't mind(ie had precise plans or code started).. so i was thinking about a property for the current state, plus a signal for state change. as for the location, into ConnectionAdaptor would probably be the easiest, iff makes semantically sense it comes

Re: detecting tablet mode

2018-01-05 Thread Dan Leinir Turthra Jensen
i am more than a little interested in having something like this to listen to. Windows being the only system with this detection in place (for several years now) just seems so silly... Also because it breaks every few weeks on there, where i expect we might be able to do /slightly/ better, at le

Re: detecting tablet mode

2018-01-04 Thread Martin Flöser
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 : >Hi all, >one thing i wanted to look into, is to detect when a trasformable >laptop goes >in tablet mode

detecting tablet mode

2018-01-04 Thread Marco Martin
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 fro