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

Cmd+Q quit prevention in windowed media viewer.

This commit is contained in:
John Preston
2023-02-14 20:47:11 +04:00
parent 2a1e3c4453
commit f9847090f9
8 changed files with 33 additions and 24 deletions

View File

@@ -983,10 +983,11 @@ bool Application::preventsQuit(QuitReason reason) {
|| uploadPreventsQuit()
|| downloadPreventsQuit()) {
return true;
} else if (const auto window = activeWindow()) {
if (window->widget()->isActive()) {
return window->widget()->preventsQuit(reason);
}
} else if ((!_mediaView
|| _mediaView->isHidden()
|| !_mediaView->isFullScreen())
&& Platform::PreventsQuit(reason)) {
return true;
}
return false;
}