summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-04-24 20:49:49 +0200
committerGitHub <noreply@github.com>2025-04-24 20:49:49 +0200
commit0e80ecc5342db04c8c1f807fa6db4c703fb89e3a (patch)
treed71179a6517216ab32a12ebaf147e9eaffdbdffa /src/managers
parentbe6268a7ecea2ad50cdb78fb661884811a8a28e8 (diff)
layers: refactor class member vars (#10149)
* layers: refactor class member vars * popups: rename m_WLSurface to m_wlSurface
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/AnimationManager.cpp10
-rw-r--r--src/managers/SeatManager.cpp2
-rw-r--r--src/managers/input/InputManager.cpp16
-rw-r--r--src/managers/input/Swipe.cpp4
-rw-r--r--src/managers/input/Touch.cpp6
5 files changed, 19 insertions, 19 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp
index c3052796..2c8cf1f9 100644
--- a/src/managers/AnimationManager.cpp
+++ b/src/managers/AnimationManager.cpp
@@ -135,14 +135,14 @@ static void handleUpdate(CAnimatedVariable<VarType>& av, bool warp) {
}
} else if (PLAYER) {
// "some fucking layers miss 1 pixel???" -- vaxry
- CBox expandBox = CBox{PLAYER->realPosition->value(), PLAYER->realSize->value()};
+ CBox expandBox = CBox{PLAYER->m_realPosition->value(), PLAYER->m_realSize->value()};
expandBox.expand(5);
g_pHyprRenderer->damageBox(expandBox);
- PMONITOR = g_pCompositor->getMonitorFromVector(PLAYER->realPosition->goal() + PLAYER->realSize->goal() / 2.F);
+ PMONITOR = g_pCompositor->getMonitorFromVector(PLAYER->m_realPosition->goal() + PLAYER->m_realSize->goal() / 2.F);
if (!PMONITOR)
return;
- animationsDisabled = animationsDisabled || PLAYER->noAnimations;
+ animationsDisabled = animationsDisabled || PLAYER->m_noAnimations;
}
const auto SPENT = av.getPercent();
@@ -174,11 +174,11 @@ static void handleUpdate(CAnimatedVariable<VarType>& av, bool warp) {
g_pHyprRenderer->damageWindow(w);
}
} else if (PLAYER) {
- if (PLAYER->layer <= 1)
+ if (PLAYER->m_layer <= 1)
g_pHyprOpenGL->markBlurDirtyForMonitor(PMONITOR);
// some fucking layers miss 1 pixel???
- CBox expandBox = CBox{PLAYER->realPosition->value(), PLAYER->realSize->value()};
+ CBox expandBox = CBox{PLAYER->m_realPosition->value(), PLAYER->m_realSize->value()};
expandBox.expand(5);
g_pHyprRenderer->damageBox(expandBox);
}
diff --git a/src/managers/SeatManager.cpp b/src/managers/SeatManager.cpp
index 5fef7b5f..6ea441e8 100644
--- a/src/managers/SeatManager.cpp
+++ b/src/managers/SeatManager.cpp
@@ -618,7 +618,7 @@ void CSeatManager::setGrab(SP<CSeatGrab> grab) {
}
if (!refocus && layer)
- refocus = layer->interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE;
+ refocus = layer->m_interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE;
if (refocus) {
auto candidate = g_pCompositor->m_lastWindow.lock();
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);