filename | src/cocoaui/cocoaui.c |
changeset | 780:4e4ea322cb84 |
prev | 773:146c3210768b |
next | 785:00235838aaec |
author | nkeynes |
date | Mon Jul 28 10:13:13 2008 +0000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Move grab management to window Clear grab if the window loses key focus (probably a good idea in general) |
file | annotate | diff | log | raw |
1.1 --- a/src/cocoaui/cocoaui.c Mon Jul 28 04:47:28 2008 +00001.2 +++ b/src/cocoaui/cocoaui.c Mon Jul 28 10:13:13 2008 +00001.3 @@ -157,6 +157,15 @@1.4 cocoa_gui_run_later();1.5 }1.6 }1.7 +- (void)windowDidBecomeKey: (NSNotification *)notice1.8 +{1.9 + display_set_focused( TRUE );1.10 +}1.11 +- (void)windowDidResignKey: (NSNotification *)notice1.12 +{1.13 + display_set_focused( FALSE );1.14 + [((LxdreamMainWindow *)[NSApp mainWindow]) setIsGrabbed: NO];1.15 +}1.16 - (void) about_action: (id)sender1.17 {1.18 NSArray *keys = [NSArray arrayWithObjects: @"Version", @"Copyright", nil];
.