简体   繁体   中英

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?

假设您可以绕过沙箱,您可以使用 AppleScript 告诉系统事件告诉有问题的进程将其attribute "AXFullScreen" of window 1 to false设置attribute "AXFullScreen" of window 1 to false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM