Skip to content

Fix touch mapping on panels that advertise bogus display modes - #24

Open
jboetticher wants to merge 1 commit into
shueber:mainfrom
jboetticher:fix-panel-touch-mapping
Open

Fix touch mapping on panels that advertise bogus display modes#24
jboetticher wants to merge 1 commit into
shueber:mainfrom
jboetticher:fix-panel-touch-mapping

Conversation

@jboetticher

Copy link
Copy Markdown

convertGlassPointToContentPoint derived the touch glass aspect from largestModePixelSizeForDisplayID, which on generic USB touch panels (e.g. a WCH controller advertising a 540x1920 mode) is not the real panel geometry. The aspect mismatch letterbox-stretched one axis, placing taps far from the finger. A non-mirrored panel is its own display and the desktop fills the glass 1:1, so return the point unchanged unless it mirrors a differently-shaped master.

Dude i don't know it didn't work and then claude fixed it. not gonna pretend i understand

convertGlassPointToContentPoint derived the touch glass aspect from
largestModePixelSizeForDisplayID, which on generic USB touch panels (e.g. a
WCH controller advertising a 540x1920 mode) is not the real panel geometry.
The aspect mismatch letterbox-stretched one axis, placing taps far from the
finger. A non-mirrored panel is its own display and the desktop fills the glass
1:1, so return the point unchanged unless it mirrors a differently-shaped master.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant