1
votes

I've been searching for a solution for weeks and have yet to find something solid. Not even those "ugly Mac hacks" have worked, so I look to you guys.

Here's the issue: I'm creating a presentation application in Adobe AIR for Desktop in AS3. One window (not fullscreen) controls the presentation, while the other displays it. Each window would be on a separate monitor. I want to be able to make the second NativeWindow fullscreen, but the OS X menu bar remains visible.

Does anyone know how to get around this, without having users disable "Displays have separate spaces" in System Preferences?

2

2 Answers

1
votes

There is a workaround:

I decided that, upon first run, I would make a call to an AppleScript script that enables com.apple.spaces spans-displays. Here's that script:

set target to "com.apple.spaces spans-displays"
if ((do shell script "defaults read " & target) is equal to "0") then
    set new_value to "TRUE"
    do shell script "defaults write " & target & " -bool " & new_value
end if
do shell script "killall -KILL loginwindow &" with administrator privileges

I use a NativeProcess to run /usr/bin/osascript. The parameter should be the native path to your .scpt file.

0
votes

if you do not use a lot of Adobe AIR functionality you might try to package with MDM's Zinc. Zinc allows you to create "native" self-contained program executables, which are not dependent on AIR or any other framework being installed.