summaryrefslogtreecommitdiff
path: root/src/events/Devices.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-09 21:54:10 +0200
committerGitHub <noreply@github.com>2022-06-09 21:54:10 +0200
commitb5a446ddfd1ecdae27f44b610acb33578d9ec5e3 (patch)
treebe6586699337ca033477c3e3861060fc30472dbb /src/events/Devices.cpp
parent248ce664593feddd84d6897ae6b40a3a5fa145c0 (diff)
parentfbc78534599f3129b11899795ba3d099eae4c5fd (diff)
Merge pull request #177 from vaxerski/tablets
Added Tablets support
Diffstat (limited to 'src/events/Devices.cpp')
-rw-r--r--src/events/Devices.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/events/Devices.cpp b/src/events/Devices.cpp
index 89443af2..7a47df77 100644
--- a/src/events/Devices.cpp
+++ b/src/events/Devices.cpp
@@ -2,7 +2,7 @@
#include "../Compositor.hpp"
#include "../helpers/WLClasses.hpp"
-#include "../managers/InputManager.hpp"
+#include "../managers/input/InputManager.hpp"
#include "../render/Renderer.hpp"
// ---------------------------------------------------- //
@@ -78,14 +78,20 @@ void Events::listener_newInput(wl_listener* listener, void* data) {
Debug::log(WARN, "!!!! Hyprland does not directly support touchscreens, bugs may occur !!!!");
wlr_cursor_attach_input_device(g_pCompositor->m_sWLRCursor, DEVICE);
break;
+ case WLR_INPUT_DEVICE_TABLET_TOOL:
+ Debug::log(LOG, "Attached a tablet tool with name %s", DEVICE->name);
+ g_pInputManager->newTabletTool(DEVICE);
+ break;
+ case WLR_INPUT_DEVICE_TABLET_PAD:
+ Debug::log(LOG, "Attached a tablet pad with name %s", DEVICE->name);
+ g_pInputManager->newTabletPad(DEVICE);
+ break;
default:
Debug::log(WARN, "Unrecognized input device plugged in: %s", DEVICE->name);
break;
}
- uint32_t capabilities = WL_SEAT_CAPABILITY_POINTER | WL_SEAT_CAPABILITY_KEYBOARD;
-
- wlr_seat_set_capabilities(g_pCompositor->m_sSeat.seat, capabilities);
+ g_pInputManager->updateCapabilities(DEVICE);
}
void Events::listener_newConstraint(wl_listener* listener, void* data) {