Bug 487219

Summary: Process table in the background moves when dragging an item in the 'Configure Columns' modal overlay in the foreground
Product: [Applications] plasma-systemmonitor Reporter: igloo.havoc-0k
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: ahiemstra, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 6.0.4   
Target Milestone: ---   
Platform: KaOS   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=499303
Latest Commit: Version Fixed In: 6.3.0
Sentry Crash Report:
Attachments: Screenshot showing the background moving when dragging an item in the foreground

Description igloo.havoc-0k 2024-05-19 06:13:04 UTC
Created attachment 169607 [details]
Screenshot showing the background moving when dragging an item in the foreground

SUMMARY
Drag events are captured by the underlying process list in 'Configure columns...' when the drag handles fall above the process list table instead of overlapping the sidebar.

STEPS TO REPRODUCE
1. Open System Monitor.
2. Maximize the window.
3. Switch to the 'Processes' pane.
4. Click 'Configure columns...' in the toolbar.
5. Try to drag an item in the list to change the order.

OBSERVED RESULT
The table in the background moves instead of the item that is being dragged. It is not possible to drag the items in the foreground.

EXPECTED RESULT
The item in the foreground would move when dragging by its drag handle.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
This appears to happen when the drag handles in the foreground list sit above the process table in the background. When initially opening the window, the drag handles are usually placed just slightly overlapping the sidebar, which allows them to be dragged. When maximizing the window or making it wider, they no longer sit above the sidebar and the drag events are captured by the table in the background.
Comment 1 Arjen Hiemstra 2024-05-28 13:19:32 UTC
This is ultimately an upstream bug, I've filed https://bugreports.qt.io/browse/QTBUG-125867 for it. 

However, I've also found a fairly simple workaround so I'll make a merge request for that as well.
Comment 2 Bug Janitor Service 2025-01-30 14:11:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/338
Comment 3 David Redondo 2025-02-04 07:50:48 UTC
Git commit 8d6f9db638fc1dfb8a2f7fc9bb1bb9007698b68e by David Redondo.
Committed on 30/01/2025 at 14:03.
Pushed by davidre into branch 'master'.

Set interactive of TableView and page flickable to false

SelectionRectangle has a weird interaction where it can intercept
mouse events when it shouldn't (QTBUG-125867) for some reason
setting the flickables to not be interactive works around this.
This should have no other effect because we are in scrollviews that
manage touch and scrolling.
Related: bug 499303

M  +6    -0    src/page/EditablePage.qml
M  +1    -0    src/table/BaseTableView.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/8d6f9db638fc1dfb8a2f7fc9bb1bb9007698b68e
Comment 4 David Redondo 2025-02-04 08:05:21 UTC
Git commit d7eb442830f6b8236c0d66d10b71ae3a0f39201e by David Redondo.
Committed on 04/02/2025 at 08:01.
Pushed by davidre into branch 'Plasma/6.3'.

Set interactive of TableView and page flickable to false

SelectionRectangle has a weird interaction where it can intercept
mouse events when it shouldn't (QTBUG-125867) for some reason
setting the flickables to not be interactive works around this.
This should have no other effect because we are in scrollviews that
manage touch and scrolling.
Related: bug 499303


(cherry picked from commit 8d6f9db638fc1dfb8a2f7fc9bb1bb9007698b68e)

Co-authored-by: David Redondo <kde@david-redondo.de>

M  +6    -0    src/page/EditablePage.qml
M  +1    -0    src/table/BaseTableView.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/d7eb442830f6b8236c0d66d10b71ae3a0f39201e