summaryrefslogtreecommitdiff
path: root/modules/bar/popouts/Wrapper.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bar/popouts/Wrapper.qml')
-rw-r--r--modules/bar/popouts/Wrapper.qml22
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/bar/popouts/Wrapper.qml b/modules/bar/popouts/Wrapper.qml
index 293f9d5..9a7f7c1 100644
--- a/modules/bar/popouts/Wrapper.qml
+++ b/modules/bar/popouts/Wrapper.qml
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import qs.services
import qs.config
import qs.modules.windowinfo
+import qs.modules.detachedcontent
import Quickshell
import Quickshell.Wayland
import Quickshell.Hyprland
@@ -21,6 +22,7 @@ Item {
property bool hasCurrent
property string detachedMode
+ property string queuedMode
readonly property bool isDetached: detachedMode.length > 0
property int animLength: Appearance.anim.durations.normal
@@ -28,7 +30,12 @@ Item {
function detach(mode: string): void {
animLength = Appearance.anim.durations.large;
- detachedMode = mode;
+ if (mode === "winfo") {
+ detachedMode = mode;
+ } else {
+ detachedMode = "any";
+ queuedMode = mode;
+ }
focus = true;
}
@@ -86,6 +93,19 @@ Item {
}
}
+ Comp {
+ id: detachedContent
+
+ shouldBeActive: root.detachedMode === "any"
+ asynchronous: true
+ anchors.centerIn: parent
+
+ sourceComponent: DetachedContent {
+ screen: root.screen
+ active: root.queuedMode
+ }
+ }
+
Behavior on x {
Anim {
duration: root.animLength