diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-05 22:18:10 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-05-09 13:37:39 +0100 |
| commit | ed411f53bdcf8d455f9e6ca769693aa84dc8372f (patch) | |
| tree | aacedb349acdd1022975d7b622dc7cfe11388223 /src/managers/input/Tablets.cpp | |
| parent | e4e84064f2d07810e0c150bce1369a0a00503e9a (diff) | |
cursor: move to a hyprland impl
This moves wlr_cursor to a completely new impl mostly under
CPointerManager
Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
Diffstat (limited to 'src/managers/input/Tablets.cpp')
| -rw-r--r-- | src/managers/input/Tablets.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index 979eb1a7..a0bd81ce 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -18,7 +18,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { Debug::log(LOG, "Attaching tablet to cursor!"); - wlr_cursor_attach_input_device(g_pCompositor->m_sWLRCursor, pDevice); + // wlr_cursor_attach_input_device(g_pCompositor->m_sWLRCursor, pDevice); PNEWTABLET->hyprListener_Destroy.initCallback( &pDevice->events.destroy, @@ -39,7 +39,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { switch (EVENT->tool->type) { case WLR_TABLET_TOOL_TYPE_MOUSE: - wlr_cursor_move(g_pCompositor->m_sWLRCursor, PTAB->wlrDevice, EVENT->dx, EVENT->dy); + // wlr_cursor_move(g_pCompositor->m_sWLRCursor, PTAB->wlrDevice, EVENT->dx, EVENT->dy); g_pInputManager->simulateMouseMovement(); g_pInputManager->focusTablet(PTAB, EVENT->tool, true); g_pInputManager->m_tmrLastCursorMovement.reset(); @@ -50,16 +50,16 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { double y = (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_Y) ? EVENT->y : NAN; double dy = (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_Y) ? EVENT->dy : NAN; - if (PTAB->relativeInput) - wlr_cursor_move(g_pCompositor->m_sWLRCursor, PTAB->wlrDevice, dx, dy); - else { - // Calculate transformations if active area is set - if (!PTAB->activeArea.empty()) { - x = (x - PTAB->activeArea.x) / (PTAB->activeArea.w - PTAB->activeArea.x); - y = (y - PTAB->activeArea.y) / (PTAB->activeArea.h - PTAB->activeArea.y); - } - wlr_cursor_warp_absolute(g_pCompositor->m_sWLRCursor, PTAB->wlrDevice, x, y); - } + // if (PTAB->relativeInput) + // wlr_cursor_move(g_pCompositor->m_sWLRCursor, PTAB->wlrDevice, dx, dy); + // else { + // Calculate transformations if active area is set + // if (!PTAB->activeArea.empty()) { + // x = (x - PTAB->activeArea.x) / (PTAB->activeArea.w - PTAB->activeArea.x); + // y = (y - PTAB->activeArea.y) / (PTAB->activeArea.h - PTAB->activeArea.y); + // } + // wlr_cursor_warp_absolute(g_pCompositor->m_sWLRCursor, PTAB->wlrDevice, x, y); + // } g_pInputManager->simulateMouseMovement(); g_pInputManager->focusTablet(PTAB, EVENT->tool, true); |
