summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-07-29 16:27:09 +0200
committerVaxry <vaxry@vaxry.net>2024-07-29 16:27:09 +0200
commit23a8f06594fd75580ddb6115c78812d3e3d6c57f (patch)
tree44089ff8109c54c18d6df1f8aef73bfe2ad793c3 /src/devices
parent70468857da2e64c35c7e79b7e63bff04e56e3be5 (diff)
virtualptr: allow binding to output
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/IPointer.hpp3
-rw-r--r--src/devices/VirtualPointer.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/IPointer.hpp b/src/devices/IPointer.hpp
index 5df47c04..760ec8dc 100644
--- a/src/devices/IPointer.hpp
+++ b/src/devices/IPointer.hpp
@@ -106,7 +106,8 @@ class IPointer : public IHID {
} pointerEvents;
std::string hlName;
- bool connected = false; // means connected to the cursor
+ bool connected = false; // means connected to the cursor
+ std::string boundOutput = "";
WP<IPointer> self;
};
diff --git a/src/devices/VirtualPointer.cpp b/src/devices/VirtualPointer.cpp
index f9a1c409..9223ebe1 100644
--- a/src/devices/VirtualPointer.cpp
+++ b/src/devices/VirtualPointer.cpp
@@ -38,6 +38,8 @@ CVirtualPointer::CVirtualPointer(SP<CVirtualPointerV1Resource> resource) : point
listeners.holdBegin = pointer->events.holdBegin.registerListener([this](std::any d) { pointerEvents.holdBegin.emit(d); });
listeners.holdEnd = pointer->events.holdEnd.registerListener([this](std::any d) { pointerEvents.holdEnd.emit(d); });
+ boundOutput = resource->boundOutput ? resource->boundOutput->szName : "auto";
+
deviceName = pointer->name;
}