aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-19 23:03:29 +0100
committerGitHub <[email protected]>2024-10-19 23:03:29 +0100
commitf044e4c9514ec89c4c1fc8a523ca90b8cb907fb7 (patch)
tree5fa2ba17c08d522b7bb3f6564761b4aaedc532d0 /src/managers/input/InputManager.cpp
parentce3ba798df6bca5be1da4396644a9ef08a2acab4 (diff)
downloadHyprland-f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7.tar.gz
Hyprland-f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7.zip
internal: Move CMonitor to SP (#8178)
* move monitors to sp * XD
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index eef5e040..196f0b71 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -172,7 +172,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
m_vLastCursorPosFloored = MOUSECOORDSFLOORED;
- const auto PMONITOR = isLocked() && g_pCompositor->m_pLastMonitor ? g_pCompositor->m_pLastMonitor.get() : g_pCompositor->getMonitorFromCursor();
+ const auto PMONITOR = isLocked() && g_pCompositor->m_pLastMonitor ? g_pCompositor->m_pLastMonitor.lock() : g_pCompositor->getMonitorFromCursor();
// this can happen if there are no displays hooked up to Hyprland
if (PMONITOR == nullptr)
@@ -212,7 +212,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
Debug::log(ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", (uintptr_t)SURF.get(), (uintptr_t)CONSTRAINT.get());
}
- if (PMONITOR != g_pCompositor->m_pLastMonitor.get() && (*PMOUSEFOCUSMON || refocus) && m_pForcedFocus.expired())
+ if (PMONITOR != g_pCompositor->m_pLastMonitor && (*PMOUSEFOCUSMON || refocus) && m_pForcedFocus.expired())
g_pCompositor->setActiveMonitor(PMONITOR);
if (g_pSessionLockManager->isSessionLocked()) {
@@ -370,7 +370,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND], &surfaceCoords, &pFoundLayerSurface);
if (g_pPointerManager->softwareLockedFor(PMONITOR->self.lock()) > 0 && !skipFrameSchedule)
- g_pCompositor->scheduleFrameForMonitor(g_pCompositor->m_pLastMonitor.get(), Aquamarine::IOutput::AQ_SCHEDULE_CURSOR_MOVE);
+ g_pCompositor->scheduleFrameForMonitor(g_pCompositor->m_pLastMonitor.lock(), Aquamarine::IOutput::AQ_SCHEDULE_CURSOR_MOVE);
// grabs
if (g_pSeatManager->seatGrab && !g_pSeatManager->seatGrab->accepts(foundSurface)) {
@@ -720,7 +720,7 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e) {
// notify app if we didnt handle it
g_pSeatManager->sendPointerButton(e.timeMs, e.button, e.state);
- if (const auto PMON = g_pCompositor->getMonitorFromVector(mouseCoords); PMON != g_pCompositor->m_pLastMonitor.get() && PMON)
+ if (const auto PMON = g_pCompositor->getMonitorFromVector(mouseCoords); PMON != g_pCompositor->m_pLastMonitor && PMON)
g_pCompositor->setActiveMonitor(PMON);
if (g_pSeatManager->seatGrab && e.state == WL_POINTER_BUTTON_STATE_PRESSED) {
@@ -1359,7 +1359,7 @@ void CInputManager::refocus() {
mouseMoveUnified(0, true);
}
-void CInputManager::refocusLastWindow(CMonitor* pMonitor) {
+void CInputManager::refocusLastWindow(PHLMONITOR pMonitor) {
if (!pMonitor) {
refocus();
return;