| Summary: | Double-click on task manager button at the edge of screen initiates drag&drop | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | equeim |
| Component: | Task Manager and Icons-Only Task Manager widgets | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | kdedev, nate, qydwhotmail |
| Priority: | NOR | ||
| Version First Reported In: | 6.3.3 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/eebc758c28189a791c396b996017ae62010f0d36 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Video of the issue | ||
Cannot reproduce the issue on git master. Does it happen in a new clean user account, with the default panel moved to that screen position? I see what's happening in the video. I also can't reproduce this on git-master Ok, let's call it fixed in 6.4, then! (In reply to Nate Graham from comment #1) > Cannot reproduce the issue on git master. > > Does it happen in a new clean user account, with the default panel moved to > that screen position? Yes, though for some reason the issue only reproducible when panel is on top or to the left. With my current configuration it is present with all four panel positions. BTW Plasma froze the first time I entered edit mode (I didn't see anything suspicious in logs though). I'm still seeing this issue on Plasma 6.4.0 I tested with a top panel on git-master and I am able to reproduce it, exactly as in the video Hmm, I still can't reproduce this, even with a top panel. Notably, my scale factor is 175%. What settings let you reproduce it, Tracey? (In reply to Nate Graham from comment #7) > Hmm, I still can't reproduce this, even with a top panel. Notably, my scale > factor is 175%. What settings let you reproduce it, Tracey? I can reproduce with the icons only task manager on a Lenovo Flex, native resolution of 1920 x 1080 (16:9) @ 100% Panel is set to top, center, fill width, always visible, not floating Also reproduced on a Dell XPS 17 with icons-and-text task manager on an external monitor, native resolution of 3440 x 1440 (21:9) @ 100% and at 125% Panel is set to top, center, custom width, always visible, not floating How odd; still can't reproduce the issue with settings as close to those as possible. I wonder if this is a variant of Bug 500293, which I'll notice just got fixed upstream in Qt. Ok I think I found the cause after a couple of hours of debugging. This piece of code: https://invent.kde.org/plasma/plasma-workspace/-/blob/v6.5.4/shell/panelview.cpp?ref_type=tags#L1246 should also run for QEvent::MouseButtonDblClick. The reason is that when it adjusts event position for MouseButtonPress, but not for follow-up MouseButtonDblClick, Qt sees the delta between two events and triggers drag. Specifically, it happens here: https://github.com/qt/qtdeclarative/blob/22fb5e739a2ea700448b22d34ade0d5c1927cb48/src/quick/handlers/qquickdraghandler.cpp#L243. On my system accumulatedDragDelta's y ends up being 12 (because m_topPadding in PanelView is 12), even though I didn't move the mouse. This is greater than the threshold which is 10. Nice, would you like to submit a patch to fix it? A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6113 A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6113 Git commit eebc758c28189a791c396b996017ae62010f0d36 by Alexey Rochev. Committed on 19/12/2025 at 22:50. Pushed by davidedmundson into branch 'master'. Fix drag being initiated by double click on a panel item when cursor is on the edge of a screen We need to adjust the position of QEvent::MouseButtonDblClick too. QGuiApplication synthetizes QEvent::MouseButtonDblClick after QEvent::MouseButtonPress which Qt Quick's DragHandler also receives. If QEvent::MouseButtonDblClick's positions is not adjusted DragHandler will see the difference between QEventPoint's scenePosition and scenePressPosition (which seems to be taken from previous QEvent::MouseButtonPress?), and initiate drag. M +2 -1 shell/panelview.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/eebc758c28189a791c396b996017ae62010f0d36 |
Created attachment 179678 [details] Video of the issue SUMMARY Double-click on task manager button at the edge of screen initiates drag&drop. Video of the issue is attached. STEPS TO REPRODUCE 1. Place cursor over window button on the panel at the right edge of screen 2. Double click on it OBSERVED RESULT Drag&drop is initiated and immediately cancelled, window is minimized/unminimized once EXPECTED RESULT Window is minimized and then unminimized (or other way around) SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed 20250319 KDE Plasma Version: 6.3.3 KDE Frameworks Version: 6.12.0 Qt Version: 6.8.2 ADDITIONAL INFORMATION I use Plasma Wayland, with 100% monitor scaling. When clicking on window button *not* at the edge of the screen (i.e. in the middle of the button) the issue is not present and expected result is observed.