ocarina: Window grabs focus on escape

Pressing the escape key will cause the window to grab focus
This commit is contained in:
Bryan Schumaker 2011-04-24 09:13:13 -04:00
parent a639c520f5
commit dc418df572
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ window.connect("key-press-event", shortcuts.key_pressed)
window.add(body.body)
window.show()
def grab_focus():
window.set_focus(None)
shortcuts.register_shortcut("Escape", grab_focus, True)
def set_title(new_title = None):
if new_title == None:
new_title = ocarina.__vers__