Bug 478311 - When dragging window using touchscreen with Wobbly Windows effect enabled, window wobbling focal point is equal to where the pointer was, not where the finger is
Summary: When dragging window using touchscreen with Wobbly Windows effect enabled, wi...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.27.9
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-09 16:57 UTC by hch12907
Modified: 2024-09-08 20:52 UTC (History)
1 user (show)

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


Attachments
Video showcasing the bug (2.67 MB, video/mp4)
2023-12-09 16:57 UTC, hch12907
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hch12907 2023-12-09 16:57:51 UTC
Created attachment 164043 [details]
Video showcasing the bug

SUMMARY
When Wobbly Windows is enabled and a window is dragged, the corner where the mouse pointer is located will be skewed/wobbled the most, while the opposite corner will remain mostly rigid. The first 10 seconds of the attached video showcases the intended behaviour.

However, when I move a window by touch, it appears that Wobbly Windows thinks this window-dragging originated from the mouse pointer. Starting from 00:13, I am moving the top right corner of the window by touch, but the most skewed corner is actually the top left corner because that's where the cursor is at.

STEPS TO REPRODUCE
1. Enable the "Wobbly Windows" effect.
2. Start dragging the window title by touch.
3. Feel the unnaturalness of the wobble effect.

OBSERVED RESULT
The Wobbly Windows effect never took touch-dragging into account.

EXPECTED RESULT
It should take touch-dragging of windows into account.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.3-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Although I am on KDE Plasma 6.0 right now, this bug can actually be observed on Plasma 5.x as well.
Comment 1 Bug Janitor Service 2023-12-09 17:33:55 UTC
Thank you for the bug report!

However Plasma 5.25.90 is no longer eligible for support or maintenance from KDE; supported versions are 5.27, and 5.27 or newer. Please upgrade to a supported version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one.

If you need support for Plasma 5.25.90, please contact your distribution, who bears the responsibility of providing support for older releases that are no longer supported by KDE.

If you can reproduce the issue after upgrading to a supported version, feel free to re-open this bug report.
Comment 2 hch12907 2023-12-09 17:48:24 UTC
Oops, chose the wrong version.
Comment 3 Nate Graham 2023-12-11 22:41:51 UTC
Can reproduce.
Comment 4 ratijas 2024-01-17 17:11:17 UTC
The Wobly Window effect uses the cursor position, indeed:

> Pair picked = {static_cast<qreal>(cursorPos().x()), static_cast<qreal>(cursorPos().y())};

https://invent.kde.org/plasma/kwin/-/blob/e963ae09cc33be31e818a8ca0a1faacc3ef158f5/src/plugins/wobblywindows/wobblywindows.cpp#L417

Not sure why it does not update for touch input before executing effect's code, so the least I can do is leave the link here.

FWIW it seems to behave well on 5.27.5 on a Steam Deck. Might be a regression then? I don't think I can test KWin 6 on a touch screen any time soon.

Or maybe it's a Wayland thing. Can you confirm if the bug is present for you on X11?
Comment 5 Nate Graham 2024-01-18 21:24:30 UTC
On X11 touching the screen teleports the cursor there, so I'd imagine not.
Comment 6 hch12907 2024-01-25 10:48:01 UTC
It indeed doesn't reproduce on X11, but I like how the cursor position is separated from touchpoint on Wayland and would love to see it kept.
Comment 7 Vlad Zahorodnii 2024-01-25 12:35:40 UTC
Yeah it needs fixing