From bd86e1cb67c01f8085ee1e48324b5694187bd399 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 29 Apr 2020 19:50:13 +0200 Subject: [PATCH] Gui: [skip ci] fix locking keyboard when showing progress bar on Linux systems --- src/Gui/ProgressBar.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Gui/ProgressBar.cpp b/src/Gui/ProgressBar.cpp index 9f9dc61b66..69ac62bc9c 100644 --- a/src/Gui/ProgressBar.cpp +++ b/src/Gui/ProgressBar.cpp @@ -498,17 +498,25 @@ void ProgressBar::enterControlEvents(bool grab) // Make sure that we get the key events, otherwise the Inventor viewer usurps the key events // This also disables accelerators. +#if defined(Q_OS_LINUX) + Q_UNUSED(grab) +#else if (grab) grabKeyboard(); +#endif } void ProgressBar::leaveControlEvents(bool release) { qApp->removeEventFilter(this); +#if defined(Q_OS_LINUX) + Q_UNUSED(release) +#else // release the keyboard again if (release) releaseKeyboard(); +#endif } #ifdef QT_WINEXTRAS_LIB