How to prevent an application to become active when clicking in a window ?
03/03/07 21:26
How to prevent a click in a window of a background app to make that window and the application its belogns to, to become active ?
The NSWindow methods of interest to you are:
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
- (BOOL)acceptsFirstResponder;
of NSView:
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent;
and the style mask during the initialization:
styleMask:(… your app specific other flags… | NSNonactivatingPanelMask)
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
- (BOOL)acceptsFirstResponder;
of NSView:
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent;
and the style mask during the initialization:
styleMask:(… your app specific other flags… | NSNonactivatingPanelMask)