aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island/ObsPill.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/island/ObsPill.qml')
-rw-r--r--desktop/island/ObsPill.qml15
1 files changed, 14 insertions, 1 deletions
diff --git a/desktop/island/ObsPill.qml b/desktop/island/ObsPill.qml
index 6ae9b4e..3fdb4a3 100644
--- a/desktop/island/ObsPill.qml
+++ b/desktop/island/ObsPill.qml
@@ -27,6 +27,12 @@ Capsule {
panelWidth: 260
panelHeight: controls.implicitHeight + 28
+ // A scene whose only source is a PipeWire capture is the window scene.
+ // ponytail: a window scene with more than one source needs a per-scene
+ // designation instead of this count.
+ readonly property bool windowOnly: Obs.sources.length === 1
+ && Obs.sources[0].kind === "pipewire-screen-capture-source"
+
Row {
id: rest
anchors.centerIn: parent
@@ -93,7 +99,7 @@ Capsule {
Row {
spacing: 8
- visible: Obs.camId >= 0 || Obs.desktopAudio !== ""
+ visible: Obs.camId >= 0 || Obs.desktopAudio !== "" || pill.windowOnly
Button {
visible: Obs.camId >= 0
icon: Obs.camOn ? "\udb81\udd67" : "\udb81\udd68"
@@ -106,6 +112,13 @@ Capsule {
text: "Audio"
onClicked: Obs.toggleAudio()
}
+ // OBS's source dialog, where the Wayland portal window picker runs.
+ Button {
+ visible: pill.windowOnly
+ icon: "\uf2d0"
+ text: "Window"
+ onClicked: Obs.openSource(Obs.sources[0].name)
+ }
}
// The webcam's four corners on the recorded canvas.