Bug 376050 - Tablet mapping uses starting coordinates of a wrong screen until kded5 is restarted
Summary: Tablet mapping uses starting coordinates of a wrong screen until kded5 is res...
Status: RESOLVED FIXED
Alias: None
Product: wacomtablet
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Jörg Ehrichs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-05 13:37 UTC by Valerii Malov
Modified: 2017-11-11 18:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valerii Malov 2017-02-05 13:37:18 UTC
This bug appeared after upgrading to plasma 5.8, it seems to be related to changes in kscreen/multihead support.

I have left screen on DVI-D-0 (labeled as no. 2 in wacom kcm) and right screen on DVI-I-1 (primary output, labeled as no. 1 in wacom kcm).

In wacom kcm, I have tablet mapped to right screen (no. 1).
However, after login, tablet is ends up being mapped to the left screen but with geometry of the right screen. If I restart kded5, tablet is remapped to the correct screen.

Also if I disable one of the screens, mapping is not updated to reflect that (tablet ends up being mapped to roughly half of the only screen), but this could be a different bug.
Comment 1 Valerii Malov 2017-03-16 23:53:14 UTC
So I poked around a bit and it seems to be caused by QApplication::desktop()->screenGeometry() returning invalid, pre-setup geometry for some reason

i.e. in XinputAdaptor::mapTabletToScreen initially screenList contains:

1920x1080+0+0
1680x1050+1920+0

which is my "boot" geometry and is incorrect

After I restart kded5 screenList contains:

1920x1080+1680+0
1680x1050+0+0

which is my actual geometry, set through KDE screen settings and applied when I log in

This messes up coordinate transformation matrix and breaks screen mapping as a result

Not sure if it's a Qt bug. I'm using Qt 5.7.1
Comment 2 Valerii Malov 2017-03-30 17:32:08 UTC
It actually seems to be fixed in current releng3.0 head, but there's no release with this fix (3.0.0 tag was almost two years ago)

https://cgit.kde.org/wacomtablet.git/commit/?h=releng3.0&id=72efb5c0f38bb8fc5b6136b5437a8e8a1f372067