I'm trying to create a window from code in a thread created with NSThread detachNewThreadSelector:toTarget:withObject

The main thread simply calls NSApplicationMain

The window is created with
[[NSWindow alloc] initWithContentRect:rect styleMask:(NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask) backing:NSBackingStoreRetained defer:YES]

The window has an empty view set with
setContentView:[[NSView alloc] initWithFrame:[window contentRectForFrameRect:[window frame]]

However, the titlebar is not redrawn correctly, and the standard buttons (zoom, close) does not redraw their active states when mouse moves over them but remain greyed out. They do respond to click events though.

I've been reading the API docs but I can't figure out what I've missed in order to get the window drawing the title bar correctly. Any ideas?

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to