core: move internal structures to monitor pointers (#8266)
This commit is contained in:
parent
b6e226c320
commit
5d4b54b012
24 changed files with 226 additions and 215 deletions
|
|
@ -15,9 +15,8 @@ void CInputManager::onSwipeBegin(IPointer::SSwipeBeginEvent e) {
|
|||
|
||||
int onMonitor = 0;
|
||||
for (auto const& w : g_pCompositor->m_vWorkspaces) {
|
||||
if (w->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID && !g_pCompositor->isWorkspaceSpecial(w->m_iID)) {
|
||||
if (w->m_pMonitor == g_pCompositor->m_pLastMonitor && !g_pCompositor->isWorkspaceSpecial(w->m_iID))
|
||||
onMonitor++;
|
||||
}
|
||||
}
|
||||
|
||||
if (onMonitor < 2 && !*PSWIPENEW)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) {
|
|||
return;
|
||||
}
|
||||
if (validMapped(m_sTouchData.touchFocusWindow)) {
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_sTouchData.touchFocusWindow->m_iMonitorID);
|
||||
const auto PMONITOR = m_sTouchData.touchFocusWindow->m_pMonitor.lock();
|
||||
|
||||
g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true);
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) {
|
|||
|
||||
g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local);
|
||||
} else if (!m_sTouchData.touchFocusLS.expired()) {
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_sTouchData.touchFocusLS->monitorID);
|
||||
const auto PMONITOR = m_sTouchData.touchFocusLS->monitor.lock();
|
||||
|
||||
g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue