summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 2878551393..4156fd87e6 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -129,6 +129,7 @@ void QWindow::setVisible(bool visible)
if (d->visible == visible)
return;
d->visible = visible;
+ emit visibleChanged(visible);
if (!d->platformWindow)
create();
@@ -383,10 +384,14 @@ Qt::ScreenOrientation QWindow::orientation() const
void QWindow::setOrientation(Qt::ScreenOrientation orientation)
{
Q_D(QWindow);
+ if (orientation == d->orientation)
+ return;
+
d->orientation = orientation;
if (d->platformWindow) {
d->platformWindow->setOrientation(orientation);
}
+ emit orientationChanged(orientation);
}
Qt::WindowState QWindow::windowState() const
@@ -519,12 +524,25 @@ void QWindow::setSizeIncrement(const QSize &size)
void QWindow::setGeometry(const QRect &rect)
{
Q_D(QWindow);
+ if (rect == geometry())
+ return;
+ QRect oldRect = geometry();
+
d->positionPolicy = QWindowPrivate::WindowFrameExclusive;
if (d->platformWindow) {
d->platformWindow->setGeometry(rect);
} else {
d->geometry = rect;
}
+
+ if (rect.x() != oldRect.x())
+ emit xChanged(rect.x());
+ if (rect.y() != oldRect.y())
+ emit yChanged(rect.y());
+ if (rect.width() != oldRect.width())
+ emit widthChanged(rect.width());
+ if (rect.height() != oldRect.height())
+ emit heightChanged(rect.height());
}
/*!