Cleaned up some old debug

This commit is contained in:
SebOuellette 2022-06-19 16:23:49 -04:00
parent ae1bcc909d
commit 5058a74453
2 changed files with 6375 additions and 16 deletions

6367
log.txt Normal file

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) { void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
float sensitivity = g_pConfigManager->getFloat("general:sensitivity"); float sensitivity = g_pConfigManager->getFloat("general:sensitivity");
const auto DELTA = g_pConfigManager->getInt("input:force_no_accel") != 1 ? Vector2D(e->unaccel_dx, e->unaccel_dy) : Vector2D(e->delta_x, e->delta_y); const auto DELTA = g_pConfigManager->getInt("input:force_no_accel") == 1 ? Vector2D(e->unaccel_dx, e->unaccel_dy) : Vector2D(e->delta_x, e->delta_y);
if (g_pConfigManager->getInt("general:apply_sens_to_raw") == 1) if (g_pConfigManager->getInt("general:apply_sens_to_raw") == 1)
wlr_relative_pointer_manager_v1_send_relative_motion(g_pCompositor->m_sWLRRelPointerMgr, g_pCompositor->m_sSeat.seat, (uint64_t)e->time_msec * 1000, DELTA.x * sensitivity, DELTA.y * sensitivity, e->unaccel_dx * sensitivity, e->unaccel_dy * sensitivity); wlr_relative_pointer_manager_v1_send_relative_motion(g_pCompositor->m_sWLRRelPointerMgr, g_pCompositor->m_sSeat.seat, (uint64_t)e->time_msec * 1000, DELTA.x * sensitivity, DELTA.y * sensitivity, e->unaccel_dx * sensitivity, e->unaccel_dy * sensitivity);
@ -32,12 +32,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
return; return;
} }
// Update stuff
//updateDragIcon();
//g_pLayoutManager->getCurrentLayout()->onMouseMove(getMouseCoordsInternal());
Vector2D mouseCoords = getMouseCoordsInternal(); Vector2D mouseCoords = getMouseCoordsInternal();
const auto PMONITOR = g_pCompositor->getMonitorFromCursor(); const auto PMONITOR = g_pCompositor->getMonitorFromCursor();
@ -66,15 +60,13 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
Vector2D deltaToFit; Vector2D deltaToFit;
// Instead of constraining the cursor to the entire window, like in the previous version, this keeps the cursor to the center of the window.
// This allows for maximum mouse movement to be captured by the application, while the mouse can still be freed and move around when it is supposed to be
deltaToFit.x = CONSTRAINTPOS.x - mouseCoords.x; deltaToFit.x = CONSTRAINTPOS.x - mouseCoords.x;
deltaToFit.y = CONSTRAINTPOS.y - mouseCoords.y; deltaToFit.y = CONSTRAINTPOS.y - mouseCoords.y;
// Deadzone... necessary ig
if (deltaToFit.x * deltaToFit.x > 2 && deltaToFit.y * deltaToFit.y > 2) { wlr_cursor_move(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, deltaToFit.x, deltaToFit.y);
wlr_cursor_warp_closest(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, CONSTRAINTPOS.x, CONSTRAINTPOS.y);
}
mouseCoords = mouseCoords + deltaToFit; mouseCoords = mouseCoords + deltaToFit;
} }