Finally after 2 days investigation, the answer goes back to the documentation of NSWindow.
There are two related methods.
- (BOOL)canBecomeKeyWindow Return Value YES if the window can become the key window, otherwise, NO.
Discussion Attempts to make the window the key window are abandoned if this method returns NO. The NSWindow implementation returns YES if the window has a title bar or a resize bar, or NO otherwise.
And
canBecomeMainWindow Indicates whether the window can become the application’s main window.
- (BOOL)canBecomeMainWindow Return Value YES when the window can become the main window; otherwise, NO.
Discussion Attempts to make the window the main window are abandoned if this method returns NO. The NSWindow implementation returns YES if the window is visible, is not an NSPanel object, and has a title bar or a resize mechanism. Otherwise it returns NO.
So the conclusion is that if the window doesn't have a title bar or resize bar, it by default cannot become a main and key window. When setting the window to the fake full screen on 10.6.8 by [NSWindow setStyleMask:NSBorderlessWindowMask], the title bar is gong.
To resolve this issue, one needs to override the above 2 methods with returning YES.