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:
@@ -47,6 +47,10 @@ bool _psRunCommand(const QByteArray &command) {
|
||||
|
||||
namespace Platform {
|
||||
|
||||
bool IsApplicationActive() {
|
||||
return static_cast<QApplication*>(QApplication::instance())->activeWindow() != nullptr;
|
||||
}
|
||||
|
||||
QString CurrentExecutablePath(int argc, char *argv[]) {
|
||||
constexpr auto kMaxPath = 1024;
|
||||
char result[kMaxPath] = { 0 };
|
||||
|
@@ -15,6 +15,8 @@ namespace Platform {
|
||||
inline void SetWatchingMediaKeys(bool watching) {
|
||||
}
|
||||
|
||||
bool IsApplicationActive();
|
||||
|
||||
inline void StartTranslucentPaint(QPainter &p, QPaintEvent *e) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user