Use non-libdispatch queues in Mac App Store build.
This commit is contained in:
parent
f87b96e5b7
commit
0f0fd6a94f
2 changed files with 6 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "base/platform/base_platform_info.h"
|
||||||
#include <QtCore/QPoint>
|
#include <QtCore/QPoint>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
|
|
@ -19,7 +20,7 @@ inline void UpdateOverlayed(not_null<QWidget*> widget) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline constexpr bool UseMainQueueGeneric() {
|
inline constexpr bool UseMainQueueGeneric() {
|
||||||
return false;
|
return ::Platform::IsMacStoreBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Platform
|
} // namespace Platform
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,11 @@
|
||||||
|
|
||||||
#include <Cocoa/Cocoa.h>
|
#include <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#ifndef OS_MAC_STORE
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void _dispatch_main_queue_callback_4CF(mach_msg_header_t *msg);
|
void _dispatch_main_queue_callback_4CF(mach_msg_header_t *msg);
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
#endif // OS_MAC_STORE
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
namespace Platform {
|
namespace Platform {
|
||||||
|
|
@ -88,7 +90,9 @@ void BringToBack(not_null<QWidget*> widget) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrainMainQueue() {
|
void DrainMainQueue() {
|
||||||
|
#ifndef OS_MAC_STORE
|
||||||
_dispatch_main_queue_callback_4CF(nullptr);
|
_dispatch_main_queue_callback_4CF(nullptr);
|
||||||
|
#endif // OS_MAC_STORE
|
||||||
}
|
}
|
||||||
|
|
||||||
void IgnoreAllActivation(not_null<QWidget*> widget) {
|
void IgnoreAllActivation(not_null<QWidget*> widget) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue