-
Notifications
You must be signed in to change notification settings - Fork 4
Add option to evdev mouse driver to allow input to be rotated #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mer-5.6
Are you sure you want to change the base?
Conversation
|
This is useful on the volla tablet and pine64 pinetab2, both of which have keyboard cases with a touchpad. I use rotate=270. The mouse driver seems to work better than the touch driver, which seems to generate a lot of noisy input. |
|
With changes to single driver class and being opt-in I could live with. But indeed feels suboptimal. Suppose this now fixes the expectation when using a case with keyboard, but then again there could be, say, a bluetooth mouse attached. That would then also work only in some specific orientation, right? Wondering how much effort it would be to just do this in lipstick per current orientation. |
|
Yes, when testing with a hardware mouse, it also would need the device (in my case tablet) in landscape mode. Its quite niche, and probably the only way to do it correctly is in the compositor somehow? |
pvuorela
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, actually might be that this needs something in qtbase since mouse handling is including a global position. Here storing m_x & m_y and feeding them to QWindowSystemInterface. For relative movement the information how to interpret directions should be coming from the compositor but guess the actual work should be done eventually somewhere here.
I think qt might be lacking support for this kind of use case. Not spotting anything in more recent qt5 or qt6 either.
| m_y += y; | ||
| } | ||
| } else { | ||
| m_x = x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually want to rotate the mouse events with absolute coordinates? Ref qevdevmousehandler.cpp those might be a touchscreen sending mouse events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I admit to not testing this path, as im sure the touchpad just give relative events. Would be happy to drop the changes to this branch of the condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, let's skip this part then. If some device returns absolute coordinates, I'd expect it safer to just believe them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have removed this part
Not a real fix, as lipstick should probably rotate the input, however works in the case of a tablet docked into a keyboard in landscape with touchpad, where the input needs rotated by 90degrees.
Not a real fix, as lipstick should probably rotate the input, however works in the case of a tablet docked into a keyboard in landscape with touchpad, where the input needs rotated by 90degrees.