diff options
author | Robert Griebl <rgriebl@trolltech.com> | 2010-03-22 15:00:23 (GMT) |
---|---|---|
committer | Robert Griebl <rgriebl@trolltech.com> | 2010-03-22 15:02:54 (GMT) |
commit | 9cfda3493ce4086313072a216d6a5b4f796c40d3 (patch) | |
tree | 09bd056a81589b1363d422a76631a637895f14d7 /src/gui/kernel/qapplication_x11.cpp | |
parent | 0a03e65d9e1722cb055ccce93801e1471e7f6e84 (diff) | |
download | Qt-9cfda3493ce4086313072a216d6a5b4f796c40d3.zip Qt-9cfda3493ce4086313072a216d6a5b4f796c40d3.tar.gz Qt-9cfda3493ce4086313072a216d6a5b4f796c40d3.tar.bz2 |
Add a new WA_X11DoNotAcceptFocus attribute for top-level widgets (part 2).
Forgot the documentation and ignoring WM_TAKE_FOCUS messages for modal
windows in part 1 (9da453e5579ebb6fb0361e4df4cfa7107e560b23)
Reviewed-by: bhughes
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index e276ed2..67e0865 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3060,6 +3060,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) |