Toggling multiple windows in/out of fullscreen is troublesome

Originator:gnachman
Number:rdar://27304267 Date Originated:July 12, 2016
Status:Open Resolved:
Product:Mac OS X Product Version:10.11.2
Classification: Reproducible:Always
 
Summary:
Toggling multiple windows in or out of full screen requires carefully serializing the operations to avoid problems.

If toggleFullScreen: is invoked on two non-full-screen windows then only one will enter full screen.

If toggleFullScreen: is invoked on two fullscreen windows that are split into a single desktop, one will exit fullscreen and the other remains in the fullscreen desktop with a title bar that does not work.

Steps to Reproduce:
1. Build and run the attached program
2. Observe that two windows (one red, one blue) open. They each have a button. Click the button in either of them.
3. Observe that although both should have entered full screen, only the red one does. The blue window is left behind. [this is the first issue]
4. Using mission control, place both the red and blue windows in the same desktop in a split screen configuration.
5. Click the button again (either button, they're the same)
6. Observe that one window properly exits full screen while the other is left behind. The left-behind window is back to its original size but is floating on the fullscreen desktop. Its title bar does not work to drag it. The minimize button minimizes it into an invisible dock. You have to fullscreen it by clicking the green button to get back to a sane state.

Expected Results:
toggleFullScreen: should never fail or leave the system in a not-so-great state. It should toggle full screen reliably.

Actual Results:
See repro steps for details.

Version:
Mac OS 10.11.2 on 2014 retina iMac

Notes:
It is particularly vexing when restoring app state at startup that entering full screen requires serializing the toggles and that each window has to finish animating before the next one can begin. The user should only need to wait through one animation.


Configuration:
I have the following mission control settings:

Automatically rearrange spaces based on most recent use: ON
When switching to an application, switch to a space with open windows for the application: ON
Group windows by application: ON
Displays have separate Spaces: ON
Dashboard: Off

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!