diff options
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 67e0865..78fc704 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -669,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 diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 457e92c..37ac6bf 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1661,7 +1661,8 @@ void QWidget::activateWindow() XSendEvent(X11->display, RootWindow(X11->display, tlw->x11Info().screen()), false, SubstructureNotifyMask | SubstructureRedirectMask, &e); } else { - XSetInputFocus(X11->display, tlw->internalWinId(), XRevertToParent, X11->time); + if (!qt_widget_private(tlw)->topData()->waitingForMapNotify) + XSetInputFocus(X11->display, tlw->internalWinId(), XRevertToParent, X11->time); } } } |