fix(linux): fix touch misalignment for wlgrab on scaled outputs#4665
fix(linux): fix touch misalignment for wlgrab on scaled outputs#4665ReenigneArcher merged 5 commits intoLizardByte:masterfrom
Conversation
95a0fea to
8f4ff1d
Compare
|
@juliosanz could you review please? |
juliosanz
left a comment
There was a problem hiding this comment.
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: |
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 👍🏻 |
|
Should be ready for rebase/review. @ReenigneArcher On the remaining duplication warning: the duplication is from existing blocks I did not introduce in this PR, just touched/moved around. I can try to refactor that code if it's required to pass the checks, but I figured it was best to keep the PR simple to limit unintentional effects. Let me know if there's anything else I can do. Thanks for the help and feedback so far. |
Co-authored-by: David Lane <42013603+ReenigneArcher@users.noreply.github.com>
fd1db38 to
f357b62
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4665 +/- ##
==========================================
- Coverage 15.46% 15.42% -0.05%
==========================================
Files 97 97
Lines 20566 20582 +16
Branches 9436 9446 +10
==========================================
- Hits 3181 3174 -7
- Misses 13720 16001 +2281
+ Partials 3665 1407 -2258
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(linux): fix touch misalignment for wlgrab on scaled outputs (LizardByte#4665)


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