Bug 476566 - Wine drag & drop coordinates off with Wayland fractional scaling
Summary: Wine drag & drop coordinates off with Wayland fractional scaling
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Wayland drag-and-drop (show other bugs)
Version: 5.27.9
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2023-11-05 02:31 UTC by David Warner
Modified: 2024-06-20 10:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1
Sentry Crash Report:


Attachments
foobar2000 screenshot (17.93 KB, image/png)
2023-11-05 02:31 UTC, David Warner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Warner 2023-11-05 02:31:25 UTC
Created attachment 162872 [details]
foobar2000 screenshot

SUMMARY
Drag & drop coordinates in Wine apps are wrong when Wayland fractional scaling is enabled.

STEPS TO REPRODUCE
1. Set monitor to 150% scaling (Wayland session).
2. Install foobar2000, select Album List + Properties layout.
3. Drag file(s) from Dolphin to foobar2000 playlist area.

OBSERVED RESULT
The drop target area is off by a factor of 1.5. For example, if the playlist area top left corner is positioned at (640,360), the mouse needs to be moved to (960,540) for the drop reticle to appear.

EXPECTED RESULT
The mouse coordinates should match the drop target coordinates.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Wine DPI scaling doesn't make seem to make a difference (configured via winecfg).
Comment 1 Akseli Lahtinen 2023-11-07 12:36:08 UTC
Can confirm this issue, the coordinates are offset. It also seems that the Wine application is not scaled at all, text wise.
Comment 2 David Warner 2023-11-07 12:50:49 UTC
(In reply to Akseli Lahtinen from comment #1)
> Can confirm this issue, the coordinates are offset. It also seems that the
> Wine application is not scaled at all, text wise.

Thanks for confirming.

Wine has its own DPI settings (winecfg -> Graphics -> Screen resolution > 144 dpi (for 150%)), which scales text and other elements, at least on my machine. This setting doesn't seem to change the drag & drop behaviour, however.
Comment 3 David Edmundson 2024-05-28 08:05:45 UTC
Fixed with 447994581b80e37394aa721d63d05f65a5fb538b
Comment 4 David Warner 2024-06-20 10:06:25 UTC
Confirmed fixed in Plasma 6.1 - thank you!