qt5: fix QTBUG-76742 (focus stealing)

Closes: #13126

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2019-07-21 12:01:35 +02:00
parent a9d324ada5
commit 29ebf19655
No known key found for this signature in database
GPG Key ID: DE55AD8DBEBB4EE8
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,25 @@
Source: https://codereview.qt-project.org/c/qt/qtbase/+/267242
Upstream: yes
Reason: fix focus stealing in applications (e.g. VirtualBox)
--- qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp 2019-06-13 06:18:18.000000000 +0200
+++ qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp 2019-07-21 11:56:22.250127747 +0200
@@ -133,6 +133,7 @@
qunsetenv("DESKTOP_STARTUP_ID");
m_focusInTimer.setSingleShot(true);
+ m_focusInTimer.setInterval(100);
m_focusInTimer.callOnTimeout([]() {
// No FocusIn events for us, proceed with FocusOut normally.
QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason);
--- qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp 2019-06-13 06:18:18.000000000 +0200
+++ qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp 2019-07-21 11:58:00.255122346 +0200
@@ -848,7 +848,7 @@
connection()->setFocusWindow(nullptr);
relayFocusToModalWindow();
// Do not set the active window to nullptr if there is a FocusIn coming.
- connection()->focusInTimer().start(400);
+ connection()->focusInTimer().start();
}
struct QtMotifWmHints {

View File

@ -1,7 +1,7 @@
# Template file for 'qt5'
pkgname=qt5
version=5.13.0
revision=1
revision=2
wrksrc="qt-everywhere-src-${version}"
build_style=gnu-configure
hostmakedepends="cmake clang flex git glib-devel gperf ninja pkg-config