summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 985f825..78fc704 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -275,6 +275,8 @@ static const char * x11_atomnames = {
"_NET_SYSTEM_TRAY_VISUAL\0"
+ "_NET_ACTIVE_WINDOW\0"
+
// Property formats
"COMPOUND_TEXT\0"
"TEXT\0"
@@ -667,11 +669,6 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
return 0;
break;
- case BadMatch:
- if (err->request_code == 42 /* X_SetInputFocus */)
- return 0;
- break;
-
default:
#if !defined(QT_NO_XINPUT)
if (err->request_code == X11->xinput_major
@@ -3058,6 +3055,8 @@ int QApplication::x11ClientMessage(QWidget* w, XEvent* event, bool passive_only)
if ((ulong) event->xclient.data.l[1] > X11->time)
X11->time = event->xclient.data.l[1];
QWidget *amw = activeModalWidget();
+ if (amw && amw->testAttribute(Qt::WA_X11DoNotAcceptFocus))
+ amw = 0;
if (amw && !QApplicationPrivate::tryModalHelper(widget, 0)) {
QWidget *p = amw->parentWidget();
while (p && p != widget)