Commit | Line | Data |
---|---|---|
ef79bbde P |
1 | /*************************************************************************** |
2 | PluginWindow.m | |
3 | PeopsSoftGPU | |
4 | ||
5 | Created by Gil Pedersen on Wed April 21 2004. | |
6 | Copyright (c) 2004 Gil Pedersen. | |
7 | ***************************************************************************/ | |
8 | ||
9 | /*************************************************************************** | |
10 | * * | |
11 | * This program is free software; you can redistribute it and/or modify * | |
12 | * it under the terms of the GNU General Public License as published by * | |
13 | * the Free Software Foundation; either version 2 of the License, or * | |
14 | * (at your option) any later version. See also the license.txt file for * | |
15 | * additional informations. * | |
16 | * * | |
17 | ***************************************************************************/ | |
18 | ||
19 | #import "PluginWindow.h" | |
20 | ||
21 | @implementation NetSfPeopsSoftGPUPluginWindow | |
22 | /* | |
23 | - (BOOL)windowShouldClose:(id)sender | |
24 | { | |
25 | [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; | |
26 | ||
27 | return YES; | |
28 | }*/ | |
29 | ||
30 | - (void)sendEvent:(NSEvent *)theEvent | |
31 | { | |
32 | int type = [theEvent type]; | |
33 | if (type == NSKeyDown || type == NSKeyUp) { | |
34 | if (type == NSKeyDown && [theEvent keyCode] == 53 /* escape */) { | |
35 | // reroute to menu event | |
36 | [[NSApp mainMenu] performKeyEquivalent:theEvent]; | |
37 | } | |
38 | ||
39 | // ignore all key Events | |
40 | return; | |
41 | } | |
42 | ||
43 | [super sendEvent:theEvent]; | |
44 | } | |
45 | ||
46 | @end |