We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 731

Summary: No mechanism to extract the NSView for 3d library
Product: SDL Reporter: Daniel <danielhorn>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P5 CC: sezeroz
Version: HG 2.0   
Hardware: PowerPC   
OS: Mac OS X 10.4 (Intel)   
Attachments: The attachment saves the NSView in the SDL_XSysWMinfo struct

Description Daniel 2009-04-24 02:27:23 UTC
Created attachment 323 [details]
The attachment saves the NSView in the SDL_XSysWMinfo struct

I included a patch that addresses the issue for 32 bit systems by placing the NSView data into the data field of the SDL_XSysWMinfo struct
ideally a more OSX specific struct would exist with both NSWindow and NSView fields, each the size of a pointer rather than an int.

This particular patch resolves the issue for my application, however.
Comment 1 Sam Lantinga 2009-09-26 03:03:05 UTC
Now that Snow Leopard is out, do you have a 64-bit clean version of this patch?
Comment 2 Sam Lantinga 2009-12-14 22:52:56 UTC
Ryan said he'll clean it up for 64-bit.
Comment 3 Ryan C. Gordon 2009-12-15 22:34:29 UTC
Changing bug priorities.

--ryan.
Comment 4 Sam Lantinga 2013-05-21 01:06:13 UTC
Fixed!
http://hg.libsdl.org/SDL/rev/54c9f310f7c0
Comment 5 Sam Lantinga 2013-06-06 00:32:48 UTC
FYI, I backed my patch out because you have access to the nswindow and can get the contentView (and other things) from it directly.
http://hg.libsdl.org/SDL/rev/df78adc8ba04