Date: Sunday, June 30, 2019 @ 14:43:02 Author: arojas Revision: 357116
Fix focus issues with VirtualBox (FS#62999) Added: qt5-base/trunk/virtualbox-focus.patch Modified: qt5-base/trunk/PKGBUILD ------------------------+ PKGBUILD | 9 ++++++--- virtualbox-focus.patch | 12 ++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-06-30 13:07:46 UTC (rev 357115) +++ PKGBUILD 2019-06-30 14:43:02 UTC (rev 357116) @@ -5,7 +5,7 @@ pkgname=(qt5-base qt5-xcb-private-headers) _qtver=5.13.0 pkgver=${_qtver/-/} -pkgrel=4 +pkgrel=5 arch=('x86_64') url='https://www.qt.io' license=('GPL3' 'LGPL3' 'FDL' 'custom') @@ -28,10 +28,12 @@ _pkgfqn="${pkgbase/5-/}-everywhere-src-${_qtver}" source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" qtbase-qxcbwindow.patch::"https://code.qt.io/cgit/qt/qtbase.git/patch/?id=0c183117" - qtbase-zlib-compression.patch::"https://code.qt.io/cgit/qt/qtbase.git/patch/?id=cbdc9a77") + qtbase-zlib-compression.patch::"https://code.qt.io/cgit/qt/qtbase.git/patch/?id=cbdc9a77" + virtualbox-focus.patch) sha256sums=('ff6964b3b528cd3b1d21bcf3470006e8e5cbe69591923f982871d886ea0488fe' '51878fdf91d3f191fb4e19cd9ec3fc4c564bbf1eabe92802b40db2ec8ad1d646' - '9300d8ab7abe4145e92eea75178a26ad3d5a71b0646665c3776ca2c375dd1233') + '9300d8ab7abe4145e92eea75178a26ad3d5a71b0646665c3776ca2c375dd1233' + 'bbd38c3bdad29b6978f5b5514f9d6fd7c109bc2b47fed86bafe22e7d4c77b532') prepare() { cd ${_pkgfqn} @@ -45,6 +47,7 @@ patch -p1 -i ../qtbase-qxcbwindow.patch # Fix NVIDIA freeze patch -p1 -i ../qtbase-zlib-compression.patch # Change the default compression back to zlib for backwards compatibility + patch -p1 -i ../virtualbox-focus.patch # Fix virtualbox constantly stealing focus https://bugreports.qt.io/browse/QTBUG-76742 } build() { Added: virtualbox-focus.patch =================================================================== --- virtualbox-focus.patch (rev 0) +++ virtualbox-focus.patch 2019-06-30 14:43:02 UTC (rev 357116) @@ -0,0 +1,12 @@ +diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp +index 9382488b74..d87713db40 100644 +--- a/src/plugins/platforms/xcb/qxcbwindow.cpp ++++ b/src/plugins/platforms/xcb/qxcbwindow.cpp +@@ -846,6 +846,7 @@ void QXcbWindow::doFocusIn() + void QXcbWindow::doFocusOut() + { + connection()->setFocusWindow(nullptr); ++ QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason); + relayFocusToModalWindow(); + // Do not set the active window to nullptr if there is a FocusIn coming. + connection()->focusInTimer().start(400);