Commit 674dd5f7 authored by David Faure's avatar David Faure

Port the pager applet away from QtWidgets

Test Plan: Builds

Reviewers: hein, apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24238
parent a9291006
......@@ -28,10 +28,10 @@ Free Software Foundation, Inc.,
#include <xwindowtasksmodel.h>
#include <waylandtasksmodel.h>
#include <QApplication>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDBusPendingCall>
#include <QGuiApplication>
#include <QMetaEnum>
#include <QScreen>
......
......@@ -22,9 +22,9 @@ Free Software Foundation, Inc.,
#include <abstracttasksmodel.h>
#include <QApplication>
#include <QDesktopWidget>
#include <QGuiApplication>
#include <QMetaEnum>
#include <QScreen>
#include <KWindowSystem>
......@@ -39,8 +39,6 @@ public:
PagerModel *pagerModel = nullptr;
QDesktopWidget *desktopWidget = QApplication::desktop();
private:
WindowModel *q;
};
......@@ -78,7 +76,8 @@ QVariant WindowModel::data(const QModelIndex &index, int role) const
{
if (role == AbstractTasksModel::Geometry) {
QRect windowGeo = TaskFilterProxyModel::data(index, role).toRect();
const QRect &desktopGeo = d->desktopWidget->geometry();
QList<QScreen *> screens = QGuiApplication::screens();
const QRect desktopGeo = screens.at(0)->geometry();
if (KWindowSystem::mapViewport()) {
int x = windowGeo.center().x() % desktopGeo.width();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment