summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qx11embed_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qx11embed_x11.cpp')
-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 6d67691e84..f4def8332c 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();