diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 10:55:22 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 10:55:22 +0800 |
| commit | 79a735dd9d4a02d40b4a1ec925aa1f6d5b8a6f4e (patch) | |
| tree | ce33d2cb29a91ad9b5536ebe251279703fa7f315 /bar | |
| parent | 939f2e5fdcbccf3148e081934e33d9e27c5af399 (diff) | |
activewindow: fix startup no activewindow until refocused
Diffstat (limited to 'bar')
| -rw-r--r-- | bar/ActiveWindow.qml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml index e892344..405643c 100644 --- a/bar/ActiveWindow.qml +++ b/bar/ActiveWindow.qml @@ -1,7 +1,6 @@ import QtQuick import QtQuick.Layouts import Quickshell -import Quickshell.Hyprland import Quickshell.Wayland import Quickshell.Widgets import qs.components @@ -10,10 +9,11 @@ import qs.config // TODO use a item wrapping loader for opacity Behavior Rectangle { id: root - property var toplevel: Hyprland.activeToplevel - property var icon: Quickshell.iconPath(AppSearch.guessIcon(toplevel?.wayland?.appId), "image-missing") + // hyprland toplevel isn't shown immediately... + property var toplevel: ToplevelManager.activeToplevel + property var icon: Quickshell.iconPath(AppSearch.guessIcon(toplevel?.appId), "image-missing") - property var activated: ToplevelManager.activeToplevel?.activated || false + property var activated: toplevel?.activated || false // use IRect implicitWidth: activated ? rowLayout.implicitWidth + General.rectMargin * 4 : 0 @@ -61,7 +61,7 @@ Rectangle { IText { animate: true font.pixelSize: General.fontSize - text: strip(root?.toplevel?.wayland?.title) || "" + text: strip(root?.toplevel?.title) || "" // sync animation opacity: root.activated ? 1 : 0 |
