diff --git a/srcpkgs/qt5/patches/0048-qtbug-76742.patch b/srcpkgs/qt5/patches/0048-qtbug-76742.patch new file mode 100644 index 00000000000..311ad55e4d4 --- /dev/null +++ b/srcpkgs/qt5/patches/0048-qtbug-76742.patch @@ -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 { diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index bac09fe26a3..59c7b1930f2 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -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