void-packages/srcpkgs/qt5/patches/0048-qtbug-76742.patch
Jürgen Buchmüller 29ebf19655
qt5: fix QTBUG-76742 (focus stealing)
Closes: #13126

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-07-21 14:10:34 +02:00

25 lines
1.1 KiB
Diff

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 {