Summary: | Screen/Window selection dialog reacts poorly to double click | ||
---|---|---|---|
Product: | [Plasma] xdg-desktop-portal-kde | Reporter: | Nicolas Fella <nicolas.fella> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aleixpol, jgrulich, nate, sitter |
Priority: | NOR | ||
Version: | git-master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/35cca308efb3ab9649dffa9fd9c969d535f9aa3e | Version Fixed In: | 5.26 |
Sentry Crash Report: |
Description
Nicolas Fella
2022-03-07 13:50:01 UTC
For me, when the list has a single item, it is selected by default, so the share button is enabled. Do you have multiple screens? In that case, we don't pre-select anything. Regardless, I can reproduce the double-click issue. An easy way to test multiscreen if you don't have one is using something like: $ krfb-virtualmonitor --name "a" --password "banana123" --resolution 1000x1000 --port 2299 It will create a virtual monitor as if you just connected one. This is really odd. The model seems to support multi-select but the view does not. Indeed I believe our problems would go away if multiselect wasn't a thing - remove m_selectedRows and instead make it a single toggle that tracks the view's currentindex? @Aleix what do you reckon? So I've investigated this and found out the issue. The problem is that we are using onClicked because onToggled isn't available. As we can see on AbstractListItem.qml: //NOTE: This must stay at 2.0 until KF6 due to retrocompatibility of the "icon" property import QtQuick.Templates 2.0 as T2 And with onClicked we have less control over how to react to double clicks which means we just do it poorly. I will try and see what would be a good compromise for the moment. A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/123 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/608 Git commit 1b19825b534c523cd7958e35e6338f0661309c13 by Aleix Pol. Committed on 19/07/2022 at 17:54. Pushed by apol into branch 'master'. Try to depend on the newer QQC2 version possible The first Qt Quick Controls 2 that supports AbstractButton.icon is 2.3, so just depend on 2.2. This allows us to have onToggled available which allows us to better handle double click cases on togglable delegates. M +2 -2 src/controls/templates/AbstractListItem.qml https://invent.kde.org/frameworks/kirigami/commit/1b19825b534c523cd7958e35e6338f0661309c13 Git commit 35cca308efb3ab9649dffa9fd9c969d535f9aa3e by Aleix Pol. Committed on 19/07/2022 at 17:58. Pushed by apol into branch 'master'. ScreenChooser: Better support handling double-clicked delegates By using AbstractButton.onToggled instead of .onClicked. M +4 -2 src/ScreenChooserDialog.qml https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/35cca308efb3ab9649dffa9fd9c969d535f9aa3e |