projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compilation fix for wxUSE_INTL == 0 (patch 646466)
[wxWidgets.git]
/
src
/
mac
/
toplevel.cpp
diff --git
a/src/mac/toplevel.cpp
b/src/mac/toplevel.cpp
index 44af0896241b39ac646a4fc6839b91b37d5a0521..e074c7fb31d6ad8be3e6464ec1776e31102db14a 100644
(file)
--- a/
src/mac/toplevel.cpp
+++ b/
src/mac/toplevel.cpp
@@
-162,7
+162,7
@@
wxTopLevelWindowMac::~wxTopLevelWindowMac()
wxPendingDelete.Append( new wxMacDeferredWindowDeleter( (WindowRef) m_macWindow ) ) ;
}
wxPendingDelete.Append( new wxMacDeferredWindowDeleter( (WindowRef) m_macWindow ) ) ;
}
-
#if TARGET_CARBON
+#if TARGET_CARBON
if ( m_macEventHandler )
{
::RemoveEventHandler((EventHandlerRef) m_macEventHandler);
if ( m_macEventHandler )
{
::RemoveEventHandler((EventHandlerRef) m_macEventHandler);
@@
-171,21
+171,9
@@
wxTopLevelWindowMac::~wxTopLevelWindowMac()
#endif
wxRemoveMacWindowAssociation( this ) ;
#endif
wxRemoveMacWindowAssociation( this ) ;
- wxTopLevelWindows.DeleteObject(this);
-
if ( wxModelessWindows.Find(this) )
wxModelessWindows.DeleteObject(this);
if ( wxModelessWindows.Find(this) )
wxModelessWindows.DeleteObject(this);
- // If this is the last top-level window, exit.
- if ( wxTheApp && (wxTopLevelWindows.Number() == 0) )
- {
- wxTheApp->SetTopWindow(NULL);
-
- if ( wxTheApp->GetExitOnFrameDelete() )
- {
- wxTheApp->ExitMainLoop() ;
- }
- }
DisposeRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;
}
DisposeRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;
}
@@
-245,14
+233,9
@@
pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef
case kEventClassTextInput :
if ( wxMacConvertEventToRecord( event , &rec ) )
{
case kEventClassTextInput :
if ( wxMacConvertEventToRecord( event , &rec ) )
{
- short keycode ;
- short keychar ;
- keychar = short(rec.message & charCodeMask);
- keycode = short(rec.message & keyCodeMask) >> 8 ;
- long keyval = wxMacTranslateKey(keychar, keycode) ;
+ wxTheApp->m_macCurrentEvent = &rec ;
wxWindow* focus = wxWindow::FindFocus() ;
wxWindow* focus = wxWindow::FindFocus() ;
-
- if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
+ if ( (focus != NULL) && !UMAMenuEvent(&rec) && wxTheApp->MacSendKeyDownEvent( focus , rec.message , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
{
// was handled internally
result = noErr ;
{
// was handled internally
result = noErr ;
@@
-339,7
+322,11
@@
void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
}
else
{
}
else
{
+#if TARGET_CARBON
wclass = kPlainWindowClass ;
wclass = kPlainWindowClass ;
+#else
+ wclass = kFloatingWindowClass ;
+#endif
}
}
else if ( HasFlag( wxCAPTION ) )
}
}
else if ( HasFlag( wxCAPTION ) )
@@
-362,7
+349,11
@@
void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
}
else
{
}
else
{
+#if TARGET_CARBON
wclass = kPlainWindowClass ;
wclass = kPlainWindowClass ;
+#else
+ wclass = kModalWindowClass ;
+#endif
}
}
}
}
@@
-621,8
+612,8
@@
bool wxTopLevelWindowMac::Show(bool show)
return FALSE;
if (show)
return FALSE;
if (show)
- {
- ::
ShowWindow( (WindowRef)m_macWindow )
;
+ {
+ ::
TransitionWindow((WindowRef)m_macWindow,kWindowZoomTransitionEffect,kWindowShowTransitionAction,nil)
;
::SelectWindow( (WindowRef)m_macWindow ) ;
// no need to generate events here, they will get them triggered by macos
// actually they should be , but apparently they are not
::SelectWindow( (WindowRef)m_macWindow ) ;
// no need to generate events here, they will get them triggered by macos
// actually they should be , but apparently they are not
@@
-633,7
+624,7
@@
bool wxTopLevelWindowMac::Show(bool show)
}
else
{
}
else
{
- ::
HideWindow( (WindowRef)m_macWindow )
;
+ ::
TransitionWindow((WindowRef)m_macWindow,kWindowZoomTransitionEffect,kWindowHideTransitionAction,nil)
;
}
if ( !show )
}
if ( !show )
@@
-692,9
+683,13
@@
void wxTopLevelWindowMac::DoMoveWindow(int x, int y, int width, int height)
if ( doResize )
::SizeWindow((WindowRef)m_macWindow, m_width, m_height , true);
if ( doResize )
::SizeWindow((WindowRef)m_macWindow, m_width, m_height , true);
+
+ // the OS takes care of invalidating and erasing the new area so we only have to
+ // take care of refreshing for full repaints
+
+ if ( doResize && !HasFlag(wxNO_FULL_REPAINT_ON_RESIZE) )
+ Refresh() ;
- // the OS takes care of invalidating and erasing the new area
- // we have erased the old one
if ( IsKindOf( CLASSINFO( wxFrame ) ) )
{
if ( IsKindOf( CLASSINFO( wxFrame ) ) )
{