summaryrefslogtreecommitdiff
path: root/popups/launcher/components
diff options
context:
space:
mode:
Diffstat (limited to 'popups/launcher/components')
-rw-r--r--popups/launcher/components/App.qml12
-rw-r--r--popups/launcher/components/Clip.qml14
-rw-r--r--popups/launcher/components/IComponent.qml4
3 files changed, 16 insertions, 14 deletions
diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml
index 89f3611..a44b2ec 100644
--- a/popups/launcher/components/App.qml
+++ b/popups/launcher/components/App.qml
@@ -111,6 +111,13 @@ IComponent {
syncSelectionState: function () {
Qt.callLater(() => {
+ if (!isSelectedPriority()) {
+ if (state.selected === listView.itemAtIndex(selectedIndex))
+ state.selected = null;
+
+ return;
+ }
+
if (selectedIndex < 0 || selectedIndex >= listView.count || !root.visible)
return;
@@ -119,11 +126,6 @@ IComponent {
});
}
- onLeave: {
- if (state.selected === listView.itemAtIndex(selectedIndex))
- state.selected = null;
- }
-
IInnerComponent {
id: layout
fromParent: false
diff --git a/popups/launcher/components/Clip.qml b/popups/launcher/components/Clip.qml
index 418ced7..ab2721f 100644
--- a/popups/launcher/components/Clip.qml
+++ b/popups/launcher/components/Clip.qml
@@ -73,6 +73,14 @@ IComponent {
syncSelectionState: function () {
Qt.callLater(() => {
+ if (!isSelectedPriority()) {
+ // TODO: fix sometimes
+ if (state.selected && state.selected === listView.itemAtIndex(selectedIndex))
+ state.selected = null;
+
+ return;
+ }
+
if (!root.visible || selectedIndex < 0 || selectedIndex >= listView.count)
return;
@@ -81,12 +89,6 @@ IComponent {
});
}
- onLeave: {
- // TODO: fix sometimes
- if (state.selected && state.selected === listView.itemAtIndex(selectedIndex))
- state.selected = null;
- }
-
IInnerComponent {
id: layout
fromParent: false
diff --git a/popups/launcher/components/IComponent.qml b/popups/launcher/components/IComponent.qml
index 70d2576..90c3ab8 100644
--- a/popups/launcher/components/IComponent.qml
+++ b/popups/launcher/components/IComponent.qml
@@ -66,8 +66,6 @@ IRect {
})
signal close
- // SAFETY: implementer should include safety checks
- signal leave
function _exec() {
if (!exec())
@@ -129,7 +127,7 @@ IRect {
if (hovered)
root.trySetSelfPriority();
else
- root.leave();
+ root.syncSelectionState();
}
}