summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 3e63ab0f27..458ba8f07f 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -398,12 +398,14 @@ void QXcbWindow::setGeometry(const QRect &rect)
propagateSizeHints();
const quint32 mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
- const quint32 values[] = { rect.x(),
- rect.y(),
- qBound(1, rect.width(), XCOORD_MAX),
- qBound(1, rect.height(), XCOORD_MAX) };
+ const qint32 values[] = {
+ qBound<qint32>(-XCOORD_MAX, rect.x(), XCOORD_MAX),
+ qBound<qint32>(-XCOORD_MAX, rect.y(), XCOORD_MAX),
+ qBound<qint32>(1, rect.width(), XCOORD_MAX),
+ qBound<qint32>(1, rect.height(), XCOORD_MAX),
+ };
- Q_XCB_CALL(xcb_configure_window(xcb_connection(), m_window, mask, values));
+ Q_XCB_CALL(xcb_configure_window(xcb_connection(), m_window, mask, reinterpret_cast<const quint32*>(values)));
xcb_flush(xcb_connection());
}
@@ -551,7 +553,7 @@ void QXcbWindow::show()
updateNetWmStateBeforeMap();
}
- if (connection()->time() != CurrentTime)
+ if (connection()->time() != XCB_TIME_CURRENT_TIME)
updateNetWmUserTime(connection()->time());
Q_XCB_CALL(xcb_map_window(xcb_connection(), m_window));
@@ -1300,6 +1302,7 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even
connection()->drag()->handleLeave(window(), event);
} else if (event->type == atom(QXcbAtom::XdndDrop)) {
connection()->drag()->handleDrop(window(), event);
+ } else if (event->type == atom(QXcbAtom::_XEMBED)) { // QSystemTrayIcon
} else {
qWarning() << "QXcbWindow: Unhandled client message:" << connection()->atomName(event->type);
}