mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Revert "Global Keyboard shortcuts work from spec window."
This reverts commit 6134d9e41e.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user