2
* NSView subclass for Mac OS X rootless X server
4
* Each rootless window contains an instance of this class.
5
* This class handles events while drawing is handled by Carbon
6
* code in the rootless Aqua implementation.
8
* Copyright (c) 2001 Greg Parker. All Rights Reserved.
10
* Permission is hereby granted, free of charge, to any person obtaining a
11
* copy of this software and associated documentation files (the "Software"),
12
* to deal in the Software without restriction, including without limitation
13
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
14
* and/or sell copies of the Software, and to permit persons to whom the
15
* Software is furnished to do so, subject to the following conditions:
17
* The above copyright notice and this permission notice shall be included in
18
* all copies or substantial portions of the Software.
20
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23
* THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
24
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26
* DEALINGS IN THE SOFTWARE.
28
* Except as contained in this notice, the name(s) of the above copyright
29
* holders shall not be used in advertising or otherwise to promote the sale,
30
* use or other dealings in this Software without prior written authorization.
32
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XView.m,v 1.2 2002/07/15 19:58:31 torrey Exp $ */
49
- (BOOL)acceptsFirstResponder
54
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
59
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent
64
- (void)mouseDown:(NSEvent *)anEvent
66
// Only X is allowed to restack windows.
67
[NSApp preventWindowOrdering];
68
if (! [NSApp isActive]) {
69
[NSApp activateIgnoringOtherApps:YES];
70
// FIXME: Interleaving with other apps would be nice, but has issues.
71
[NSApp arrangeInFront:nil];
73
[[self nextResponder] mouseDown:anEvent];