// wx native implementation
//
+static NSResponder* s_nextFirstResponder = NULL;
+
@interface wxNSWindow : NSWindow
{
}
- (void) sendEvent:(NSEvent *)event;
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen;
- (void)noResponderFor: (SEL) selector;
+- (BOOL)makeFirstResponder:(NSResponder *)aResponder;
@end
@implementation wxNSWindow
return YES;
}
+- (BOOL)makeFirstResponder:(NSResponder *)aResponder
+{
+ s_nextFirstResponder = aResponder;
+ BOOL retval = [super makeFirstResponder:aResponder];
+ s_nextFirstResponder = nil;
+ return retval;
+}
+
@end
@interface wxNSPanel : NSPanel
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen;
- (void)noResponderFor: (SEL) selector;
- (void)sendEvent:(NSEvent *)event;
+- (BOOL)makeFirstResponder:(NSResponder *)aResponder;
@end
@implementation wxNSPanel
}
}
+- (BOOL)makeFirstResponder:(NSResponder *)aResponder
+{
+ s_nextFirstResponder = aResponder;
+ BOOL retval = [super makeFirstResponder:aResponder];
+ s_nextFirstResponder = nil;
+ return retval;
+}
+
@end
if ( style & wxFRAME_TOOL_WINDOW || ( style & wxPOPUP_WINDOW ) ||
GetWXPeer()->GetExtraStyle() & wxTOPLEVEL_EX_DIALOG )
- {
m_macWindow = [wxNSPanel alloc];
- }
else
m_macWindow = [wxNSWindow alloc];
+ [m_macWindow setAcceptsMouseMovedEvents:YES];
+
CGWindowLevel level = kCGNormalWindowLevel;
if ( style & wxFRAME_TOOL_WINDOW )
[m_macWindow setLevel:m_macWindowLevel];
}
+WX_NSResponder wxNonOwnedWindowCocoaImpl::GetNextFirstResponder()
+{
+ return s_nextFirstResponder;
+}
+
+
//
//
//