diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-07-05 14:15:29 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-07-05 14:29:08 +0000 |
commit | b55fac3f3763ffae3bf99f2afea7e5d5f8b7c2a8 (patch) | |
tree | 43c2f226ccaf62ceaf7957590647b8e1aa329148 /src/plugins/platforms/xcb/qxcbconnection.cpp | |
parent | 44602224bfae7bea08e5883768cfeef6629ac503 (diff) |
xcb: reduce focus-in delay
This patch amends fe63900dc9891dd355ca1f10d6c7e5fd1516f5d5
The previous value of 400ms was a random and seemingly harmless choice.
It turns out that 400ms is a bit too long and interferes with x11 async
behavior tweaks in the VirtualBox source code.
The original aim of specifying a concrete delay was to fix the
nondeterministic behavior of the pre-existing code and to avoid flickering
on KWin caused by waiting too little. This patch changes 400ms -> 100ms,
which seems to work better in practice.
Fixes: QTBUG-76742
Change-Id: Ia8168216819ac41d0124622c9472a98a1877262f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 06d1000993..f98b2dfe3a 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -132,7 +132,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra if (!m_startupId.isNull()) qunsetenv("DESKTOP_STARTUP_ID"); + const int focusInDelay = 100; m_focusInTimer.setSingleShot(true); + m_focusInTimer.setInterval(focusInDelay); m_focusInTimer.callOnTimeout([]() { // No FocusIn events for us, proceed with FocusOut normally. QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason); |