Skip to content

Commit 48e79f1

Browse files
Fixed Linux bug in DockFocusController.cpp
1 parent 89aa3d5 commit 48e79f1

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/DockFocusController.cpp

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,19 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
168168
#ifdef Q_OS_LINUX
169169
// This code is required for styling the floating widget titlebar for linux
170170
// depending on the current focus state
171-
if (FloatingWidget == NewFloatingWidget)
172-
{
173-
return;
174-
}
175-
176-
if (FloatingWidget)
177-
{
178-
updateFloatingWidgetFocusStyle(FloatingWidget, false);
179-
}
180-
FloatingWidget = NewFloatingWidget;
171+
if (FloatingWidget != NewFloatingWidget)
172+
{
173+
if (FloatingWidget)
174+
{
175+
updateFloatingWidgetFocusStyle(FloatingWidget, false);
176+
}
177+
FloatingWidget = NewFloatingWidget;
181178

182-
if (FloatingWidget)
183-
{
184-
updateFloatingWidgetFocusStyle(FloatingWidget, true);
185-
}
179+
if (FloatingWidget)
180+
{
181+
updateFloatingWidgetFocusStyle(FloatingWidget, true);
182+
}
183+
}
186184
#endif
187185

188186
if (old == DockWidget && !ForceFocusChangedSignal)

0 commit comments

Comments
 (0)