diff --git a/applets/pager/plugin/pagermodel.cpp b/applets/pager/plugin/pagermodel.cpp --- a/applets/pager/plugin/pagermodel.cpp +++ b/applets/pager/plugin/pagermodel.cpp @@ -28,10 +28,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/applets/pager/plugin/windowmodel.cpp b/applets/pager/plugin/windowmodel.cpp --- a/applets/pager/plugin/windowmodel.cpp +++ b/applets/pager/plugin/windowmodel.cpp @@ -22,9 +22,9 @@ #include -#include -#include +#include #include +#include #include @@ -39,8 +39,6 @@ PagerModel *pagerModel = nullptr; - QDesktopWidget *desktopWidget = QApplication::desktop(); - private: WindowModel *q; }; @@ -78,7 +76,8 @@ { if (role == AbstractTasksModel::Geometry) { QRect windowGeo = TaskFilterProxyModel::data(index, role).toRect(); - const QRect &desktopGeo = d->desktopWidget->geometry(); + QList screens = QGuiApplication::screens(); + const QRect desktopGeo = screens.at(0)->geometry(); if (KWindowSystem::mapViewport()) { int x = windowGeo.center().x() % desktopGeo.width();