Changeset View
Changeset View
Standalone View
Standalone View
input.cpp
Show First 20 Lines • Show All 1574 Lines • ▼ Show 20 Line(s) | 1572 | [this, device] (const QString &application, const QString &reason) { | |||
---|---|---|---|---|---|
1575 | // TODO: make secure | 1575 | // TODO: make secure | ||
1576 | device->setAuthentication(true); | 1576 | device->setAuthentication(true); | ||
1577 | } | 1577 | } | ||
1578 | ); | 1578 | ); | ||
1579 | connect(device, &FakeInputDevice::pointerMotionRequested, this, | 1579 | connect(device, &FakeInputDevice::pointerMotionRequested, this, | ||
1580 | [this] (const QSizeF &delta) { | 1580 | [this] (const QSizeF &delta) { | ||
1581 | // TODO: Fix time | 1581 | // TODO: Fix time | ||
1582 | m_pointer->processMotion(globalPointer() + QPointF(delta.width(), delta.height()), 0); | 1582 | m_pointer->processMotion(globalPointer() + QPointF(delta.width(), delta.height()), 0); | ||
1583 | waylandServer()->simulateUserActivity(); | ||||
1583 | } | 1584 | } | ||
1584 | ); | 1585 | ); | ||
1585 | connect(device, &FakeInputDevice::pointerButtonPressRequested, this, | 1586 | connect(device, &FakeInputDevice::pointerButtonPressRequested, this, | ||
1586 | [this] (quint32 button) { | 1587 | [this] (quint32 button) { | ||
1587 | // TODO: Fix time | 1588 | // TODO: Fix time | ||
1588 | m_pointer->processButton(button, InputRedirection::PointerButtonPressed, 0); | 1589 | m_pointer->processButton(button, InputRedirection::PointerButtonPressed, 0); | ||
1590 | waylandServer()->simulateUserActivity(); | ||||
1589 | } | 1591 | } | ||
1590 | ); | 1592 | ); | ||
1591 | connect(device, &FakeInputDevice::pointerButtonReleaseRequested, this, | 1593 | connect(device, &FakeInputDevice::pointerButtonReleaseRequested, this, | ||
1592 | [this] (quint32 button) { | 1594 | [this] (quint32 button) { | ||
1593 | // TODO: Fix time | 1595 | // TODO: Fix time | ||
1594 | m_pointer->processButton(button, InputRedirection::PointerButtonReleased, 0); | 1596 | m_pointer->processButton(button, InputRedirection::PointerButtonReleased, 0); | ||
1597 | waylandServer()->simulateUserActivity(); | ||||
1595 | } | 1598 | } | ||
1596 | ); | 1599 | ); | ||
1597 | connect(device, &FakeInputDevice::pointerAxisRequested, this, | 1600 | connect(device, &FakeInputDevice::pointerAxisRequested, this, | ||
1598 | [this] (Qt::Orientation orientation, qreal delta) { | 1601 | [this] (Qt::Orientation orientation, qreal delta) { | ||
1599 | // TODO: Fix time | 1602 | // TODO: Fix time | ||
1600 | InputRedirection::PointerAxis axis; | 1603 | InputRedirection::PointerAxis axis; | ||
1601 | switch (orientation) { | 1604 | switch (orientation) { | ||
1602 | case Qt::Horizontal: | 1605 | case Qt::Horizontal: | ||
1603 | axis = InputRedirection::PointerAxisHorizontal; | 1606 | axis = InputRedirection::PointerAxisHorizontal; | ||
1604 | break; | 1607 | break; | ||
1605 | case Qt::Vertical: | 1608 | case Qt::Vertical: | ||
1606 | axis = InputRedirection::PointerAxisVertical; | 1609 | axis = InputRedirection::PointerAxisVertical; | ||
1607 | break; | 1610 | break; | ||
1608 | default: | 1611 | default: | ||
1609 | Q_UNREACHABLE(); | 1612 | Q_UNREACHABLE(); | ||
1610 | break; | 1613 | break; | ||
1611 | } | 1614 | } | ||
1612 | // TODO: Fix time | 1615 | // TODO: Fix time | ||
1613 | m_pointer->processAxis(axis, delta, 0); | 1616 | m_pointer->processAxis(axis, delta, 0); | ||
1617 | waylandServer()->simulateUserActivity(); | ||||
1614 | } | 1618 | } | ||
1615 | ); | 1619 | ); | ||
1616 | connect(device, &FakeInputDevice::touchDownRequested, this, | 1620 | connect(device, &FakeInputDevice::touchDownRequested, this, | ||
1617 | [this] (quint32 id, const QPointF &pos) { | 1621 | [this] (quint32 id, const QPointF &pos) { | ||
1618 | // TODO: Fix time | 1622 | // TODO: Fix time | ||
1619 | m_touch->processDown(id, pos, 0); | 1623 | m_touch->processDown(id, pos, 0); | ||
1624 | waylandServer()->simulateUserActivity(); | ||||
1620 | } | 1625 | } | ||
1621 | ); | 1626 | ); | ||
1622 | connect(device, &FakeInputDevice::touchMotionRequested, this, | 1627 | connect(device, &FakeInputDevice::touchMotionRequested, this, | ||
1623 | [this] (quint32 id, const QPointF &pos) { | 1628 | [this] (quint32 id, const QPointF &pos) { | ||
1624 | // TODO: Fix time | 1629 | // TODO: Fix time | ||
1625 | m_touch->processMotion(id, pos, 0); | 1630 | m_touch->processMotion(id, pos, 0); | ||
1631 | waylandServer()->simulateUserActivity(); | ||||
1626 | } | 1632 | } | ||
1627 | ); | 1633 | ); | ||
1628 | connect(device, &FakeInputDevice::touchUpRequested, this, | 1634 | connect(device, &FakeInputDevice::touchUpRequested, this, | ||
1629 | [this] (quint32 id) { | 1635 | [this] (quint32 id) { | ||
1630 | // TODO: Fix time | 1636 | // TODO: Fix time | ||
1631 | m_touch->processUp(id, 0); | 1637 | m_touch->processUp(id, 0); | ||
1638 | waylandServer()->simulateUserActivity(); | ||||
1632 | } | 1639 | } | ||
1633 | ); | 1640 | ); | ||
1634 | connect(device, &FakeInputDevice::touchCancelRequested, this, | 1641 | connect(device, &FakeInputDevice::touchCancelRequested, this, | ||
1635 | [this] () { | 1642 | [this] () { | ||
1636 | m_touch->cancel(); | 1643 | m_touch->cancel(); | ||
1637 | } | 1644 | } | ||
1638 | ); | 1645 | ); | ||
1639 | connect(device, &FakeInputDevice::touchFrameRequested, this, | 1646 | connect(device, &FakeInputDevice::touchFrameRequested, this, | ||
▲ Show 20 Lines • Show All 546 Lines • Show Last 20 Lines |