2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Restore call window from minimized on bar click.

This commit is contained in:
John Preston
2020-12-11 11:58:00 +04:00
parent df420e4ccf
commit 4b31b4792a
2 changed files with 11 additions and 2 deletions

View File

@@ -209,8 +209,14 @@ bool Panel::isActive() const {
}
void Panel::showAndActivate() {
if (_window->isHidden()) {
_window->show();
}
const auto state = _window->windowState();
if (state & Qt::WindowMinimized) {
_window->setWindowState(state & ~Qt::WindowMinimized);
}
_window->raise();
_window->setWindowState(_window->windowState() | Qt::WindowActive);
_window->activateWindow();
_window->setFocus();
}