summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow_qpa.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-02-21 14:58:57 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2012-02-21 14:58:57 +0100
commit31a0358afb4fde998d1eeeaa80fc32e4420266c7 (patch)
tree938455353474196c1f49b0529b5b644e19c21f3e /src/gui/kernel/qplatformwindow_qpa.cpp
parent4c8a4058c359c8d163c643120426079fc80c8214 (diff)
parent69da8588d41bbf5ab785f5ad7c1fce76deefc7d0 (diff)
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts: src/corelib/tools/qbytearray.h Change-Id: I03b1f3e05c9b7a45130887c522fcd9b7aa387129
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index c52a1cf757..e12228d7bd 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -114,6 +114,10 @@ QSurfaceFormat QPlatformWindow::format() const
can happen programatically(from ie. user application) or by the window manager. This means that
there is no need to call this function specifically from the window manager callback, instead
call QWindowSystemInterface::handleGeometryChange(QWindow *w, const QRect &newRect);
+
+ The position(x, y) part of the rect might be inclusive or exclusive of the window frame
+ as returned by frameMargins(). You can detect this in the plugin by checking
+ qt_window_private(window())->positionPolicy.
*/
void QPlatformWindow::setGeometry(const QRect &rect)
{
@@ -142,6 +146,7 @@ QMargins QPlatformWindow::frameMargins() const
void QPlatformWindow::setVisible(bool visible)
{
Q_UNUSED(visible);
+ QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size()));
}
/*!
Requests setting the window flags of this surface
@@ -152,6 +157,20 @@ Qt::WindowFlags QPlatformWindow::setWindowFlags(Qt::WindowFlags flags)
return flags;
}
+
+
+/*!
+ Returns if this window is exposed in the windowing system.
+
+ An exposeEvent() is sent every time this value changes.
+ */
+
+bool QPlatformWindow::isExposed() const
+{
+ Q_D(const QPlatformWindow);
+ return d->window->visible();
+}
+
/*!
Requests setting the window state of this surface
to \a type. Returns the actual state set.