Added activateWindow() call in CFloatingDockCiontainer::showEvent

This is required to properly style the floating widget that contains the currently focused widget
This commit is contained in:
Uwe Kindler 2020-06-05 13:40:36 +02:00
parent f90f0b0427
commit c4d2d72e92
2 changed files with 8 additions and 0 deletions

View File

@ -1034,6 +1034,7 @@ void CDockManager::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focus
return; return;
} }
std::cout << "CDockManager::onFocusChanged" << std::endl; std::cout << "CDockManager::onFocusChanged" << std::endl;
std::cout << "focusedNow " << focusedNow << std::endl;
Q_UNUSED(focusedOld) Q_UNUSED(focusedOld)
if (!focusedNow) if (!focusedNow)
{ {

View File

@ -804,10 +804,17 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
d->Hiding = false; d->Hiding = false;
} }
//============================================================================ //============================================================================
void CFloatingDockContainer::showEvent(QShowEvent *event) void CFloatingDockContainer::showEvent(QShowEvent *event)
{ {
Super::showEvent(event); Super::showEvent(event);
#ifdef Q_OS_LINUX
if (CDockManager::testConfigFlag(CDockManager::FocusStyling))
{
this->window()->activateWindow();
}
#endif
} }