Skip to main content
Known Participant
June 20, 2014
Question

Fullscreen mode broken on OS X

  • June 20, 2014
  • 1 reply
  • 267 views

If you try the following code in AIR for OS X and Windows you find that Windows correctly DOES NOT fire the ACTIVATE event when fullscreen is executed but OS X does:

window.nativeWindow.visible = true;

window.nativeWindow.stage.displayState = runtime.flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE;

window.nativeWindow.addEventListener(air.Event.ACTIVATE, function() {

  air.trace('ACTIVATE');

});

window.nativeWindow.addEventListener(air.Event.DEACTIVATE, function() {

  air.trace('DEACTIVATE');

});

I've filed a bug for it in bugbase... but not sure how long Adobe take to fix bugs in AIR... and this is preventing my app from working as expected.

The reason is because I need to fire the fullscreen mode on activation of the window (fired after a user has deactivated the window) so it forces fullscreen mode for the app.

window.nativeWindow.addEventListener(air.Event.DEACTIVATE, function() {
air.trace('DEACTIVATE');

window.nativeWindow.minimize(); // this hides the window

});

window.nativeWindow.addEventListener(air.Event.ACTIVATE, function() {

  air.trace('ACTIVATE');

  window.nativeWindow.stage.displayState = runtime.flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE; // reshows the window and makes it fullscreen

});

This works perfectly on Windows. But because OS X fires the event on fullscreen, it calls fullscreen again... and occasionally creates duplicate windows (which is another bug that only happens on OS X if fullscreen is called more than once and doesn't happen on Windows - again filed on bugbase).

Any ideas on how I can get around this in the mean time, until Adobe fixes the bugs?

This topic has been closed for replies.

1 reply

Known Participant
June 23, 2014

Any updates? The bugs haven't had any progress on them over at bugbase either. Thanks.