mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Added ability to check are windows active for tray menu.
This commit is contained in:
parent
aa241a1f62
commit
511805199f
2 changed files with 11 additions and 0 deletions
Telegram/SourceFiles/core
|
@ -427,6 +427,16 @@ void Application::clearEmojiSourceImages() {
|
|||
});
|
||||
}
|
||||
|
||||
bool Application::isActiveForTrayMenu() const {
|
||||
if (_primaryWindow) {
|
||||
return _primaryWindow->widget()->isActiveForTrayMenu();
|
||||
}
|
||||
return ranges::any_of(ranges::views::values(_secondaryWindows), [=](
|
||||
const std::unique_ptr<Window::Controller> &controller) {
|
||||
return controller->widget()->isActiveForTrayMenu();
|
||||
});
|
||||
}
|
||||
|
||||
bool Application::hideMediaView() {
|
||||
if (_mediaView && !_mediaView->isHidden()) {
|
||||
_mediaView->hide();
|
||||
|
|
|
@ -163,6 +163,7 @@ public:
|
|||
[[nodiscard]] QWidget *getFileDialogParent();
|
||||
void notifyFileDialogShown(bool shown);
|
||||
void checkSystemDarkMode();
|
||||
[[nodiscard]] bool isActiveForTrayMenu() const;
|
||||
|
||||
// Media view interface.
|
||||
void checkMediaViewActivation();
|
||||
|
|
Loading…
Add table
Reference in a new issue