Use non-libdispatch queues in Mac App Store build.

This commit is contained in:
John Preston 2020-01-23 13:13:54 +03:00
parent f87b96e5b7
commit 0f0fd6a94f
2 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,7 @@
//
#pragma once
#include "base/platform/base_platform_info.h"
#include <QtCore/QPoint>
namespace Ui {
@ -19,7 +20,7 @@ inline void UpdateOverlayed(not_null<QWidget*> widget) {
}
inline constexpr bool UseMainQueueGeneric() {
return false;
return ::Platform::IsMacStoreBuild();
}
} // namespace Platform

View file

@ -14,9 +14,11 @@
#include <Cocoa/Cocoa.h>
#ifndef OS_MAC_STORE
extern "C" {
void _dispatch_main_queue_callback_4CF(mach_msg_header_t *msg);
} // extern "C"
#endif // OS_MAC_STORE
namespace Ui {
namespace Platform {
@ -88,7 +90,9 @@ void BringToBack(not_null<QWidget*> widget) {
}
void DrainMainQueue() {
#ifndef OS_MAC_STORE
_dispatch_main_queue_callback_4CF(nullptr);
#endif // OS_MAC_STORE
}
void IgnoreAllActivation(not_null<QWidget*> widget) {