inputs: refactor class member vars (#10230)
This commit is contained in:
parent
2670b8f772
commit
5b3e489108
27 changed files with 655 additions and 656 deletions
|
|
@ -104,13 +104,13 @@ CHyprRenderer::CHyprRenderer() {
|
|||
});
|
||||
|
||||
static auto P2 = g_pHookSystem->hookDynamic("mouseMove", [&](void* self, SCallbackInfo& info, std::any param) {
|
||||
if (!m_sCursorHiddenConditions.hiddenOnKeyboard && m_sCursorHiddenConditions.hiddenOnTouch == g_pInputManager->m_bLastInputTouch &&
|
||||
if (!m_sCursorHiddenConditions.hiddenOnKeyboard && m_sCursorHiddenConditions.hiddenOnTouch == g_pInputManager->m_lastInputTouch &&
|
||||
!m_sCursorHiddenConditions.hiddenOnTimeout)
|
||||
return;
|
||||
|
||||
m_sCursorHiddenConditions.hiddenOnKeyboard = false;
|
||||
m_sCursorHiddenConditions.hiddenOnTimeout = false;
|
||||
m_sCursorHiddenConditions.hiddenOnTouch = g_pInputManager->m_bLastInputTouch;
|
||||
m_sCursorHiddenConditions.hiddenOnTouch = g_pInputManager->m_lastInputTouch;
|
||||
ensureCursorRenderingMode();
|
||||
});
|
||||
|
||||
|
|
@ -969,7 +969,7 @@ void CHyprRenderer::renderAllClientsForWorkspace(PHLMONITOR pMonitor, PHLWORKSPA
|
|||
}
|
||||
|
||||
// Render IME popups
|
||||
for (auto const& imep : g_pInputManager->m_sIMERelay.m_vIMEPopups) {
|
||||
for (auto const& imep : g_pInputManager->m_relay.m_inputMethodPopups) {
|
||||
renderIMEPopup(imep.get(), pMonitor, time);
|
||||
}
|
||||
|
||||
|
|
@ -2004,7 +2004,7 @@ void CHyprRenderer::ensureCursorRenderingMode() {
|
|||
m_sCursorHiddenConditions.hiddenOnKeyboard = false;
|
||||
|
||||
if (*PCURSORTIMEOUT > 0)
|
||||
m_sCursorHiddenConditions.hiddenOnTimeout = *PCURSORTIMEOUT < g_pInputManager->m_tmrLastCursorMovement.getSeconds();
|
||||
m_sCursorHiddenConditions.hiddenOnTimeout = *PCURSORTIMEOUT < g_pInputManager->m_lastCursorMovement.getSeconds();
|
||||
|
||||
const bool HIDE = m_sCursorHiddenConditions.hiddenOnTimeout || m_sCursorHiddenConditions.hiddenOnTouch || m_sCursorHiddenConditions.hiddenOnKeyboard;
|
||||
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ bool CHyprGroupBarDecoration::onBeginWindowDragOnDeco(const Vector2D& pos) {
|
|||
g_pKeybindManager->m_bGroupsLocked = GROUPSLOCKEDPREV;
|
||||
}
|
||||
|
||||
g_pInputManager->currentlyDraggedWindow = pWindow;
|
||||
g_pInputManager->m_currentlyDraggedWindow = pWindow;
|
||||
|
||||
if (!g_pCompositor->isWindowActive(pWindow))
|
||||
g_pCompositor->focusWindow(pWindow);
|
||||
|
|
@ -421,11 +421,11 @@ bool CHyprGroupBarDecoration::onEndWindowDragOnDeco(const Vector2D& pos, PHLWIND
|
|||
static auto PINNERGAP = CConfigValue<Hyprlang::INT>("group:groupbar:gaps_in");
|
||||
const bool FLOATEDINTOTILED = !m_pWindow->m_isFloating && !pDraggedWindow->m_draggingTiled;
|
||||
|
||||
g_pInputManager->m_bWasDraggingWindow = false;
|
||||
g_pInputManager->m_wasDraggingWindow = false;
|
||||
|
||||
if (!pDraggedWindow->canBeGroupedInto(m_pWindow.lock()) || (*PDRAGINTOGROUP != 1 && *PDRAGINTOGROUP != 2) || (FLOATEDINTOTILED && !*PMERGEFLOATEDINTOTILEDONGROUPBAR) ||
|
||||
(!*PMERGEGROUPSONGROUPBAR && pDraggedWindow->m_groupData.pNextWindow.lock() && m_pWindow->m_groupData.pNextWindow.lock())) {
|
||||
g_pInputManager->m_bWasDraggingWindow = true;
|
||||
g_pInputManager->m_wasDraggingWindow = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ void CSurfacePassElement::draw(const CRegion& damage) {
|
|||
if (!TEXTURE->m_iTexID)
|
||||
return;
|
||||
|
||||
const auto INTERACTIVERESIZEINPROGRESS = data.pWindow && g_pInputManager->currentlyDraggedWindow && g_pInputManager->dragMode == MBIND_RESIZE;
|
||||
const auto INTERACTIVERESIZEINPROGRESS = data.pWindow && g_pInputManager->m_currentlyDraggedWindow && g_pInputManager->m_dragMode == MBIND_RESIZE;
|
||||
TRACY_GPU_ZONE("RenderSurface");
|
||||
|
||||
auto PSURFACE = CWLSurface::fromResource(data.surface);
|
||||
|
|
@ -140,7 +140,7 @@ void CSurfacePassElement::draw(const CRegion& damage) {
|
|||
CBox CSurfacePassElement::getTexBox() {
|
||||
const double outputX = -data.pMonitor->m_position.x, outputY = -data.pMonitor->m_position.y;
|
||||
|
||||
const auto INTERACTIVERESIZEINPROGRESS = data.pWindow && g_pInputManager->currentlyDraggedWindow && g_pInputManager->dragMode == MBIND_RESIZE;
|
||||
const auto INTERACTIVERESIZEINPROGRESS = data.pWindow && g_pInputManager->m_currentlyDraggedWindow && g_pInputManager->m_dragMode == MBIND_RESIZE;
|
||||
auto PSURFACE = CWLSurface::fromResource(data.surface);
|
||||
|
||||
CBox windowBox;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue