summaryrefslogtreecommitdiff
path: root/src/managers/input/Tablets.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-30 21:26:00 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-30 21:26:00 +0200
commitd010ca20492c7638d15690e888d80c6020685df1 (patch)
treea5f6ea02252fb8bddf00970f6b1a6349dd1e7537 /src/managers/input/Tablets.cpp
parent4510764f348d1a7c4cca613925ee22acfa38b388 (diff)
added per-device config options
Diffstat (limited to 'src/managers/input/Tablets.cpp')
-rw-r--r--src/managers/input/Tablets.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp
index 4285d06b..6a62e58e 100644
--- a/src/managers/input/Tablets.cpp
+++ b/src/managers/input/Tablets.cpp
@@ -4,6 +4,12 @@
void CInputManager::newTabletTool(wlr_input_device* pDevice) {
const auto PNEWTABLET = &m_lTablets.emplace_back();
+ try {
+ PNEWTABLET->name = std::string(pDevice->name);
+ } catch (std::exception& e) {
+ Debug::log(ERR, "Tablet had no name???"); // logic error
+ }
+
PNEWTABLET->wlrTablet = pDevice->tablet;
PNEWTABLET->wlrDevice = pDevice;
PNEWTABLET->wlrTabletV2 = wlr_tablet_create(g_pCompositor->m_sWLRTabletManager, g_pCompositor->m_sSeat.seat, pDevice);
@@ -151,6 +157,12 @@ STabletTool* CInputManager::ensureTabletToolPresent(wlr_tablet_tool* pTool) {
void CInputManager::newTabletPad(wlr_input_device* pDevice) {
const auto PNEWPAD = &m_lTabletPads.emplace_back();
+ try {
+ PNEWPAD->name = std::string(pDevice->name);
+ } catch (std::exception& e) {
+ Debug::log(ERR, "Pad had no name???"); // logic error
+ }
+
PNEWPAD->wlrTabletPadV2 = wlr_tablet_pad_create(g_pCompositor->m_sWLRTabletManager, g_pCompositor->m_sSeat.seat, pDevice);
PNEWPAD->hyprListener_Button.initCallback(&pDevice->tablet_pad->events.button, [](void* owner, void* data) {