+@implementation wxNSPanel
+
+- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
+{
+ wxNonOwnedWindowCocoaImpl* impl = (wxNonOwnedWindowCocoaImpl*) wxNonOwnedWindowImpl::FindFromWXWindow( self );
+ if (impl && impl->IsFullScreen())
+ return frameRect;
+ else
+ return [super constrainFrameRect:frameRect toScreen:screen];
+}
+
+- (BOOL)canBecomeKeyWindow
+{
+ return YES;
+}
+
+- (void)doCommandBySelector:(SEL)selector
+{
+ if (shouldHandleSelector(selector))
+ [super doCommandBySelector:selector];
+}
+
+// NB: if we don't do this, it seems that all events that end here lead to a NSBeep
+- (void)noResponderFor: (SEL) selector
+{
+ if (selector != @selector(keyDown:) && selector != @selector(keyUp:))
+ {
+ [super noResponderFor:selector];
+ }
+}
+
+- (void)sendEvent:(NSEvent *) event
+{
+ if ( ![self WX_filterSendEvent: event] )
+ [super sendEvent: event];
+}