diff --git a/camino/CHAutoCompleteTextField.mm b/camino/CHAutoCompleteTextField.mm index 948395db1c9..bb68570d669 100644 --- a/camino/CHAutoCompleteTextField.mm +++ b/camino/CHAutoCompleteTextField.mm @@ -19,7 +19,7 @@ * * Contributor(s): * Joe Hewitt (Original Author) -* David Haas +* David Haas */ #import "CHAutoCompleteTextField.h" @@ -34,6 +34,17 @@ static const int kMaxRows = 6; static const int kFrameMargin = 1; static const int kEscapeKeyCode = 53; +@interface AutoCompleteWindow : NSWindow +- (BOOL)isKeyWindow; +@end + +@implementation AutoCompleteWindow +- (BOOL)isKeyWindow +{ + return YES; +} +@end + class AutoCompleteListener : public nsIAutoCompleteListener { public: @@ -95,8 +106,8 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) [self setSession:@"history"]; // construct and configure the popup window - mPopupWin = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) - styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] retain]; + mPopupWin = [[AutoCompleteWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) + styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; [mPopupWin setReleasedWhenClosed:NO]; [mPopupWin setLevel:NSFloatingWindowLevel]; [mPopupWin setHasShadow:YES]; diff --git a/camino/src/browser/AutoCompleteTextField.mm b/camino/src/browser/AutoCompleteTextField.mm index 948395db1c9..bb68570d669 100644 --- a/camino/src/browser/AutoCompleteTextField.mm +++ b/camino/src/browser/AutoCompleteTextField.mm @@ -19,7 +19,7 @@ * * Contributor(s): * Joe Hewitt (Original Author) -* David Haas +* David Haas */ #import "CHAutoCompleteTextField.h" @@ -34,6 +34,17 @@ static const int kMaxRows = 6; static const int kFrameMargin = 1; static const int kEscapeKeyCode = 53; +@interface AutoCompleteWindow : NSWindow +- (BOOL)isKeyWindow; +@end + +@implementation AutoCompleteWindow +- (BOOL)isKeyWindow +{ + return YES; +} +@end + class AutoCompleteListener : public nsIAutoCompleteListener { public: @@ -95,8 +106,8 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) [self setSession:@"history"]; // construct and configure the popup window - mPopupWin = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) - styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] retain]; + mPopupWin = [[AutoCompleteWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) + styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; [mPopupWin setReleasedWhenClosed:NO]; [mPopupWin setLevel:NSFloatingWindowLevel]; [mPopupWin setHasShadow:YES]; diff --git a/chimera/CHAutoCompleteTextField.mm b/chimera/CHAutoCompleteTextField.mm index 948395db1c9..bb68570d669 100644 --- a/chimera/CHAutoCompleteTextField.mm +++ b/chimera/CHAutoCompleteTextField.mm @@ -19,7 +19,7 @@ * * Contributor(s): * Joe Hewitt (Original Author) -* David Haas +* David Haas */ #import "CHAutoCompleteTextField.h" @@ -34,6 +34,17 @@ static const int kMaxRows = 6; static const int kFrameMargin = 1; static const int kEscapeKeyCode = 53; +@interface AutoCompleteWindow : NSWindow +- (BOOL)isKeyWindow; +@end + +@implementation AutoCompleteWindow +- (BOOL)isKeyWindow +{ + return YES; +} +@end + class AutoCompleteListener : public nsIAutoCompleteListener { public: @@ -95,8 +106,8 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) [self setSession:@"history"]; // construct and configure the popup window - mPopupWin = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) - styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] retain]; + mPopupWin = [[AutoCompleteWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) + styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; [mPopupWin setReleasedWhenClosed:NO]; [mPopupWin setLevel:NSFloatingWindowLevel]; [mPopupWin setHasShadow:YES]; diff --git a/chimera/src/browser/AutoCompleteTextField.mm b/chimera/src/browser/AutoCompleteTextField.mm index 948395db1c9..bb68570d669 100644 --- a/chimera/src/browser/AutoCompleteTextField.mm +++ b/chimera/src/browser/AutoCompleteTextField.mm @@ -19,7 +19,7 @@ * * Contributor(s): * Joe Hewitt (Original Author) -* David Haas +* David Haas */ #import "CHAutoCompleteTextField.h" @@ -34,6 +34,17 @@ static const int kMaxRows = 6; static const int kFrameMargin = 1; static const int kEscapeKeyCode = 53; +@interface AutoCompleteWindow : NSWindow +- (BOOL)isKeyWindow; +@end + +@implementation AutoCompleteWindow +- (BOOL)isKeyWindow +{ + return YES; +} +@end + class AutoCompleteListener : public nsIAutoCompleteListener { public: @@ -95,8 +106,8 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) [self setSession:@"history"]; // construct and configure the popup window - mPopupWin = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) - styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] retain]; + mPopupWin = [[AutoCompleteWindow alloc] initWithContentRect:NSMakeRect(0,0,0,0) + styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; [mPopupWin setReleasedWhenClosed:NO]; [mPopupWin setLevel:NSFloatingWindowLevel]; [mPopupWin setHasShadow:YES];