From bbad8dc9af0a685fd81325386ae75bbece17c1b1 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 23 Feb 2018 13:09:17 +0000 Subject: [PATCH] Conditionally compile Mac-specific bug fix. It apparently hangs some other window managers. Fixes: lp:1748793 * https://bugs.launchpad.net/kicad/+bug/1748793 --- common/eda_base_frame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index 8a9b51b4f8..19e9f1fe2a 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -175,12 +175,18 @@ EDA_BASE_FRAME::~EDA_BASE_FRAME() bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent ) { +#ifdef __WXMAC__ + // Apple in its infinite wisdom will raise a disabled window before even passing + // us the event, so we have no way to stop it. Instead, we have to catch an + // improperly ordered disabled window and quasi-modal dialog here and reorder + // them. if( !IsEnabled() && IsActive() ) { DIALOG_SHIM* dlg = findQuasiModalDialog( GetChildren() ); if( dlg ) dlg->Raise(); } +#endif if( !wxFrame::ProcessEvent( aEvent ) ) return false;