Bug 497749

Summary: touch broken when resolution changed
Product: [Plasma] kwin Reporter: kdebuac.rhn
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: duha.bugs, josh, madness742, nate, xaver.hugl
Priority: NOR    
Version First Reported In: 6.2.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description kdebuac.rhn 2024-12-21 13:15:25 UTC
SUMMARY

The input area doesn't match the display area if letterboxing is used. Touching a place on the screen doesn't actually register in the touched place, but offset the farther from the middle it is.

Same with digitizer pen.

STEPS TO REPRODUCE
1. Change resolution from native 1920x1200 to 1920x1080. The display has now a black bar on the bottom.
2. Touch the Plasma Menu icon on the bottom left

OBSERVED RESULT
Probably nothing happens: actual click is above the button

EXPECTED RESULT
The click should be exactly on the button

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Wayland.

This is super annoying because mirroring over multiple screens of different proportions also has other bugs.

Pen calibration also doesn't fix this problem.
Comment 1 kdebuac.rhn 2024-12-21 13:42:21 UTC
Calibration doesn't help, but the same KCM module has an option to work around the problem. Although it's not possible to set via the GUI.
Edit .config/kcminputrc
and alter the line:
OutputArea=0,-0.08,1,1

As far as I can tell, negative offset is not posible through the GUI, but it still works.
Comment 2 Zamundaaa 2025-01-09 14:27:33 UTC
I'm afraid this is pretty hard to deal with - when you change the mode, we have pretty much no idea what the display will do with that.  To handle this properly, we'll need to do the letter boxing ourselves instead of actually changing the mode.
That is a better idea than just hoping the display and/or graphics driver do something sane, but it'll take some time, we currently don't have the infrastructure to do that.
Comment 3 kdebuac.rhn 2025-01-09 14:50:02 UTC
As a stopgap measure, manually adjusting the parameters would go a long way.
The tablet KCM already has the necessary transformation matrix, but the GUI doesn't allow values in the range that fix it for me.
Also, the calibration screen could take it into account.
Touch doesn't have a calibration screen at all, which could be improved.