From d032ff63885bd7faa7ec3a6066024fdb08248ffc Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Wed, 16 Apr 2014 19:20:16 +0200 Subject: QNX: Don't create a platform window for a desktop widget As I understand it the QDesktopWidget does only serve the purpose of returning the screen size and number. It does not need a real platform window. This removes some overhead, because a desktop widget is always created. Change-Id: I8c0d86bbb46b1f32094fda1592df795af6bb423f Reviewed-by: Rafael Roquetto --- src/plugins/platforms/qnx/qqnxrasterwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/qnx/qqnxrasterwindow.cpp') diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp index eb9fac540f..ead6e73a87 100644 --- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp @@ -64,10 +64,13 @@ QQnxRasterWindow::QQnxRasterWindow(QWindow *window, screen_context_t context, bo initWindow(); // Set window usage + if (window->type() == Qt::Desktop) + return; + const int val = SCREEN_USAGE_NATIVE | SCREEN_USAGE_READ | SCREEN_USAGE_WRITE; const int result = screen_set_window_property_iv(nativeHandle(), SCREEN_PROPERTY_USAGE, &val); if (result != 0) - qFatal("QQnxEglWindow: failed to set window alpha usage, errno=%d", errno); + qFatal("QQnxRasterWindow: failed to set window alpha usage, errno=%d", errno); } void QQnxRasterWindow::post(const QRegion &dirty) -- cgit v1.2.3