Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: the focusable CDockWidget would lose focus when another QWindow containing a CDockManager that contains a focusable CDockWidget gains focus #664

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/DockFocusController.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
return;
}

d->updateDockWidgetFocus(DockWidget);
if(DockWidget->dockManager() == d->DockManager)
d->updateDockWidgetFocus(DockWidget);
}


Expand Down Expand Up @@ -298,18 +299,19 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
if (!DockWidget || DockWidget->tabWidget()->isHidden())
{
return;
}
}
#endif

d->updateDockWidgetFocus(DockWidget);
if(DockWidget->dockManager() == d->DockManager)
d->updateDockWidgetFocus(DockWidget);
}


//===========================================================================
void CDockFocusController::setDockWidgetTabFocused(CDockWidgetTab* Tab)
{
auto DockWidget = Tab->dockWidget();
if (DockWidget)
if (DockWidget && DockWidget->dockManager() == d->DockManager)
{
d->updateDockWidgetFocus(DockWidget);
}
Expand All @@ -327,7 +329,8 @@ void CDockFocusController::clearDockWidgetFocus(CDockWidget* dockWidget)
//===========================================================================
void CDockFocusController::setDockWidgetFocused(CDockWidget* focusedNow)
{
d->updateDockWidgetFocus(focusedNow);
if(focusedNow->dockManager() == d->DockManager)
d->updateDockWidgetFocus(focusedNow);
}


Expand Down