| 619 | } |
| 620 | |
| 621 | void PointerInputRedirection::updatePosition(const QPointF &pos, std::chrono::microseconds time) |
| 622 | { |
| 623 | m_lastMoveTime = time; |
| 624 | if (m_locked) { |
| 625 | // locked pointer should not move |
| 626 | return; |
| 627 | } |
| 628 | // verify that at least one screen contains the pointer position |
| 629 | const Output *currentOutput = workspace()->outputAt(pos); |
| 630 | QPointF p = confineToBoundingBox(pos, currentOutput->geometry()); |
| 631 | p = applyEdgeBarrier(p, currentOutput, time); |
| 632 | p = applyPointerConfinement(p); |
| 633 | if (p == m_pos) { |
| 634 | // didn't change due to confinement |
| 635 | return; |
| 636 | } |
| 637 | // verify screen confinement |
| 638 | if (!screenContainsPos(p)) { |
| 639 | return; |
| 640 | } |
| 641 | |
| 642 | m_pos = p; |
| 643 | |
| 644 | workspace()->setActiveOutput(m_pos); |
| 645 | m_cursor->updateCursorOutputs(m_pos); |
| 646 | |
| 647 | Q_EMIT input()->globalPointerChanged(m_pos); |
| 648 | } |
| 649 | |
| 650 | void PointerInputRedirection::updateButton(uint32_t button, PointerButtonState state) |
| 651 | { |
nothing calls this directly
no test coverage detected