diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-08-07 21:17:03 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-08-07 21:17:03 +0200 |
| commit | d64227e7c7fb706974539f359abe1dd50eb19c34 (patch) | |
| tree | 954ee7d6c4ba239b3bb8efc9582e3a0987e5ec10 /src/events/Devices.cpp | |
| parent | 3a8dcf284aa3953585e3f700afa1095903c3a65f (diff) | |
added basic touch controls
Diffstat (limited to 'src/events/Devices.cpp')
| -rw-r--r-- | src/events/Devices.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/events/Devices.cpp b/src/events/Devices.cpp index b29d0dbc..7ec94435 100644 --- a/src/events/Devices.cpp +++ b/src/events/Devices.cpp @@ -72,7 +72,6 @@ void Events::listener_newInput(wl_listener* listener, void* data) { break; case WLR_INPUT_DEVICE_TOUCH: Debug::log(LOG, "Attached a touch device with name %s", DEVICE->name); - 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: @@ -195,4 +194,16 @@ void Events::listener_newVirtualKeyboard(wl_listener* listener, void* data) { const auto WLRKB = (wlr_virtual_keyboard_v1*)data; g_pInputManager->newVirtualKeyboard(&WLRKB->keyboard.base); +} + +void Events::listener_touchBegin(wl_listener* listener, void* data) { + g_pInputManager->onTouchDown((wlr_touch_down_event*)data); +} + +void Events::listener_touchEnd(wl_listener* listener, void* data) { + g_pInputManager->onTouchUp((wlr_touch_up_event*)data); +} + +void Events::listener_touchUpdate(wl_listener* listener, void* data) { + g_pInputManager->onTouchMove((wlr_touch_motion_event*)data); }
\ No newline at end of file |
