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/qqnxscreeneventhandler.cpp26
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index 5d230e2145..f211883e4f 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -591,6 +591,10 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event)
case SCREEN_PROPERTY_FOCUS:
handleKeyboardFocusPropertyEvent(window);
break;
+ case SCREEN_PROPERTY_SIZE:
+ case SCREEN_PROPERTY_POSITION:
+ handleGeometryPropertyEvent(window);
+ break;
default:
// event ignored
qScreenEventDebug() << "Ignore property event for property: " << property;
@@ -617,6 +621,28 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi
m_focusLostTimer = startTimer(50);
}
+void QQnxScreenEventHandler::handleGeometryPropertyEvent(screen_window_t window)
+{
+ int pos[2];
+ if (screen_get_window_property_iv(window, SCREEN_PROPERTY_POSITION, pos) != 0) {
+ qFatal("QQnx: failed to query window property, errno=%d", errno);
+ }
+
+ int size[2];
+ if (screen_get_window_property_iv(window, SCREEN_PROPERTY_SIZE, size) != 0) {
+ qFatal("QQnx: failed to query window property, errno=%d", errno);
+ }
+
+ QRect rect(pos[0], pos[1], size[0], size[1]);
+ QWindow *qtWindow = QQnxIntegration::window(window);
+ if (qtWindow) {
+ qtWindow->setGeometry(rect);
+ QWindowSystemInterface::handleGeometryChange(qtWindow, rect);
+ }
+
+ qScreenEventDebug() << qtWindow << "moved to" << rect;
+}
+
void QQnxScreenEventHandler::timerEvent(QTimerEvent *event)
{
if (event->timerId() == m_focusLostTimer) {
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
index d872f9b9aa..40697b7a09 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
@@ -85,6 +85,7 @@ private:
void handleDisplayEvent(screen_event_t event);
void handlePropertyEvent(screen_event_t event);
void handleKeyboardFocusPropertyEvent(screen_window_t window);
+ void handleGeometryPropertyEvent(screen_window_t window);
private:
enum {