Skip to content

Commit c4d2d72

Browse files
Added activateWindow() call in CFloatingDockCiontainer::showEvent
This is required to properly style the floating widget that contains the currently focused widget
1 parent f90f0b0 commit c4d2d72

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/DockManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ void CDockManager::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focus
10341034
return;
10351035
}
10361036
std::cout << "CDockManager::onFocusChanged" << std::endl;
1037+
std::cout << "focusedNow " << focusedNow << std::endl;
10371038
Q_UNUSED(focusedOld)
10381039
if (!focusedNow)
10391040
{

src/FloatingDockContainer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,17 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
804804
d->Hiding = false;
805805
}
806806

807+
807808
//============================================================================
808809
void CFloatingDockContainer::showEvent(QShowEvent *event)
809810
{
810811
Super::showEvent(event);
812+
#ifdef Q_OS_LINUX
813+
if (CDockManager::testConfigFlag(CDockManager::FocusStyling))
814+
{
815+
this->window()->activateWindow();
816+
}
817+
#endif
811818
}
812819

813820

0 commit comments

Comments
 (0)