To better test the usage of pointer confinement and locking I wrote this test
application.
For now it works only with the Wayland QPA. In a future patch an X backend
shall be added to also observe pointer constraining under Xwayland.
Plasma | |
Frameworks |
To better test the usage of pointer confinement and locking I wrote this test
application.
For now it works only with the Wayland QPA. In a future patch an X backend
shall be added to also observe pointer constraining under Xwayland.
No Linters Available |
No Unit Test Coverage |
There are some visual glitches with the QWidget code. If there are simple fixes for that, I will very happily do them. Otherwise since it's just a test application, it isn't really worth the effort. I also thought about using QGraphicsAnchorLayout, instead of normal Layouts. But I'm not sure if this would be better in the end.
It could make more sense to have this test in KWin instead of KWayland. Especially when later on the Xwayland backend is added (would be optional on compile time though). Any opinions on this?
Some nitpicks. :-)
tests/pointerconstraints.cpp | ||
---|---|---|
51 | Coding style nitpick: put { on a new line. | |
170 | IMHO, that's not the best case to use auto. | |
176 | What about if (!confinedPointer) { qDebug() << "ERROR when receiving confined pointer!"; return; } // ... ? | |
325 | Coding style nitpick: no else after return. | |
403 | Is there a reason why the moc file is included? |
I decided to add the test to KWin instead with: D13439
Thanks to Vlad for review comments. I incorporated them in the new patch for KWin.