summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-09-21 14:39:25 +0100
committervaxerski <vaxry@vaxry.net>2022-09-21 14:39:34 +0100
commit79c645f8cd42a389d3a8e6532b1928499d53dcb0 (patch)
treebfe7a2310c9940cc70208a0f4beeda13fd51a173 /src/debug/HyprCtl.cpp
parentd44cc9f112b3162263304c4077d6cb2a97f55715 (diff)
handle touch devices internally as objects
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 62437dcf..5bcd392c 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -382,6 +382,23 @@ R"#( {
}
// remove trailing comma
+ result.pop_back();
+ result += "\n],\n";
+
+ result += "\"touch\": [\n";
+
+ for (auto& d : g_pInputManager->m_lTouchDevices) {
+ result += getFormat(
+R"#( {
+ "address": "0x%x",
+ "name": "%s"
+ },)#",
+ &d,
+ d.pWlrDevice ? d.pWlrDevice->name : ""
+ );
+ }
+
+ // remove trailing comma
if (result[result.size() - 1] == ',')
result.pop_back();
result += "\n]\n";
@@ -415,6 +432,12 @@ R"#( {
for (auto& d : g_pInputManager->m_lTabletTools) {
result += getFormat("\tTablet Tool at %x (belongs to %x)\n", &d, d.wlrTabletTool ? d.wlrTabletTool->data : 0);
}
+
+ result += "\n\nTouch:\n";
+
+ for (auto& d : g_pInputManager->m_lTouchDevices) {
+ result += getFormat("\tTouch Device at %x:\n\t\t%s\n", &d, d.pWlrDevice ? d.pWlrDevice->name : "");
+ }
}
return result;