mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Reactive main window only if app is active.
Otherwise when we choose "Show in Folder" app looses focus, then destroys PopupMenu and instantly regains focus back.
This commit is contained in:
@@ -503,11 +503,13 @@ PopupMenu::~PopupMenu() {
|
||||
delete submenu;
|
||||
}
|
||||
if (const auto parent = parentWidget()) {
|
||||
crl::on_main(parent, [=] {
|
||||
if (!parent->isHidden()) {
|
||||
parent->activateWindow();
|
||||
}
|
||||
});
|
||||
if (qApp->focusWidget() != nullptr) {
|
||||
crl::on_main(parent, [=] {
|
||||
if (!parent->isHidden()) {
|
||||
parent->activateWindow();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (_destroyedCallback) {
|
||||
_destroyedCallback();
|
||||
|
||||
Reference in New Issue
Block a user