summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp
index 6d67691..f4def83 100644
--- a/src/gui/kernel/qx11embed_x11.cpp
+++ b/src/gui/kernel/qx11embed_x11.cpp
@@ -492,6 +492,9 @@ QX11EmbedWidget::QX11EmbedWidget(QWidget *parent)
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QApplication::instance()->installEventFilter(this);
+ // Focus itself at first.
+ qApp->setActiveWindow(this);
+
#ifdef QX11EMBED_DEBUG
qDebug() << "QX11EmbedWidget::QX11EmbedWidget: constructed client"
<< (void *)this << "with winId" << winId();