Changeset View
Changeset View
Standalone View
Standalone View
applets/pager/plugin/windowmodel.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 63 | { | |||
---|---|---|---|---|---|
72 | return roles; | 72 | return roles; | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | QVariant WindowModel::data(const QModelIndex &index, int role) const | 75 | QVariant WindowModel::data(const QModelIndex &index, int role) const | ||
76 | { | 76 | { | ||
77 | if (role == AbstractTasksModel::Geometry) { | 77 | if (role == AbstractTasksModel::Geometry) { | ||
78 | QRect windowGeo = TaskFilterProxyModel::data(index, role).toRect(); | 78 | QRect windowGeo = TaskFilterProxyModel::data(index, role).toRect(); | ||
79 | QList<QScreen *> screens = QGuiApplication::screens(); | 79 | QList<QScreen *> screens = QGuiApplication::screens(); | ||
80 | const QRect desktopGeo = screens.at(0)->geometry(); | 80 | const QRect desktopGeo = screens.at(0)->virtualGeometry(); | ||
81 | 81 | | |||
82 | if (KWindowSystem::mapViewport()) { | 82 | if (KWindowSystem::mapViewport()) { | ||
83 | int x = windowGeo.center().x() % desktopGeo.width(); | 83 | int x = windowGeo.center().x() % desktopGeo.width(); | ||
84 | int y = windowGeo.center().y() % desktopGeo.height(); | 84 | int y = windowGeo.center().y() % desktopGeo.height(); | ||
85 | 85 | | |||
86 | if (x < 0) { | 86 | if (x < 0) { | ||
87 | x = x + desktopGeo.width(); | 87 | x = x + desktopGeo.width(); | ||
88 | } | 88 | } | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |