removing timer, it's now in toolkit

This commit is contained in:
pinkerton%netscape.com 2001-11-06 22:53:25 +00:00
Родитель 1d522d115b
Коммит 92741ef574
2 изменённых файлов: 0 добавлений и 35 удалений

Просмотреть файл

@ -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]
};

Просмотреть файл

@ -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<nsIToolkit> 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<nsIEventQueueService> service = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID);
if ( service ) {
nsCOMPtr<nsIEventQueue> 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() ) {