Red Sun
Red Sun

Reputation: 147

How to hide fullscreen apps in MacOS programmatically

I'm trying to make an app that would hide other windows/apps with a certain interval, but I'm stuck with hiding fullscreen app windows using NSWorkspace and NSRunningApplication classes.

Is there any way to exit fullscreen mode programmatically using public APIs? If not, what private APIs I need to look at to achieve this task?

Upvotes: 2

Views: 242

Answers (1)

matt
matt

Reputation: 535989

Assuming you can get around sandboxing, you can use AppleScript to tell System Events to tell the process in question to set its attribute "AXFullScreen" of window 1 to false.

Upvotes: 2

Related Questions