2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Don't show PopupMenu for inactive window on macOS.

This is a fixup for 06bf67c146.
This commit is contained in:
John Preston
2018-08-04 15:06:39 +03:00
parent 4e0e472f97
commit c8aa35d23c
7 changed files with 44 additions and 4 deletions

View File

@@ -332,6 +332,10 @@ QString SystemCountry() {
return QString();
}
bool IsApplicationActive() {
return static_cast<QApplication*>(QApplication::instance())->activeWindow() != nullptr;
}
QString CurrentExecutablePath(int argc, char *argv[]) {
WCHAR result[MAX_PATH + 1] = { 0 };
auto count = GetModuleFileName(nullptr, result, MAX_PATH + 1);