2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Support ctrl+m/ctrl+w in voice chat panel.

This commit is contained in:
John Preston
2020-12-22 20:09:32 +04:00
parent c80da25450
commit ae6decf70b
7 changed files with 50 additions and 6 deletions

View File

@@ -915,18 +915,25 @@ bool Application::closeActiveWindow() {
if (hideMediaView()) {
return true;
}
if (const auto window = activeWindow()) {
window->close();
return true;
if (!calls().closeCurrentActiveCall()) {
if (const auto window = activeWindow()) {
if (window->widget()->isVisible()
&& window->widget()->isActive()) {
window->close();
return true;
}
}
}
return false;
}
bool Application::minimizeActiveWindow() {
hideMediaView();
if (const auto window = activeWindow()) {
window->minimize();
return true;
if (!calls().minimizeCurrentActiveCall()) {
if (const auto window = activeWindow()) {
window->minimize();
return true;
}
}
return false;
}