summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-20 16:45:12 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-20 16:45:12 +0200
commit6213b8145772d3dc584907a544f6c46b8cef74e2 (patch)
tree4c1902793bb78511e63c09cbe92f9eda6b3d7237 /src/plugins/platforms/qnx
parent75e9c7d6bc662e62e9ce8b641588183992c1e8bf (diff)
parent25739bebba0343a8b35775a073c49f0fba080762 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp3
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp6
-rw-r--r--src/plugins/platforms/qnx/qqnxrootwindow.cpp10
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp1
4 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 005b6d272a..ed959467ff 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -315,6 +315,9 @@ void QQnxGLContext::createSurface(QPlatformSurface *surface)
}
platformWindow->setBufferSize(surfaceSize);
+ // Post root window, in case it hasn't been posted yet, to make it appear.
+ platformWindow->screen()->onWindowPost(platformWindow);
+
// Obtain the native handle for our window
screen_window_t handle = platformWindow->nativeHandle();
diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
index 17b0d06245..1da3cd5446 100644
--- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
@@ -81,6 +81,12 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion &region, const
{
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << this->window();
+ // Sometimes this method is called even though there is nothing to be
+ // flushed, for instance, after an expose event directly follows a
+ // geometry change event.
+ if (!m_hasUnflushedPaintOperations)
+ return;
+
QQnxWindow *targetWindow = 0;
if (window)
targetWindow = static_cast<QQnxWindow *>(window->handle());
diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.cpp b/src/plugins/platforms/qnx/qqnxrootwindow.cpp
index 5d58890c51..ff5866d1b7 100644
--- a/src/plugins/platforms/qnx/qqnxrootwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrootwindow.cpp
@@ -162,6 +162,16 @@ QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen)
if (result != 0)
qFatal("QQnxRootWindow: failed to set window source position, errno=%d", errno);
+ // Optionally disable the screen power save
+ bool ok = false;
+ const int disablePowerSave = qgetenv("QQNX_DISABLE_POWER_SAVE").toInt(&ok);
+ if (ok && disablePowerSave) {
+ const int mode = SCREEN_IDLE_MODE_KEEP_AWAKE;
+ result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_IDLE_MODE, &mode);
+ if (result != 0)
+ qWarning("QQnxRootWindow: failed to disable power saving mode");
+ }
+
createWindowGroup();
// Don't post yet. This will be lazily done from QQnxScreen upon first posting of
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index cd79ae73fd..e872e372bf 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -199,6 +199,7 @@ void QQnxWindow::setGeometry(const QRect &rect)
// could result in re-entering QQnxWindow::setGeometry() again.
QWindowSystemInterface::setSynchronousWindowsSystemEvents(true);
QWindowSystemInterface::handleGeometryChange(window(), rect);
+ QWindowSystemInterface::handleExposeEvent(window(), rect);
QWindowSystemInterface::setSynchronousWindowsSystemEvents(false);
// Now move all children.