mirror of
https://github.com/atom/atom.git
synced 2026-02-16 01:25:13 -05:00
Add API for configuring default events for non-editor windows
Used by collaboration for when joining fails but basic keybindings and events should still work.
This commit is contained in:
@@ -41,6 +41,16 @@ window.setUpEnvironment = (windowMode) ->
|
||||
window.pasteboard = new Pasteboard
|
||||
window.keymap = new Keymap()
|
||||
|
||||
|
||||
# Set up the default event handlers and menus for a non-editor windows.
|
||||
#
|
||||
# This can be used by packages to have a minimum level of keybindings and
|
||||
# menus available when not using the standard editor window.
|
||||
window.setUpDefaultEvents = ->
|
||||
windowEventHandler = new WindowEventHandler
|
||||
keymap.loadBundledKeymaps()
|
||||
ipc.sendChannel 'update-application-menu', keymap.keystrokesByCommandForSelector('body')
|
||||
|
||||
# This method is only called when opening a real application window
|
||||
window.startEditorWindow = ->
|
||||
installAtomCommand()
|
||||
|
||||
Reference in New Issue
Block a user