diff --git a/mozilla/widget/src/cocoa/nsAppShellCocoa.h b/mozilla/widget/src/cocoa/nsAppShellCocoa.h index a621e783722..f050a8e7f27 100644 --- a/mozilla/widget/src/cocoa/nsAppShellCocoa.h +++ b/mozilla/widget/src/cocoa/nsAppShellCocoa.h @@ -60,7 +60,7 @@ class nsAppShellCocoa : public nsIAppShell NS_DECL_NSIAPPSHELL private: - + NSAutoreleasePool *mainPool; }; diff --git a/mozilla/widget/src/cocoa/nsAppShellCocoa.mm b/mozilla/widget/src/cocoa/nsAppShellCocoa.mm index e6f0f6b50c6..530c26719c4 100644 --- a/mozilla/widget/src/cocoa/nsAppShellCocoa.mm +++ b/mozilla/widget/src/cocoa/nsAppShellCocoa.mm @@ -60,6 +60,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsAppShellCocoa, nsIAppShell) //------------------------------------------------------------------------- nsAppShellCocoa::nsAppShellCocoa() { + mainPool = [[NSAutoreleasePool alloc] init]; } //------------------------------------------------------------------------- @@ -69,6 +70,7 @@ nsAppShellCocoa::nsAppShellCocoa() //------------------------------------------------------------------------- nsAppShellCocoa::~nsAppShellCocoa() { + [mainPool release]; } @@ -76,15 +78,17 @@ nsAppShellCocoa::~nsAppShellCocoa() // // Create the application shell // +// There's reallly not a whole lot that needs to be done here. The +// window will register its own interest in the necessary events +// so there's no need for us to create a pump or a sink. +// //------------------------------------------------------------------------- NS_IMETHODIMP nsAppShellCocoa::Create(int* argc, char ** argv) { - // There's reallly not a whole lot that needs to be done here. The - // window will register its own interest in the necessary events - // so there's no need for us to create a pump or a sink. - + // this call initializes NSApplication + [NSApplication sharedApplication]; return NS_OK; } diff --git a/mozilla/widget/src/cocoa/nsCocoaWindow.mm b/mozilla/widget/src/cocoa/nsCocoaWindow.mm index 264cc42a13c..a48def919bc 100644 --- a/mozilla/widget/src/cocoa/nsCocoaWindow.mm +++ b/mozilla/widget/src/cocoa/nsCocoaWindow.mm @@ -59,16 +59,8 @@ #include -#if UNIVERSAL_INTERFACES_VERSION < 0x0340 -enum { - kEventWindowConstrain = 83 -}; -const UInt32 kWindowLiveResizeAttribute = (1L << 28); -#endif - // Define Class IDs -- i hate having to do this static NS_DEFINE_CID(kCDragServiceCID, NS_DRAGSERVICE_CID); -//static const char *sScreenManagerContractID = "@mozilla.org/gfx/screenmanager;1"; // from MacHeaders.c #ifndef topLeft