shoumikhin
shoumikhin

Reputation: 1345

How to create an inaccessible window on Mac OS?

I mean a window which will not be accessible via Cocoa, Carbon or other CoreGraphics API for obtaining NSWindow *, WindowRef and others.

Like X11 application on Mac does.

Such a window that if you pass its window ID to [NSApp windowWithWindowID] or HIWindowFromCGWindowID() they both return NULL.

Thanks!

Upvotes: 1

Views: 611

Answers (1)

shoumikhin
shoumikhin

Reputation: 1345

There's CoreGraphics Private API. Its definition is available thanks to reverse engineering. If some window is created with such API it won't be accessible via [NSApp windowWithWindowNumber: (NSInteger)windowID] or HIWindowFromCGWindowID() functions.

Xquartz uses Xplugin library, which in turn uses CoreGraphics Private API.

Upvotes: 1

Related Questions