objective c - How to force an NSWindow to be in front of every app? Even fullscreen apps -


i have nswindow have in front of (every app of computer, fullscreen apps, etc..). if click in background app, nswindow cant go background. , nswindow must follow user screen if, example, user switches desktop desktop2, , on... how can that?
thanks!

if don't need visible other apps' full-screen windows, it's not hard.

first, stay in front of else, setlevel: nsfloatingwindowlevel or higher. experiment different values see seems appropriate needs.

next, stay in front when user changes spaces, possibly including exposé/mission control, setcollectionbehavior: appropriate pair of flags, or use corresponding spaces , exposé settings in attributes inspector if you're creating window in nib. either can join spaces or move active space make sure stay visible on every space, in different ways. you'll want exposé set stationary, or possibly transient, too. again, try both ways , see.

however, lion hide both all-spaces , move-to-active-space windows when user switches full-screen space or dashboard or launchpad. , if watch, you'll see in different ways each of 3 cases. , snow leopard things little differently, , mountain lion.

if want solve last problem, need bit of hackery—and different forms of hackery each case , each os version. basic trick catch hide-related notifications , unhide @ appropriate time.


Comments