// globals
// ----------------------------------------------------------------------------
-// list of all frames and modeless dialogs
-wxWindowList wxModelessWindows;
-
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
// ============================================================================
if (GetExtraStyle() & wxFRAME_EX_METAL)
MacSetMetalAppearance(true);
- wxTopLevelWindows.Append(this);
-
if ( parent )
parent->AddChild(this);
wxRemoveMacWindowAssociation( this ) ;
- if ( wxModelessWindows.Find(this) )
- wxModelessWindows.DeleteObject(this);
-
// avoid dangling refs
if ( s_macDeactivateWindow == this )
s_macDeactivateWindow = NULL;
else if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) )
col = wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive));
- if ( !wxWindowBase::SetBackgroundColour(col) && m_hasBgCol )
+ if ( !wxWindow::SetBackgroundColour(col) && m_hasBgCol )
return false ;
- if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
+ if ( GetBackgroundStyle() != wxBG_STYLE_CUSTOM )
{
- SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
- SetBackgroundStyle(wxBG_STYLE_CUSTOM);
- }
- else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
- {
- SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
- SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+ if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
+ {
+ SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
+ SetBackgroundStyle(wxBG_STYLE_SYSTEM);
+ }
+ else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
+ {
+ SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
+ SetBackgroundStyle(wxBG_STYLE_SYSTEM);
+ }
}
return true;
}
}
else if ( HasFlag( wxPOPUP_WINDOW ) )
{
- // TEMPORARY HACK!
- // Until we've got a real wxPopupWindow class on wxMac make it a
- // little easier for wxFrame to be used to emulate it and workaround
- // the lack of wxPopupWindow.
if ( HasFlag( wxBORDER_NONE ) )
+ {
wclass = kHelpWindowClass ; // has no border
+ attr |= kWindowNoShadowAttribute;
+ }
else
+ {
wclass = kPlainWindowClass ; // has a single line border, it will have to do for now
- //attr |= kWindowNoShadowAttribute; // turn off the shadow Should we??
- group = GetWindowGroupOfClass( // float above other windows
- kFloatingWindowClass) ;
+ }
+ group = GetWindowGroupOfClass(kFloatingWindowClass) ;
+ // make sure we don't deactivate something
+ activationScopeSet = true;
+ activationScope = kWindowActivationScopeNone;
}
else if ( HasFlag( wxCAPTION ) )
{