summaryrefslogtreecommitdiff
path: root/popups/launcher/components/IComponent.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-08-23 11:59:36 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-08-23 11:59:59 +0800
commit04d4670f933431f5deaad4b2045baeccc2a4494e (patch)
tree0b3a065a7391c6df5a39e2c0bbd3324674743556 /popups/launcher/components/IComponent.qml
parenta41ab9ad95b4f8e053af82741a45f747e77ff37a (diff)
fix: don't set priority to -1 when indexOf returns that
Diffstat (limited to 'popups/launcher/components/IComponent.qml')
-rw-r--r--popups/launcher/components/IComponent.qml20
1 files changed, 14 insertions, 6 deletions
diff --git a/popups/launcher/components/IComponent.qml b/popups/launcher/components/IComponent.qml
index 4333998..e06ed98 100644
--- a/popups/launcher/components/IComponent.qml
+++ b/popups/launcher/components/IComponent.qml
@@ -64,6 +64,13 @@ IRect {
return state.priorities.indexOf(root);
}
+ function trySetSelfPriority() {
+ let self = getSelfPriority();
+ // ??? why tf is it -1 not null or undefined this is why rust is better
+ if (self !== -1)
+ state.selectedPriority = self;
+ }
+
// this doesn't change launcher size but only hides the actual content but the outside still think the content is there
visible: active
opacity: valid ? 1 : 0
@@ -98,13 +105,14 @@ IRect {
HoverHandler {
onHoveredChanged: {
if (hovered)
- root.state.selectedPriority = root.getSelfPriority();
+ root.trySetSelfPriority();
}
}
- Component.onCompleted: {
- Qt.callLater(() => {
- syncSelectionState();
- });
- }
+ // causes all of them fighting for selection state
+ // Component.onCompleted: {
+ // Qt.callLater(() => {
+ // syncSelectionState();
+ // });
+ // }
}