Revert "Global Keyboard shortcuts work from spec window."

This reverts commit 6134d9e41e.
This commit is contained in:
Nathan Sobo
2012-03-07 10:53:09 -07:00
parent c18341dea8
commit baeef54be3
3 changed files with 1 additions and 11 deletions

View File

@@ -40,8 +40,7 @@
if ([[self mainMenu] performKeyEquivalent:event]) return;
bool windowHandlesKeyEvents = [[[self keyWindow] windowController] handlesKeyEvents];
if (_clientHandler && !windowHandlesKeyEvents && [event type] == NSKeyDown) {
if (_clientHandler && ![self keyWindow] && [event type] == NSKeyDown) {
[_hiddenWindow makeKeyAndOrderFront:self];
[_hiddenWindow sendEvent:event];
}

View File

@@ -9,8 +9,6 @@ class ClientHandler;
NSView *_webView;
NSString *_bootstrapScript;
NSString *_pathToOpen;
bool _handlesKeyEvents;
CefRefPtr<CefV8Context> _atomContext;
CefRefPtr<ClientHandler> _clientHandler;
@@ -19,7 +17,6 @@ class ClientHandler;
- (id)initWithBootstrapScript:(NSString *)bootstrapScript atomContext:(CefRefPtr<CefV8Context>) context;
- (id)initWithPath:(NSString *)path atomContext:(CefRefPtr<CefV8Context>)atomContext;
- (id)initSpecsWithAtomContext:(CefRefPtr<CefV8Context>)atomContext;
- (bool)handlesKeyEvents;
- (void)createBrowser;

View File

@@ -29,12 +29,10 @@
- (id)initWithPath:(NSString *)path atomContext:(CefRefPtr<CefV8Context>)atomContext {
_pathToOpen = [path retain];
_handlesKeyEvents = YES;
return [self initWithBootstrapScript:@"window-bootstrap" atomContext:atomContext];
}
- (id)initSpecsWithAtomContext:(CefRefPtr<CefV8Context>)atomContext {
_handlesKeyEvents = NO;
return [self initWithBootstrapScript:@"spec-bootstrap" atomContext:atomContext];
}
@@ -58,10 +56,6 @@
CefBrowser::CreateBrowser(window_info, _clientHandler.get(), [indexURLString UTF8String], settings);
}
- (bool)handlesKeyEvents {
return _handlesKeyEvents;
}
#pragma mark BrowserDelegate
- (void)loadStart {