MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / updatePosition

Method updatePosition

src/pointer_input.cpp:621–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619}
620
621void 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
650void PointerInputRedirection::updateButton(uint32_t button, PointerButtonState state)
651{

Callers

nothing calls this directly

Calls 7

workspaceFunction · 0.85
confineToBoundingBoxFunction · 0.85
screenContainsPosFunction · 0.85
outputAtMethod · 0.80
setActiveOutputMethod · 0.80
updateCursorOutputsMethod · 0.80
geometryMethod · 0.45

Tested by

no test coverage detected