Skip to content

Commit 90e5add

Browse files
Fixed #722 - Ensure that application is in front of other application what dragging floating windows
1 parent ddbed9e commit 90e5add

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/DockFocusController.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
248248
return;
249249
}
250250

251+
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
252+
// bring the main application window that hosts the dock manager in front of
253+
// any other application
254+
d->DockManager->raise();
255+
256+
// ensure that the dragged floating window is in front of the main application window
257+
focusWindow->raise();
258+
#endif
259+
251260
auto vDockWidget = focusWindow->property(FocusedDockWidgetProperty);
252261
if (!vDockWidget.isValid())
253262
{

src/DockManager.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,16 @@ QVariant CDockManager::configParam(eConfigParam Param, QVariant Default)
15231523
}
15241524

15251525

1526+
//===========================================================================
1527+
void CDockManager::raise()
1528+
{
1529+
if (parentWidget())
1530+
{
1531+
parentWidget()->raise();
1532+
}
1533+
}
1534+
1535+
15261536
} // namespace ads
15271537

15281538
//---------------------------------------------------------------------------

src/DockManager.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,12 @@ public Q_SLOTS:
770770
*/
771771
void hideManagerAndFloatingWidgets();
772772

773+
/**
774+
* Calls raise() for the widget that hosts this dock manager.
775+
* This will bring the widget in front of any other application that is running
776+
*/
777+
void raise();
778+
773779
Q_SIGNALS:
774780
/**
775781
* This signal is emitted if the list of perspectives changed.

0 commit comments

Comments
 (0)