| Summary: | External touchscreen monitor maps to wrong monitor (in wayland and X11) | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Kelvie Wong <kelvie> |
| Component: | libinput | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 5.27.1 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Kelvie Wong
2023-02-27 04:34:38 UTC
Just took a look, and it seems like the code that assigns this is in kwin: kwin/src/backens/libinput/connection.cpp, Connection::applyScreenToDevice The touchscreen geometry doesn't seem to match the libinput device geometry for this touchscreen. For the record, libinput list-devices has the touchscreen at 309x174mm, and xrandr has the display listed at 310x180mm (measured it and it's definitely closer to 309x174) Ultimately, I think we need a way for a user to choose and save the input -> output mapping (probably a job for kscreen?) but in the meantime, perhaps we can change the check here (https://invent.kde.org/plasma/kwin/-/blob/6745cb87ecb57669389df3925f8e1660b8a637ad/src/backends/libinput/connection.cpp#L612-617) : auto testScreenMatches = [device](const Output *output) { const auto &size = device->size(); const auto &screenSize = output->physicalSize(); return std::round(size.width()) == std::round(screenSize.width()) && std::round(size.height()) == std::round(screenSize.height()); }; To allow a 5% (or some other value) margin of error in the height and width? A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3705 As mentioned in the PR comments, apparently there was a toucscreen KCM module that allows this assignment, I just didn't think to look. |