At the moment it's broken for many of the laptops I've seen, this opens the possibility to start toying with them. The right fix would be to get the kernel to emit the right signals but I'm afraid for some hardware it will be close to impossible.
This includes a kconfig variable variable that will detect it as follows: if there's a touchscreen, when the touchpad gets removed we are on tablet mode (i.e. the pointing will be done using the finger), when it's connected back tablet mode will be restored.
Details
- Reviewers
davidedmundson - Group Reviewers
KWin Plasma - Commits
- R108:40200565323f: Make it possible to autodetect the tablet mode
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Concept seems sensible.
tabletmodemanager.cpp | ||
---|---|---|
112 | I'd prefer using kwin.kcfg | |
116 | If you do have tabletModeSwitch we're still detecting a tablet mode regardless of this setting. "SetTabletModeOnTouchPadRemoval" ? | |
146 | I don't really how this is meant to be used but should this be only true when there's a touch screen? |
tabletmodemanager.cpp | ||
---|---|---|
146 | We could be a bit more specific, yes. But at this point, if it has requested through a config check to do the detection, I'd say it's fine to announce it as such. If you really want to, I can check that there's a touchscreen before initialising the Spy. |
lgtm, maybe add a check more
tabletmodemanager.cpp | ||
---|---|---|
114 | maybe checking touchpad and mouse? ie maybe i detached the keyboard from my transformable laptop but iattached usb mouse and keyboard, i would expect in this case to go in desktop mode |