diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp index cd11f44bedb..341d38773bd 100644 --- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp +++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp @@ -40,8 +40,9 @@ ****************************************************************************/ #include "qtoucheventsenderqpa.h" -#include -#include +#include +#include +#include #include QT_BEGIN_NAMESPACE @@ -66,12 +67,12 @@ void QTouchEventSenderQPA::touch_point(QEvent::Type state, { QRect winRect; if (m_forceToActiveWindow) { - QWidget *win = QApplication::activeWindow(); // ### migrate to QWindow later on + QWindow *win = QGuiApplication::activeWindow(); if (!win) return; winRect = win->geometry(); } else { - winRect = QApplication::desktop()->screenGeometry(); + winRect = QGuiApplication::primaryScreen()->geometry(); } #ifdef POINT_DEBUG