From c40e3271300af9134396f61c24f05548ea454f41 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 2 Nov 2008 07:21:13 +0000 Subject: [PATCH] make this work better for the default case svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=878937 --- corona.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/corona.cpp b/corona.cpp index 77f64989c..4cfbe6eef 100644 --- a/corona.cpp +++ b/corona.cpp @@ -411,7 +411,14 @@ int Corona::numScreens() const QRect Corona::screenGeometry(int id) const { Q_UNUSED(id); - return sceneRect().toRect(); + if (views().isEmpty()) { + return sceneRect().toRect(); + } else { + QGraphicsView *v = views()[0]; + QRect r = sceneRect().toRect(); + r.moveTo(v->mapToGlobal(v->pos())); + return r; + } } QRegion Corona::availableScreenRegion(int id) const