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:
@@ -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];
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user