cocoa - How to prevent focus window when its view is clicked by mouse on OSX? -


i writing cocoa app , not want focus on mouse click it, found no way implement yet. 1 can give me suggestions ?

i've found solution!

create subclass of nsview, , reimplement following methods:

-(bool) shoulddelaywindoworderingforevent:(nsevent *)theevent {     return yes; }  -(void) mousedown:(nsevent *)theevent {     [nsapp preventwindowordering]; } 

and set contentview property of created nswindow, , set window style mask nsborderlesswindowmask , , works.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -