The HDMI display on the Playbook is listed, but (normally) unattached,
and hence generates an error if we attempt to register for events. This
patch avoids the warning; a future change will actually watch for screens
being attached / detached and update the QPlatformScreens and event
registration correctly.
Change-Id: I5a9cc773648d50f657fe1b3611fd42495ca7e836
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
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());
}