summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-01-22 10:19:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 21:21:27 +0100
commit3f99983e76d359cb45b15ae96150d4cc798b61c7 (patch)
treeb708416ff3427576b85b533138310762d4c2c459 /src/plugins/platforms/xcb/qxcbconnection.cpp
parent18f9eb797bffe8626f1edeca3c88f80dae0da8d7 (diff)
Fix focus handling of native child widgets in xcb.
Change-Id: If4d596195624011142bff6853849a23064e478df Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit fc663b5f9aae16fe6a03160e3eb148a5f742ac58)
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 7fc5847167..32de54562a 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -258,6 +258,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, const char
, has_randr_extension(false)
, has_input_shape(false)
, m_buttons(0)
+ , m_focusWindow(0)
{
#ifdef XCB_USE_XLIB
Display *dpy = XOpenDisplay(m_displayName.constData());
@@ -418,7 +419,7 @@ break;
if (QXcbWindow *platformWindow = platformWindowFromId(e->event)) { \
handled = QWindowSystemInterface::handleNativeEvent(platformWindow->window(), m_nativeInterface->genericEventFilterType(), event, &result); \
if (!handled) \
- m_keyboard->handler(platformWindow, e); \
+ m_keyboard->handler(m_focusWindow, e); \
} \
} \
break;
@@ -943,6 +944,11 @@ void QXcbEventReader::unlock()
m_mutex.unlock();
}
+void QXcbConnection::setFocusWindow(QXcbWindow *w)
+{
+ m_focusWindow = w;
+}
+
void QXcbConnection::sendConnectionEvent(QXcbAtom::Atom a, uint id)
{
xcb_client_message_event_t event;