From 843247e1c509ec3ce55a2e2051b83fcfa6634135 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 14 Oct 2016 13:05:00 +0200 Subject: 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 --- src/widgets/kernel/qwidgetwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/kernel/qwidgetwindow.cpp') 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(); -- cgit v1.2.3