2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Improve Ctrl+W / Ctrl+M handling by media viewer.

This commit is contained in:
John Preston
2023-02-17 13:21:19 +04:00
parent 24a1208b9a
commit 27d446bdda
8 changed files with 46 additions and 15 deletions

View File

@@ -1499,13 +1499,12 @@ void Application::windowActivated(not_null<Window::Controller*> window) {
}
bool Application::closeActiveWindow() {
if (hideMediaView()) {
if (_mediaView && _mediaView->isActive()) {
_mediaView->close();
return true;
}
if (!calls().closeCurrentActiveCall()) {
} else if (!calls().closeCurrentActiveCall()) {
if (const auto window = activeWindow()) {
if (window->widget()->isVisible()
&& window->widget()->isActive()) {
if (window->widget()->isActive()) {
window->close();
return true;
}
@@ -1515,8 +1514,10 @@ bool Application::closeActiveWindow() {
}
bool Application::minimizeActiveWindow() {
hideMediaView();
if (!calls().minimizeCurrentActiveCall()) {
if (_mediaView && _mediaView->isActive()) {
_mediaView->minimize();
return true;
} else if (!calls().minimizeCurrentActiveCall()) {
if (const auto window = activeWindow()) {
window->minimize();
return true;