-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(linux): fix touch misalignment for wlgrab on scaled outputs #4665
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: master
Are you sure you want to change the base?
Conversation
95a0fea to
8f4ff1d
Compare
|
@juliosanz could you review please? |
juliosanz
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.
KMS still works just fine like it did in PR #4607. Changes made are in wlgrab.cpp and, indeed, mirror those made to kmsgrab.cpp.
At first glance, these changes should absolutely make things work right in wlroots. I don't have an installation at hand to try it myself, though. @Dregu pointed out some issues my PR had in wlroots, perhaps they can test it better.
fa9465d to
0da3334
Compare
|
Follow up commit to address the Sonar issues with duplication in
No functional changes, just to better match the guidelines. |
Thank you! Really appreciate when we can get some of this code cleaned up! |
0da3334 to
22ded58
Compare
Bundle ReportBundle size has no change ✅ |
|
There's some issues building the docs: |
|
|
|
||
| void passthrough(std::shared_ptr<input_t> &input, PSS_TOUCH_PACKET packet) { |
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.
| void passthrough(std::shared_ptr<input_t> &input, PSS_TOUCH_PACKET packet) { | |
| /** | |
| * @brief Called to pass a touch message to the platform backend. | |
| * @param input The input context pointer. | |
| * @param packet The touch packet. | |
| */ | |
| void passthrough(std::shared_ptr<input_t> &input, PSS_TOUCH_PACKET packet) { |
I think the docs were accidentally removed from this function?
Well I don't use touch, but at least the things I do use, mouse on scaled wlr and kms, still seem to work fine 👍🏻 |


Description
PR #4607 added logical dimension tracking and
scalar_tpcoordsscaling support for thekmsgrab(KMS/DRM) capture backend, but my configuration (niri, multimonitor, scaled hidpi output) was still mapping input to the wrong portion of the desktop.This PR tries to mirror the pattern used in
kmsgrab.cpptowlgrab.cpp:env_logical_width/env_logical_heightstatics to thewlnamespacelogical_width,logical_height,env_logical_width,env_logical_heighton the display object duringwlr_t::init()Additionally, the touch and pen passthrough functions in
input.cppare updated to normalize coordinates relative to the streamed monitor rather than the full desktop.Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage