diff --git a/widget/src/cocoa/nsCocoaWindow.h b/widget/src/cocoa/nsCocoaWindow.h index 224e132c75cb..4aadc8251832 100644 --- a/widget/src/cocoa/nsCocoaWindow.h +++ b/widget/src/cocoa/nsCocoaWindow.h @@ -60,7 +60,6 @@ class nsCocoaWindow; } - (id)initWithGeckoWindow:(nsCocoaWindow*)geckoWind; - (void)windowDidResize:(NSNotification *)aNotification; -- (void)eventTimer:(NSTimer *)theTimer; @end @@ -200,7 +199,6 @@ protected: PRBool mIsResizing; // we originated the resize, prevent infinite recursion PRBool mWindowMadeHere; // true if we created the window, false for embedding NSWindow* mWindow; // our cocoa window [STRONG] - NSTimer* mEventTimer; // event timer [STRONG] WindowDelegate* mDelegate; // our delegate for processing window msgs [STRONG] }; diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm index f707790c8d01..48cc799e6e62 100644 --- a/widget/src/cocoa/nsCocoaWindow.mm +++ b/widget/src/cocoa/nsCocoaWindow.mm @@ -301,7 +301,6 @@ nsCocoaWindow::nsCocoaWindow() : mIsResizing(PR_FALSE) , mWindowMadeHere(PR_FALSE) , mWindow(nil) -, mEventTimer(nil) { #if 0 mMacEventHandler.reset(new nsMacEventHandler(this)); @@ -323,8 +322,6 @@ nsCocoaWindow::~nsCocoaWindow() { if ( mWindow && mWindowMadeHere ) { [mWindow release]; - [mEventTimer invalidate]; - [mEventTimer release]; [mDelegate release]; } @@ -391,22 +388,10 @@ nsresult nsCocoaWindow::StandardCreate(nsIWidget *aParent, // setup our notification delegate. Note that setDelegate: does NOT retain. mDelegate = [[WindowDelegate alloc] initWithGeckoWindow:this]; [mWindow setDelegate:mDelegate]; - -//FIXME setup a timer to process PLEvents. This isn't where this should live, but -// it's a good temporary place. There should only be one, and for embedding -// purposes, it should live within the toolkit probably. - mEventTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:mDelegate selector:@selector(eventTimer:) userInfo:nil - repeats:YES]; mWindowMadeHere = PR_TRUE; } -//FIXME setup a timer to process PLEvents. This isn't where this should live, but -// it's a good temporary place. There should only be one, and for embedding -// purposes, it should live within the toolkit probably. - mEventTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:mDelegate selector:@selector(eventTimer:) userInfo:nil - repeats:YES]; - #if 0 short bottomPinDelta = 0; // # of pixels to subtract to pin window bottom nsCOMPtr theToolkit = aToolkit; @@ -1665,24 +1650,6 @@ void StopResizing ( ) } -- (void)eventTimer:(NSTimer *)theTimer -{ -//FIXME not the most efficient way to do this, but it gets us to process PLEvents on -// a regular basis. Each window shouldn't need one of these. Perhaps I'll add it on -// the toolkit. - nsCOMPtr service = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID); - if ( service ) { - nsCOMPtr queue; - service->GetThreadEventQueue(NS_CURRENT_THREAD, getter_AddRefs(queue)); - if (queue) - { - nsresult rv = queue->ProcessPendingEvents(); - NS_ASSERTION(NS_SUCCEEDED(rv), "Error processing PLEvents"); - } - } -} - - - (void)windowDidResize:(NSNotification *)aNotification { if ( !mGeckoWindow->IsResizing() ) {