@@ -56,13 +56,14 @@ bool WindowInputMonitor::eventFilter(QObject *watched, QEvent *event)
56 Q_ASSERT(watched == static_cast<QObject*>(m_filteredWindow.data()));
56 Q_ASSERT(watched == static_cast<QObject*>(m_filteredWindow.data()));
57 Q_UNUSED(watched);
57 Q_UNUSED(watched);
59− return update(event);
59+ update(event);
61+ // We're only monitoring, never filtering out events
62−bool WindowInputMonitor::update(QEvent *event)
65+void WindowInputMonitor::update(QEvent *event)
64− bool result = false; // by default, just monitor
66 if (event->type() == QEvent::KeyPress) {
67 if (event->type() == QEvent::KeyPress) {
67 QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
68 QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
@@ -80,11 +81,6 @@ bool WindowInputMonitor::update(QEvent *event)
80 if (keyEvent->key() == m_pressedHomeKey) {
81 if (keyEvent->key() == m_pressedHomeKey) {
81 m_pressedHomeKey = 0;
82 m_pressedHomeKey = 0;
83− if (m_movingWindow && keyEvent->modifiers() == Qt::AltModifier) {
84− m_movingWindow = false;
86− Q_EMIT windowMoveEnded();
89 } else if (event->type() == QEvent::TouchBegin) {
85 } else if (event->type() == QEvent::TouchBegin) {
@@ -102,26 +98,7 @@ bool WindowInputMonitor::update(QEvent *event)
102 const QPointF pos = touchEv->touchPoints().last().screenPos();
98 const QPointF pos = touchEv->touchPoints().last().screenPos();
103 Q_EMIT touchEnded(pos);
99 Q_EMIT touchEnded(pos);
105− } else if (event->type() == QEvent::MouseButtonPress) {
106− QMouseEvent * mouseEv = static_cast<QMouseEvent *>(event);
107− if (mouseEv && mouseEv->button() == Qt::LeftButton && mouseEv->modifiers() == Qt::AltModifier) {
108− m_movingWindow = true;
110− Q_EMIT windowMoveRequested(mouseEv->screenPos());
112− } else if (event->type() == QEvent::MouseMove && m_movingWindow) {
113− QMouseEvent * mouseEv = static_cast<QMouseEvent *>(event);
116− Q_EMIT windowMoveUpdated(mouseEv->screenPos());
118− } else if (event->type() == QEvent::MouseButtonRelease && m_movingWindow) {
119− m_movingWindow = false;
121− Q_EMIT windowMoveEnded();
127void WindowInputMonitor::setupFilterOnWindow(QQuickWindow *window)
104void WindowInputMonitor::setupFilterOnWindow(QQuickWindow *window)