Bug 468361

Summary: In VLC- and SMPlayer-based apps, "Drag windows from empty areas" feature of Breeze makes the cursor or window teleport to another location
Product: [Plasma] Breeze Reporter: Benjamin <mendicant.bias>
Component: QStyleAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: normal CC: nate, nicolas.fella, noahadvs, report.bug, uhhadd, virtuousfox
Priority: NOR    
Version: 5.27.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Window jumps when trying to move/drag from empty area

Description Benjamin 2023-04-10 17:26:12 UTC
Created attachment 157999 [details]
Window jumps when trying to move/drag from empty area

SUMMARY
***
The "Drag windows from all empty areas"-feature has a bug in the Breeze application theme, making the window (in older versions, the mouse pointer) jump to an arbitrary location for certain applications.
***


STEPS TO REPRODUCE
1. Install Kubuntu 22.10
2. Install VLC Media Player with `sudo apt install vlc`
3. Play any video in VLC Media Player (Important: You have to play a video. The bug does not reproduce if the video layer has never been initialized)
4. Click the left mouse button on any empty area and drag. The window (Previously on Ubuntu 22.04 LTS: Mouse pointer) will jump to another location

OBSERVED RESULT

The window (or mouse pointer) will jump to an arbitrary location.

EXPECTED RESULT

A window move/drag operation is initiated, the window is moved according to the user's mouse input.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.10
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION

- This bug has now been introduced into the Oxygen theme as well, which was previously unaffected. I was able to track down the bug to commit https://invent.kde.org/plasma/oxygen/-/commit/7bf1bc7f4003b266ffbb33c20eb0c46d9ce265b3 (`7bf1bc7f4003b266ffbb33c20eb0c46d9ce265b3`  "Use QWindow::startSystemMove() Instead of low-level X11/Wayland code")
- This happens primarily with video players after they started playing a video. I.e. VLC, SMPlayer, etc.
- An in-depth analysis for SMPlayer can be found here: https://github.com/smplayer-dev/smplayer/issues/272
- The bug has to do with `winId()` and native widgets
- The bug frustrates users and causes them to file bugs in the application's issue tracker, as they are unaware that this is caused by a theme
Comment 1 Bug Janitor Service 2023-04-10 17:34:35 UTC
Thank you for the bug report!

However Plasma 5.25.5 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.5, 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 Benjamin 2023-04-10 19:39:43 UTC
I installed a fresh Arch Linux with KDE. It still happens, for both Breeze and in this version also Oxygen.

KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.8
Kernel Version: 6.2.10-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 3 Nate Graham 2023-04-10 20:07:30 UTC
Yeah, VLC is also affected: https://code.videolan.org/videolan/vlc/-/issues/27494.

It could indeed be a Breeze theme bug.
Comment 4 Benjamin 2023-04-10 22:11:15 UTC
It is definitely caused by the specific application style implementation and it can be patched out of the application style. Back when the Oxygen application style used low-level X11/Wayland code for moving the window, this bug did not exist (see above for the exact commit that introduced the bug). But that means, the bug might even be deeper down, perhaps in the `QWindow::startSystemMove()` implementation, hence, in the Qt library.
Comment 5 Harald Sitter 2024-06-03 08:55:05 UTC
*** Bug 487846 has been marked as a duplicate of this bug. ***