Bug 444680

Summary: Right clicking on header shows file context-menu instead of column role context-menu
Product: [Applications] dolphin Reporter: Tom Lin <tom91136>
Component: view-engine: details modeAssignee: Tom Lin <tom91136>
Status: RESOLVED FIXED    
Severity: normal CC: kfm-devel, tom91136
Priority: NOR    
Version: 21.08.2   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 22.04

Description Tom Lin 2021-10-30 19:52:41 UTC
SUMMARY

In details view, if a highlighted item is directly behind (obstructed by) the header, right-clicking in the header within the obstructed highlight rect will trigger the item's context-menu and not the header's.

STEPS TO REPRODUCE
1. Toggle details view and navigate to some location that allows scrolling.
2. Highlight any item and scroll the panel such that the highlighted item gets covered by the header.
3. Right click on the header at the covered item's *highlighted* rectangular region. Note that this only occurs in the highlight rect, and not anywhere in the row.

OBSERVED RESULT

The context-menu of the selected item gets triggered.

EXPECTED RESULT

The header's role configuration menu (the menu to show/hide columns, etc.) should be triggered.

This is reproducible in both 21.08.2 and 21.08.0, I have not tested this on any other version yet.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Tom Lin 2021-10-30 19:59:03 UTC
Testing a bit more, it's not necessary to highlight anything.
The bug occurs if you simply right-click on the header in a location that needs scrolling. Essentially, file item's text (and not the entire row) rect hit check was done before the header's so the click events gets swallowed.
Comment 2 Tom Lin 2021-10-30 20:01:26 UTC
This issue is most obvious if https://invent.kde.org/system/dolphin/-/merge_requests/278 gets merged, I've added a fix in that MR for now.
Comment 3 Felix Ernst 2022-01-16 14:01:45 UTC
Git commit d3839617193e92463806580699caa595c892b8a6 by Felix Ernst, on behalf of Tom Lin.
Committed on 16/01/2022 at 14:01.
Pushed by felixernst into branch 'master'.

Full row highlight implementation

This commit implements full-row selection and hover highlights for the
details view mode.

This commit also contains fixes for 444680, 444753, both uncovered
during this change.
Related: bug 181438, bug 444753
FIXED-IN: 22.04

M  +143  -36   src/kitemviews/kitemlistcontroller.cpp
M  +16   -0    src/kitemviews/kitemlistheader.cpp
M  +9    -0    src/kitemviews/kitemlistheader.h
M  +51   -5    src/kitemviews/kitemlistview.cpp
M  +11   -0    src/kitemviews/kitemlistview.h
M  +32   -0    src/kitemviews/kitemlistwidget.cpp
M  +10   -1    src/kitemviews/kitemlistwidget.h
M  +4    -0    src/kitemviews/kstandarditemlistview.cpp
M  +42   -10   src/kitemviews/kstandarditemlistwidget.cpp
M  +6    -0    src/kitemviews/kstandarditemlistwidget.h
M  +92   -34   src/kitemviews/private/kitemlistheaderwidget.cpp
M  +15   -0    src/kitemviews/private/kitemlistheaderwidget.h
M  +4    -0    src/settings/dolphin_detailsmodesettings.kcfg
M  +1    -0    src/views/dolphinitemlistview.cpp
M  +17   -0    src/views/dolphinview.cpp
M  +1    -0    src/views/dolphinview.h

https://invent.kde.org/system/dolphin/commit/d3839617193e92463806580699caa595c892b8a6