diff options
| author | davc0n <dconti.dev@gmail.com> | 2025-04-24 20:49:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-24 20:49:49 +0200 |
| commit | 0e80ecc5342db04c8c1f807fa6db4c703fb89e3a (patch) | |
| tree | d71179a6517216ab32a12ebaf147e9eaffdbdffa /src/managers/input | |
| parent | be6268a7ecea2ad50cdb78fb661884811a8a28e8 (diff) | |
layers: refactor class member vars (#10149)
* layers: refactor class member vars
* popups: rename m_WLSurface to m_wlSurface
Diffstat (limited to 'src/managers/input')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 16 | ||||
| -rw-r--r-- | src/managers/input/Swipe.cpp | 4 | ||||
| -rw-r--r-- | src/managers/input/Touch.cpp | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index a1158f42..4aadff96 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -156,7 +156,7 @@ void CInputManager::sendMotionEventsToFocused() { const auto PWINDOW = g_pCompositor->getWindowFromSurface(g_pCompositor->m_lastFocus.lock()); const auto PLS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_lastFocus.lock()); - const auto LOCAL = getMouseCoordsInternal() - (PWINDOW ? PWINDOW->m_vRealPosition->goal() : (PLS ? Vector2D{PLS->geometry.x, PLS->geometry.y} : Vector2D{})); + const auto LOCAL = getMouseCoordsInternal() - (PWINDOW ? PWINDOW->m_vRealPosition->goal() : (PLS ? Vector2D{PLS->m_geometry.x, PLS->m_geometry.y} : Vector2D{})); m_bEmptyFocusCursorSet = false; @@ -310,8 +310,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &g_pInputManager->m_dExclusiveLSes, &surfaceCoords, &pFoundLayerSurface); if (!foundSurface) { - foundSurface = (*g_pInputManager->m_dExclusiveLSes.begin())->surface->resource(); - surfacePos = (*g_pInputManager->m_dExclusiveLSes.begin())->realPosition->goal(); + foundSurface = (*g_pInputManager->m_dExclusiveLSes.begin())->m_surface->resource(); + surfacePos = (*g_pInputManager->m_dExclusiveLSes.begin())->m_realPosition->goal(); } } @@ -483,7 +483,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { if (!refocus && g_pCompositor->m_lastFocus) { const auto PLS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_lastFocus.lock()); - if (PLS && PLS->layerSurface->current.interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE) + if (PLS && PLS->m_layerSurface->current.interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE) allowKeyboardRefocus = false; } @@ -568,8 +568,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { unsetCursorImage(); } - if (pFoundLayerSurface && (pFoundLayerSurface->layerSurface->current.interactivity != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE) && FOLLOWMOUSE != 3 && - (allowKeyboardRefocus || pFoundLayerSurface->layerSurface->current.interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE)) { + if (pFoundLayerSurface && (pFoundLayerSurface->m_layerSurface->current.interactivity != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE) && FOLLOWMOUSE != 3 && + (allowKeyboardRefocus || pFoundLayerSurface->m_layerSurface->current.interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE)) { g_pCompositor->focusSurface(foundSurface); } @@ -1456,14 +1456,14 @@ bool CInputManager::refocusLastWindow(PHLMONITOR pMonitor) { if (!foundSurface) { foundSurface = g_pCompositor->vectorToLayerSurface(g_pInputManager->getMouseCoordsInternal(), &pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], &surfaceCoords, &pFoundLayerSurface); - if (pFoundLayerSurface && pFoundLayerSurface->interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) + if (pFoundLayerSurface && pFoundLayerSurface->m_interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) foundSurface = nullptr; } if (!foundSurface) { foundSurface = g_pCompositor->vectorToLayerSurface(g_pInputManager->getMouseCoordsInternal(), &pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords, &pFoundLayerSurface); - if (pFoundLayerSurface && pFoundLayerSurface->interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) + if (pFoundLayerSurface && pFoundLayerSurface->m_interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) foundSurface = nullptr; } diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index 24971c7c..76119aab 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -41,7 +41,7 @@ void CInputManager::beginWorkspaceSwipe() { if (PWORKSPACE->m_bHasFullscreenWindow) { for (auto const& ls : g_pCompositor->m_lastMonitor->m_aLayerSurfaceLayers[2]) { - *ls->alpha = 1.f; + *ls->m_alpha = 1.f; } } } @@ -187,7 +187,7 @@ void CInputManager::endWorkspaceSwipe() { // apply alpha for (auto const& ls : g_pCompositor->m_lastMonitor->m_aLayerSurfaceLayers[2]) { - *ls->alpha = pSwitchedTo->m_bHasFullscreenWindow && pSwitchedTo->m_efFullscreenMode == FSMODE_FULLSCREEN ? 0.f : 1.f; + *ls->m_alpha = pSwitchedTo->m_bHasFullscreenWindow && pSwitchedTo->m_efFullscreenMode == FSMODE_FULLSCREEN ? 0.f : 1.f; } } diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp index 6ce1033b..5a030335 100644 --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp @@ -42,7 +42,7 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { if (m_sActiveSwipe.pWorkspaceBegin) { return; // TODO: Don't swipe if you touched a floating window. - } else if (*PSWIPETOUCH && (m_pFoundLSToFocus.expired() || m_pFoundLSToFocus->layer <= 1) && !g_pSessionLockManager->isSessionLocked()) { + } else if (*PSWIPETOUCH && (m_pFoundLSToFocus.expired() || m_pFoundLSToFocus->m_layer <= 1) && !g_pSessionLockManager->isSessionLocked()) { const auto PWORKSPACE = PMONITOR->activeWorkspace; const auto STYLE = PWORKSPACE->m_vRenderOffset->getStyle(); const bool VERTANIMS = STYLE == "slidevert" || STYLE.starts_with("slidefadevert"); @@ -88,7 +88,7 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { m_sTouchData.touchSurfaceOrigin = g_pInputManager->getMouseCoordsInternal() - local; } } else if (!m_sTouchData.touchFocusLS.expired()) { - local = g_pInputManager->getMouseCoordsInternal() - m_sTouchData.touchFocusLS->geometry.pos(); + local = g_pInputManager->getMouseCoordsInternal() - m_sTouchData.touchFocusLS->m_geometry.pos(); m_sTouchData.touchSurfaceOrigin = g_pInputManager->getMouseCoordsInternal() - local; } else @@ -158,7 +158,7 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) { g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local); } else if (!m_sTouchData.touchFocusLS.expired()) { - const auto PMONITOR = m_sTouchData.touchFocusLS->monitor.lock(); + const auto PMONITOR = m_sTouchData.touchFocusLS->m_monitor.lock(); g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true); |
