X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..48e05747043db02c4e9d2e286eca4fdf5dee7881:/src/osx/carbon/popupwin.cpp diff --git a/src/osx/carbon/popupwin.cpp b/src/osx/carbon/popupwin.cpp index c2ecd3cf59..5f73691371 100644 --- a/src/osx/carbon/popupwin.cpp +++ b/src/osx/carbon/popupwin.cpp @@ -1,12 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: src/mac/popupwin.cpp +// Name: src/osx/carbon/popupwin.cpp // Purpose: implements wxPopupWindow for wxMac // Author: Stefan Csomor // Modified by: -// Created: +// Created: // RCS-ID: $Id$ // Copyright: (c) 2006 Stefan Csomor -// License: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -34,7 +34,7 @@ #include "wx/popupwin.h" #include "wx/tooltip.h" -#include "wx/mac/private.h" +#include "wx/osx/private.h" // ============================================================================ // implementation @@ -56,4 +56,25 @@ bool wxPopupWindow::Create(wxWindow *parent, int flags) } +bool wxPopupWindow::Show(bool show) +{ + if ( !wxWindow::Show(show) ) + return false; + + if ( m_nowpeer && show) + m_nowpeer->ShowWithoutActivating(); + else if ( m_nowpeer ) + m_nowpeer->Show(false); + + if ( show ) + { + // because apps expect a size event to occur at this moment + wxSizeEvent event(GetSize() , m_windowId); + event.SetEventObject(this); + HandleWindowEvent(event); + } + + return true; +} + #endif // #if wxUSE_POPUPWIN