millenomi / afloat

Afloat is a Mac extender that adds useful window management commands to most Mac apps.
http://infinite-labs.net/afloat/
Other
700 stars 225 forks source link

Simple scripting - toggle float of window not owned by process running code #21

Closed Noitidart closed 8 years ago

Noitidart commented 8 years ago

Hi there, I'm doing some simple ctypes scripting. I have Firefox.app running next to the developer editions of firefox known as "Firefox Developer Edition.app", "Firefox Beta.app", "Nightly.app". I am doing some ctypes from my main "Firefox.app", in it i can set any window OWNED by Firefox.app to always on top, however it is failing when I try to do to others.

This code works for windows owned by the process running the code -

[aNSWindow setLevel: Int(CGWindowLevelForKey(kCGFloatingWindowLevelKey))]

Can you please help me so I can set windows of my other Firefox's to always on top?

I got all informations on the windows with: CGWindowListCopyWindowInfo

Thanks very much

Noitidart commented 8 years ago

Oh shoot I didn't realize I had posted here before. I closed this one for now. Whoops.