Adjust NSOpenGLView subclass use for glcanvas on macOS
makes this not fully a user pane, leave default handling for most things, but indicate that we can have the focus, fixes #18237
This commit is contained in:
parent
8e1c4e9238
commit
8ace56a84e
@ -135,6 +135,11 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *GLAttrs,
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL) acceptsFirstResponder
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
bool wxGLCanvas::DoCreate(wxWindow *parent,
|
||||
@ -154,7 +159,7 @@ bool wxGLCanvas::DoCreate(wxWindow *parent,
|
||||
NSRect r = wxOSXGetFrameForControl( this, pos , size ) ;
|
||||
wxNSCustomOpenGLView* v = [[wxNSCustomOpenGLView alloc] initWithFrame:r];
|
||||
|
||||
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( this, v, false, true );
|
||||
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( this, v );
|
||||
SetPeer(c);
|
||||
MacPostControlCreate(pos, size) ;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user