From 48e79f12a7a072affaeaccb00c9aa32eb40eb0bb Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Mon, 11 Oct 2021 22:05:37 +0200 Subject: [PATCH] Fixed Linux bug in DockFocusController.cpp --- src/DockFocusController.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/DockFocusController.cpp b/src/DockFocusController.cpp index dd9be65..f958111 100644 --- a/src/DockFocusController.cpp +++ b/src/DockFocusController.cpp @@ -168,21 +168,19 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget) #ifdef Q_OS_LINUX // This code is required for styling the floating widget titlebar for linux // depending on the current focus state - if (FloatingWidget == NewFloatingWidget) - { - return; - } + if (FloatingWidget != NewFloatingWidget) + { + if (FloatingWidget) + { + updateFloatingWidgetFocusStyle(FloatingWidget, false); + } + FloatingWidget = NewFloatingWidget; - if (FloatingWidget) - { - updateFloatingWidgetFocusStyle(FloatingWidget, false); - } - FloatingWidget = NewFloatingWidget; - - if (FloatingWidget) - { - updateFloatingWidgetFocusStyle(FloatingWidget, true); - } + if (FloatingWidget) + { + updateFloatingWidgetFocusStyle(FloatingWidget, true); + } + } #endif if (old == DockWidget && !ForceFocusChangedSignal)