fix screen region mapping
BUG:334670
This commit is contained in:
parent
55514d28c7
commit
34b86471d0
@ -177,8 +177,8 @@ QVariantList ContainmentInterface::availableScreenRegion() const
|
||||
QVariantList regVal;
|
||||
foreach (QRect rect, reg.rects()) {
|
||||
//make it relative
|
||||
rect.setX(rect.x() - containment()->corona()->screenGeometry(containment()->screen()).x());
|
||||
rect.setY(rect.y() - containment()->corona()->screenGeometry(containment()->screen()).y());
|
||||
rect.moveTo(rect.x() - containment()->corona()->screenGeometry(containment()->screen()).x(),
|
||||
rect.y() - containment()->corona()->screenGeometry(containment()->screen()).y());
|
||||
regVal << QVariant::fromValue(QRectF(rect));
|
||||
}
|
||||
return regVal;
|
||||
@ -191,8 +191,8 @@ QRect ContainmentInterface::availableScreenRect() const
|
||||
if (containment()->screen() > -1 && containment()->corona()) {
|
||||
rect = containment()->corona()->availableScreenRect(containment()->screen());
|
||||
//make it relative
|
||||
rect.setX(rect.x() - containment()->corona()->screenGeometry(containment()->screen()).x());
|
||||
rect.setY(rect.y() - containment()->corona()->screenGeometry(containment()->screen()).y());
|
||||
rect.moveTo(rect.x() - containment()->corona()->screenGeometry(containment()->screen()).x(),
|
||||
rect.y() - containment()->corona()->screenGeometry(containment()->screen()).y());
|
||||
}
|
||||
|
||||
return rect;
|
||||
|
Loading…
Reference in New Issue
Block a user