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

First version of windowed media viewer on Windows.

This commit is contained in:
John Preston
2023-02-10 21:00:51 +04:00
parent 5c33f0cc5b
commit 7a5c9a6fb8
4 changed files with 288 additions and 138 deletions

View File

@@ -596,11 +596,11 @@ bool Application::isActiveForTrayMenu() const {
}
bool Application::hideMediaView() {
if (_mediaView && !_mediaView->isHidden()) {
_mediaView->hide();
if (const auto window = activeWindow()) {
window->reActivate();
}
if (_mediaView
&& _mediaView->isFullScreen()
&& !_mediaView->isMinimized()
&& !_mediaView->isHidden()) {
_mediaView->close();
return true;
}
return false;
@@ -1489,7 +1489,10 @@ void Application::windowActivated(not_null<Window::Controller*> window) {
nowSession->updates().updateOnline();
}
}
if (_mediaView && !_mediaView->isHidden()) {
if (_mediaView
&& !_mediaView->isHidden()
&& !_mediaView->isMinimized()
&& _mediaView->isFullScreen()) {
_mediaView->activate();
}
}