Fixed Linux bug in DockFocusController.cpp

This commit is contained in:
Uwe Kindler 2021-10-11 22:05:37 +02:00
parent 89aa3d5251
commit 48e79f12a7

View File

@ -168,21 +168,19 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
// This code is required for styling the floating widget titlebar for linux // This code is required for styling the floating widget titlebar for linux
// depending on the current focus state // depending on the current focus state
if (FloatingWidget == NewFloatingWidget) if (FloatingWidget != NewFloatingWidget)
{ {
return; if (FloatingWidget)
} {
updateFloatingWidgetFocusStyle(FloatingWidget, false);
}
FloatingWidget = NewFloatingWidget;
if (FloatingWidget) if (FloatingWidget)
{ {
updateFloatingWidgetFocusStyle(FloatingWidget, false); updateFloatingWidgetFocusStyle(FloatingWidget, true);
} }
FloatingWidget = NewFloatingWidget; }
if (FloatingWidget)
{
updateFloatingWidgetFocusStyle(FloatingWidget, true);
}
#endif #endif
if (old == DockWidget && !ForceFocusChangedSignal) if (old == DockWidget && !ForceFocusChangedSignal)