summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxbpseventfilter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp
index 4ce38b9fdc..2e4583119f 100644
--- a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp
+++ b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp
@@ -100,6 +100,17 @@ void QQnxBpsEventFilter::registerForScreenEvents(QQnxScreen *screen)
return;
}
+ int attached;
+ if (screen_get_display_property_iv(screen->nativeDisplay(), SCREEN_PROPERTY_ATTACHED, &attached) != BPS_SUCCESS) {
+ qWarning() << "QQNX: unable to query display attachment";
+ return;
+ }
+
+ if (!attached) {
+ qBpsEventFilterDebug() << "skipping event registration for non-attached screen";
+ return;
+ }
+
if (screen_request_events(screen->nativeContext()) != BPS_SUCCESS)
qWarning("QQNX: failed to register for screen events on screen %p", screen->nativeContext());
}