roll up popup windows in a couple more places we should. Cocoa widgets. b=332917 r=mento

git-svn-id: svn://10.0.0.236/trunk@193721 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joshmoz%gmail.com
2006-04-06 19:14:02 +00:00
parent 02f5c8b159
commit 4700795093
2 changed files with 22 additions and 0 deletions

View File

@@ -2556,6 +2556,18 @@ nsChildView::GetThebesSurface()
- (void)mouseDown:(NSEvent *)theEvent
{
// make sure this view is not in the rollup widget
// the fastest way to do this is by comparing native window pointers
if (gRollupWidget != nsnull) {
NSWindow *ourNativeWindow = [self getNativeWindow];
NSWindow *rollupNativeWindow = (NSWindow*)gRollupWidget->GetNativeData(NS_NATIVE_WINDOW);
if (ourNativeWindow != rollupNativeWindow) {
// roll up any popups
if (gRollupListener != nsnull)
gRollupListener->Rollup();
}
}
// if the command and alt keys are held down, initiate hand scrolling
if ([ChildView areHandScrollModifiers:[theEvent modifierFlags]]) {
[self startHandScroll: theEvent];

View File

@@ -775,6 +775,16 @@ NS_IMETHODIMP nsCocoaWindow::CaptureRollupEvents(nsIRollupListener * aListener,
}
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize
{
// roll up any popups
if (gRollupListener != nsnull && gRollupWidget != nsnull)
gRollupListener->Rollup();
return proposedFrameSize;
}
- (void)windowDidResize:(NSNotification *)aNotification
{
if (mGeckoWindow->IsResizing())