Change window activation order if active window is moved
Active window should always be in front of the stack so bring it to the front of the stack if it's not. Pick-to: 6.8 Fixes: QTBUG-112758 Change-Id: Iff123d1e95f728f51b786106d83a429c111aa6a8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit e6e210c2406e8d4cfe67543871af5fe14a2bda82) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3e0276990d
commit
34167f6622
@ -772,6 +772,17 @@ void QMdiAreaPrivate::_q_moveTab(int from, int to)
|
||||
Q_UNUSED(to);
|
||||
#else
|
||||
childWindows.move(from, to);
|
||||
|
||||
// Put the active window in front to update activation order.
|
||||
const int indexToActiveWindow = childWindows.indexOf(active);
|
||||
if (indexToActiveWindow != -1) {
|
||||
const int index = indicesToActivatedChildren.indexOf(indexToActiveWindow);
|
||||
Q_ASSERT(index != -1);
|
||||
if (index != 0) { // if it's not in front
|
||||
indicesToActivatedChildren.move(index, 0);
|
||||
internalRaise(active);
|
||||
}
|
||||
}
|
||||
#endif // QT_CONFIG(tabbar)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user