As a result of refactorings in 5.10, hoveredItem may not reflect the
true cursor position when preview popups become involved. When inter-
acting with an item's associated preview popup, it's still considered
hovered. This needs to be taken into account when processing clicks,
otherwise corrupted mouse state leads e.g. to inadvertendly opening
a folder by clicking outside its preview popup to dismiss it.
BUG:380982
Details
- Reviewers
broulik - Group Reviewers
Plasma - Commits
- R119:20bf7ec11458: Fix clicking outside of preview popups to dismiss them corrupting mouse state
Diff Detail
- Repository
- R119 Plasma Desktop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
containments/desktop/package/contents/ui/FolderItemDelegate.qml | ||
---|---|---|
119–120 | This check is now superfluous as it's also done in closePopup() |
containments/desktop/package/contents/ui/FolderItemDelegate.qml | ||
---|---|---|
119–120 | Yeah, but it's minutely faster to check this than do a function call (and the dialog not being open is the common case), it's a little more careful to assume a function body doesn't check, and the function does check because it's just good practice, ... it's redundant but I'd leave it like that. |
Hover state is reset fine but now the action buttons don't reappear after the popup is closed unless I start dragging the folder. Just selecting and unselecting does not help, I really need to start a drag (perhaps you break some binding in the delegate?)
1.) Click "popup" button on top left of folder
2.) Click outside of popup so it closes, with this patch the folder is no longer highlighted (which is good)
3.) Hover the folder → the action buttons in the top left of the folder don't show anymore, they still work on other folders. So some state still isn't correctly reset.
- Don't break the popupDialog binding. It's a super binding, really, and this patch didn't know how to appreciate it properly.
- Opening the popup should imply selecting, it avoids other state weirdness in double-click-to-open mode.