mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-03-15 02:29:52 +08:00
Fixed #722 - Ensure that application is in front of other application what dragging floating windows
This commit is contained in:
parent
ddbed9ea14
commit
90e5adde29
@ -248,6 +248,15 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
// bring the main application window that hosts the dock manager in front of
|
||||
// any other application
|
||||
d->DockManager->raise();
|
||||
|
||||
// ensure that the dragged floating window is in front of the main application window
|
||||
focusWindow->raise();
|
||||
#endif
|
||||
|
||||
auto vDockWidget = focusWindow->property(FocusedDockWidgetProperty);
|
||||
if (!vDockWidget.isValid())
|
||||
{
|
||||
|
@ -1523,6 +1523,16 @@ QVariant CDockManager::configParam(eConfigParam Param, QVariant Default)
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
void CDockManager::raise()
|
||||
{
|
||||
if (parentWidget())
|
||||
{
|
||||
parentWidget()->raise();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace ads
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -770,6 +770,12 @@ public Q_SLOTS:
|
||||
*/
|
||||
void hideManagerAndFloatingWidgets();
|
||||
|
||||
/**
|
||||
* Calls raise() for the widget that hosts this dock manager.
|
||||
* This will bring the widget in front of any other application that is running
|
||||
*/
|
||||
void raise();
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* This signal is emitted if the list of perspectives changed.
|
||||
|
Loading…
Reference in New Issue
Block a user