Cocoa: call SetFrontProcess on raise()

This will raise the window in front of windows from
other processes as well. Following Qt 4, only do this
for top-level windows.

Task-number: QTBUG-29087
Change-Id: Iae1b9c2928a627501112f97728198ed6dd614b2d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
bb10
Morten Johan Sørvig 2014-03-13 13:44:44 +01:00 committed by The Qt Project
parent 04e8c5d5e8
commit ecd70c038a
1 changed files with 3 additions and 0 deletions

View File

@ -935,6 +935,9 @@ void QCocoaWindow::raise()
[parentNSWindow addChildWindow:m_nsWindow ordered:NSWindowAbove];
} else {
[m_nsWindow orderFront: m_nsWindow];
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
SetFrontProcessWithOptions(&psn, kSetFrontProcessFrontWindowOnly);
}
}
}