1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Redo previous, not breaking Mac build if wxWidgets is not rebuilt

This commit is contained in:
Paul Licameli 2016-07-31 13:51:35 -04:00
parent c8e570797f
commit e0f1e9a5ff
4 changed files with 18 additions and 5 deletions

View File

@ -1,4 +1,4 @@
From aed0a3ed0df16f04dc39c8366d9c399fcc172009 Mon Sep 17 00:00:00 2001
From 8c9c17ca704f6c2b1469c861497ac7676dd67347 Mon Sep 17 00:00:00 2001
From: Paul Licameli <paul.licameli@audacityteam.org>
Date: Sun, 31 Jul 2016 11:55:29 -0400
Subject: [PATCH 1/3] Mac modal loops won't hang when other code uses old
@ -13,20 +13,21 @@ See the Audacity bug report that motivated this change:
http://bugzilla.audacityteam.org/show_bug.cgi?id=1338
---
include/wx/evtloop.h | 9 +++++++++
include/wx/evtloop.h | 10 ++++++++++
src/common/evtloopcmn.cpp | 14 ++++++++++++++
src/osx/core/evtloop_cf.cpp | 3 ++-
3 files changed, 25 insertions(+), 1 deletion(-)
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/include/wx/evtloop.h b/include/wx/evtloop.h
index 1133473..db87431 100644
index 1133473..4b23610 100644
--- a/include/wx/evtloop.h
+++ b/include/wx/evtloop.h
@@ -177,6 +177,15 @@ public:
@@ -177,6 +177,16 @@ public:
// set currently active (running) event loop
static void SetActive(wxEventLoopBase* loop);
+#ifdef __WXMAC__
+#define __WX_EVTLOOP_BUSY_WAITING__
+ static bool GetBusyWaiting();
+
+ // If the argument is true, cause modal dialogs to busy-wait for events,

View File

@ -1788,7 +1788,9 @@ bool VSTEffect::HideUI()
bool VSTEffect::CloseUI()
{
#ifdef __WXMAC__
#ifdef __WX_EVTLOOP_BUSY_WAITING__
wxEventLoop::SetBusyWaiting(false);
#endif
#endif
mParent->RemoveEventHandler(this);
@ -2840,7 +2842,9 @@ void VSTEffect::BuildFancy()
mDialog->Connect(wxEVT_SIZE, wxSizeEventHandler(VSTEffect::OnSize));
#ifdef __WXMAC__
#ifdef __WX_EVTLOOP_BUSY_WAITING__
wxEventLoop::SetBusyWaiting(true);
#endif
#endif
return;

View File

@ -1799,7 +1799,9 @@ bool AudioUnitEffect::PopulateUI(wxWindow *parent)
mParent->SetMinSize(wxDefaultSize);
#ifdef __WXMAC__
#ifdef __WX_EVTLOOP_BUSY_WAITING__
wxEventLoop::SetBusyWaiting(true);
#endif
#endif
}
@ -1848,7 +1850,9 @@ bool AudioUnitEffect::HideUI()
bool AudioUnitEffect::CloseUI()
{
#ifdef __WXMAC__
#ifdef __WX_EVTLOOP_BUSY_WAITING__
wxEventLoop::SetBusyWaiting(false);
#endif
#endif
mParent->RemoveEventHandler(this);

View File

@ -1139,7 +1139,9 @@ bool LV2Effect::HideUI()
bool LV2Effect::CloseUI()
{
#ifdef __WXMAC__
#ifdef __WX_EVTLOOP_BUSY_WAITING__
wxEventLoop::SetBusyWaiting(false);
#endif
#endif
mParent->RemoveEventHandler(this);
@ -1571,7 +1573,9 @@ bool LV2Effect::BuildFancy()
TransferDataToWindow();
#ifdef __WXMAC__
#ifdef __WX_EVTLOOP_BUSY_WAITING__
wxEventLoop::SetBusyWaiting(true);
#endif
#endif
return true;