From 95e083dbd3baec094220848592e9258de8acf2cc Mon Sep 17 00:00:00 2001 From: Sebastian Ouellette Date: Sun, 19 Jun 2022 16:51:03 -0400 Subject: [PATCH] Converted tabs to spaces. Now ready for PR --- src/managers/input/InputManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ff2cd503..d5bfd8fd 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -29,7 +29,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (!g_pCompositor->m_sSeat.mouse) { Debug::log(ERR, "BUG THIS: Mouse move on mouse nullptr!"); - return; + return; } Vector2D mouseCoords = getMouseCoordsInternal(); @@ -48,8 +48,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { // Native Wayland apps know how 2 constrain themselves. // XWayland, we just have to accept them. Might cause issues, but thats XWayland for ya. - const auto CONSTRAINTSIZE = CONSTRAINTWINDOW->m_bIsX11 ? Vector2D(CONSTRAINTWINDOW->m_uSurface.xwayland->width, CONSTRAINTWINDOW->m_uSurface.xwayland->height) : CONSTRAINTWINDOW->m_vRealSize.vec(); - const auto CONSTRAINTPOS = Vector2D((CONSTRAINTWINDOW->m_uSurface.xwayland->x + CONSTRAINTSIZE.x) / 2.0, (CONSTRAINTWINDOW->m_uSurface.xwayland->y + CONSTRAINTSIZE.y)); + const auto CONSTRAINTSIZE = CONSTRAINTWINDOW->m_bIsX11 ? Vector2D(CONSTRAINTWINDOW->m_uSurface.xwayland->width, CONSTRAINTWINDOW->m_uSurface.xwayland->height) : CONSTRAINTWINDOW->m_vRealSize.vec(); + const auto CONSTRAINTPOS = Vector2D((CONSTRAINTWINDOW->m_uSurface.xwayland->x + CONSTRAINTSIZE.x) / 2.0, (CONSTRAINTWINDOW->m_uSurface.xwayland->y + CONSTRAINTSIZE.y)); // I'm a worm and I added some code to override some annoying stuff :) @@ -63,10 +63,10 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { // Instead of constraining the cursor to the entire window, like in the previous version, this keeps the cursor to the center of the window. // This allows for maximum mouse movement to be captured by the application, while the mouse can still be freed and move around when it is supposed to be deltaToFit.x = CONSTRAINTPOS.x - mouseCoords.x; - deltaToFit.y = CONSTRAINTPOS.y - mouseCoords.y; + deltaToFit.y = CONSTRAINTPOS.y - mouseCoords.y; - wlr_cursor_move(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, deltaToFit.x, deltaToFit.y); + wlr_cursor_move(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, deltaToFit.x, deltaToFit.y); mouseCoords = mouseCoords + deltaToFit; }