summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-07 10:18:50 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-07 10:24:33 +0200
commit5d6073be27cb951b692bbcc4dc0dd54cc09c9fd4 (patch)
treec87c236cd1b9c15eb5f40df3d86915687ab6c59a /src/plugins/platforms/xcb/qxcbconnection.cpp
parent97d7d80e7355019bb23bb03c2a82908e4436deb0 (diff)
parentbbb67ca32cebad312f02e916dff54e591b92af24 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index d7eeb5d118..c2e4edf2d5 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1092,7 +1092,9 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
break;
case XCB_SELECTION_REQUEST:
{
+#if QT_CONFIG(draganddrop) || QT_CONFIG(clipboard)
xcb_selection_request_event_t *sr = reinterpret_cast<xcb_selection_request_event_t *>(event);
+#endif
#ifndef QT_NO_DRAGANDDROP
if (sr->selection == atom(QXcbAtom::XdndSelection))
m_drag->handleSelectionRequest(sr);
@@ -1285,9 +1287,9 @@ void QXcbEventReader::unlock()
m_mutex.unlock();
}
-void QXcbConnection::setFocusWindow(QXcbWindow *w)
+void QXcbConnection::setFocusWindow(QWindow *w)
{
- m_focusWindow = w;
+ m_focusWindow = w ? static_cast<QXcbWindow *>(w->handle()) : nullptr;
}
void QXcbConnection::setMouseGrabber(QXcbWindow *w)
{