summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2010-03-22 14:35:03 (GMT)
committerRobert Griebl <rgriebl@trolltech.com>2010-03-22 14:37:11 (GMT)
commit9da453e5579ebb6fb0361e4df4cfa7107e560b23 (patch)
tree063555054f167d61f1bd8052c3fb05b191077cb4 /src/gui/kernel/qwidget.cpp
parent35ca28a576e7d71b789211bcad00fc4f907c6e91 (diff)
downloadQt-9da453e5579ebb6fb0361e4df4cfa7107e560b23.zip
Qt-9da453e5579ebb6fb0361e4df4cfa7107e560b23.tar.gz
Qt-9da453e5579ebb6fb0361e4df4cfa7107e560b23.tar.bz2
Add a new WA_X11DoNotAcceptFocus attribute for top-level widgets.
This should prevent window managers from ever sending a WM_TAKE_FOCUS message to those windows (useful for IM windows like virtual keyboards, notification banners, etc.) Reviewed-by: bhughes
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index af5fcd1..e88026c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -10550,6 +10550,10 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
case Qt::WA_X11OpenGLOverlay:
d->updateIsOpaque();
break;
+ case Qt::WA_X11DoNotAcceptFocus:
+ if (testAttribute(Qt::WA_WState_Created))
+ d->updateX11AcceptFocus();
+ break;
#endif
case Qt::WA_DontShowOnScreen: {
if (on && isVisible()) {