Always call raise() before activateWindow().

This commit is contained in:
John Preston 2021-06-07 11:24:22 +04:00
parent 02049aeaa8
commit b1d5ed4ab5
3 changed files with 4 additions and 0 deletions

View file

@ -27,6 +27,7 @@ void ActivateWindowDelayed(not_null<QWidget*> widget) {
crl::on_main(Window, [=] {
if (const auto widget = base::take(Window)) {
if (!widget->isHidden()) {
widget->raise();
widget->activateWindow();
}
}

View file

@ -3469,6 +3469,7 @@ void InputField::dropEventInner(QDropEvent *e) {
_inDrop = false;
_insertedTags.clear();
_realInsertPosition = -1;
window()->raise();
window()->activateWindow();
}

View file

@ -304,6 +304,7 @@ void PopupMenu::childHiding(PopupMenu *child) {
_activeSubmenu = SubmenuPointer();
}
if (!_hiding && !isHidden()) {
raise();
activateWindow();
}
}
@ -538,6 +539,7 @@ void PopupMenu::showMenu(const QPoint &p, PopupMenu *parent, TriggeredSource sou
Platform::UpdateOverlayed(this);
show();
Platform::ShowOverAll(this);
raise();
activateWindow();
}