From 741eb8cbb1a443ecad7b6a30dcd64fd857e3223d Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Fri, 3 May 2013 10:16:14 +0200 Subject: [PATCH] QNX: Add support for WindowDoesNotAcceptFocus flag Set SCREEN_PROPERTY_SENSITIVITY to SCREEN_SENSITIVITY_NO_FOCUS of the screen window when the Qt::WindowDoesNotAcceptFocus window flag is set. Change-Id: Iac0764a84186c382dcd3f4bdd31dd24ac15df768 Reviewed-by: Sean Harmer --- src/plugins/platforms/qnx/qqnxwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index a351ec865a..a556bed76a 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -136,6 +136,15 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context) qFatal("QQnxWindow: failed to set window swap interval, errno=%d", errno); } + if (window->flags() && Qt::WindowDoesNotAcceptFocus) { + errno = 0; + val = SCREEN_SENSITIVITY_NO_FOCUS; + result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SENSITIVITY, &val); + if (result != 0) { + qFatal("QQnxWindow: failed to set window sensitivity, errno=%d", errno); + } + } + setScreen(static_cast(window->screen()->handle())); // Add window to plugin's window mapper