Skip to content

Commit

Permalink
Use non-libdispatch queues in Mac App Store build.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 23, 2020
1 parent f87b96e commit 0f0fd6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/platform/mac/ui_utility_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
#pragma once

#include "base/platform/base_platform_info.h"
#include <QtCore/QPoint>

namespace Ui {
Expand All @@ -19,7 +20,7 @@ inline void UpdateOverlayed(not_null<QWidget*> widget) {
}

inline constexpr bool UseMainQueueGeneric() {
return false;
return ::Platform::IsMacStoreBuild();
}

} // namespace Platform
Expand Down
4 changes: 4 additions & 0 deletions ui/platform/mac/ui_utility_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0f0fd6a

Please sign in to comment.