Problem with full screen + sleeping on OS X

I’ve just discovered a bug with sleeping and fullscreen. Here is the
bug report and work around I submitted to Apple. I think it would be
wise to include the workaround in SDL.

Summary:
If a password is required to wake the computer from sleep, and a
computer goes to sleep with a full screen application running, then,
upon waking, the fullscreen program will be running on top of the login
box. Since the fullscreen application is active, it get’s all the
input, so the login box times out after a while and the computer goes
back to sleep. This cycle will then continue until the program exits
fullscreen mode so the user can login.

Steps to reproduce:

  1. In the Security System Preferences Panel make sure that “Require
    password to wake this computer from sleep or screen saver” is checked.
  2. Open a full screen application. I used The Ur-Quan Masters
    available at http://sc2.sf.net
  3. While the application is in full screen mode, put the computer to
    sleep (I did this by closing my power book).
  4. Wake the computer (by opening the PowerBook)

Expected Results:
The login window should appear requiring the user to enter their
password.

Actual Results:
The full screen application is active for a short time (maybe a
minute), and then the computer goes back to sleep.

Workaround:
Have fullscreen applications register for notification of sleep and
wake. They should exit fullscreen on the
NSWorkspaceWillSleepNotification notification and reenter fullscreen on
the NSWorkspaceDidWakeNotification notification. This works since it
appears that the DidWake notification doesn’t happen until the user has
logged in.

I’ve just discovered a bug with sleeping and fullscreen.
Here is the bug report and work around I submitted to
Apple. I think it would be wise to include the workaround
in SDL.

This problem has something to do with the way SDL does fullscreen
under OS X. I have a similar problem when my app tries to open a file
requester or an alert panel. The requester/panel appears under the
SDL fullscreen app, and is hence inaccessible… and since the dialogs
are modal nothing can be done to get out of it except ssh-ing into my
Mac and "kill -9"ing the process.

I’d be interested to hear whether Apple says anything about this
problem (my guess is that they will say that the problem is with
SDL.)

Find local movie times and trailers on Yahoo! Movies.

I’ve just discovered a bug with sleeping and fullscreen.
Here is the bug report and work around I submitted to
Apple. I think it would be wise to include the workaround
in SDL.

This problem has something to do with the way SDL does fullscreen
under OS X. I have a similar problem when my app tries to open a file
requester or an alert panel. The requester/panel appears under the
SDL fullscreen app, and is hence inaccessible… and since the dialogs
are modal nothing can be done to get out of it except ssh-ing into my
Mac and "kill -9"ing the process.

I’d be interested to hear whether Apple says anything about this
problem (my guess is that they will say that the problem is with
SDL.)

This is a bug in your application, not SDL or Cocoa. SDL fullscreen is
just that, it becomes the ONLY thing responsible for drawing of the
entire screen. If you want to be able to use other Cocoa windows
(dialogs, etc.) then you can not use fullscreen (without more magical
hacks than it is worth).

-bobOn Jan 3, 2005, at 2:54 AM, Steven Saunders wrote: