diff options
author | Andy Shaw <andy.shaw@qt.io> | 2016-10-14 13:05:00 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2016-10-24 16:01:35 +0000 |
commit | 843247e1c509ec3ce55a2e2051b83fcfa6634135 (patch) | |
tree | 0d41edd2ba25144e035b3f2fed8ba04f7f294aaf | |
parent | f6eb570c7dee2ec92383607c614db91f31804707 (diff) |
Call raise on the window that contains the widget and not the widget
When the mouse is clicked on the widget in a window while a popup is
visible then it should raise just the window and not the widget inside it.
If the widget is in a stacked layout then calling raise() on it can cause
it to appear on top so avoid this by calling raise() directly on the
window.
Task-number: QTBUG-52670
Change-Id: Idd287c6cc7038c57e14e92f4a3e1c50985925684
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 95f63025fb..40c488857e 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -529,7 +529,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) // activate window of the widget under mouse pointer if (!w->isActiveWindow()) { w->activateWindow(); - w->raise(); + w->window()->raise(); } QWindow *win = w->windowHandle(); |