input: Only limit drag resizes (#5164)

* only limit drag resizes

* change to not equals

* remove extra parentheses
This commit is contained in:
phonetic112 2024-03-19 12:03:31 -04:00 committed by GitHub
parent 5c1097cbc1
commit bcba3951f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -355,7 +355,7 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) {
canSkipUpdate = std::clamp(MSMONITOR - TIMERDELTA, 0.0, MSMONITOR) > totalMs * 1.0 / m_iMouseMoveEventCount; canSkipUpdate = std::clamp(MSMONITOR - TIMERDELTA, 0.0, MSMONITOR) > totalMs * 1.0 / m_iMouseMoveEventCount;
} }
if ((abs(TICKDELTA.x) < 1.f && abs(TICKDELTA.y) < 1.f) || (TIMERDELTA < MSMONITOR && canSkipUpdate)) if ((abs(TICKDELTA.x) < 1.f && abs(TICKDELTA.y) < 1.f) || (TIMERDELTA < MSMONITOR && canSkipUpdate && g_pInputManager->dragMode != MBIND_MOVE))
return; return;
TIMER = std::chrono::high_resolution_clock::now(); TIMER = std::chrono::high_resolution_clock::now();