Dan Potter
2005.04.30, 02:26 AM
Ok, this is probably going to sound like the dumbest question anyone's asked on here yet. :D But here goes...
I've got a single OpenGL view window that's created via the my project's NIB. I just size the contents to 640x480, put an NSView inside it, and attach to that at start time to make the GL context. It all works just great, except that the window is never focused when the app starts.
I've tried messing around with IB properties, I've tried all sorts of different methods I found in the Xcode docs for manually raising and focusing windows... nothing seems to work. I get key input just fine, and once the window is up you can click on it to focus it. It just won't focus by default, which looks goofy.
To add insult to injury, I wrote an OpenVPN Cocoa front end that works just fine. So it's not like I'm tainted with the window non-focus in general :)
Is there something I'm missing here? :wacko:
The only thing I can think of that I'm doing weirdly is I've got my own event loop... but it passes all events it doesn't understand onwards using [NSApp sendEvent:].
I've got a single OpenGL view window that's created via the my project's NIB. I just size the contents to 640x480, put an NSView inside it, and attach to that at start time to make the GL context. It all works just great, except that the window is never focused when the app starts.
I've tried messing around with IB properties, I've tried all sorts of different methods I found in the Xcode docs for manually raising and focusing windows... nothing seems to work. I get key input just fine, and once the window is up you can click on it to focus it. It just won't focus by default, which looks goofy.
To add insult to injury, I wrote an OpenVPN Cocoa front end that works just fine. So it's not like I'm tainted with the window non-focus in general :)
Is there something I'm missing here? :wacko:
The only thing I can think of that I'm doing weirdly is I've got my own event loop... but it passes all events it doesn't understand onwards using [NSApp sendEvent:].