Important: The Display Manager is deprecated as of Mac OS X v10.4. You should use Quartz Display Services instead (as described in Quartz Display Services Programming Topics).
The previous chapter explains how the Display Manager automatically repositions windows if necessary to ensure that windows are accessible when the user changes the display environment. If the Display Manager moves windows in a manner inappropriate for your application, your application should reposition them instead. Applications that use only the standard window definition functions provided by the Window Manager generally do not need to use the Display Manager.
However, you may need or want your application to perform its own window positioning under various circumstances, such as when
your application benefits by displaying windows and their contents on the display controlled by the video device with the greatest pixel depth
your application benefits by displaying windows on the largest available display
your application uses nonstandard window definition functions that draw windows lacking title bars; examples include fixed-sized windows without title bars (games often use such windows), tool palettes with drag regions on the left sides of their windows, and floating windows
When necessary, the Display Manager automatically repositions windows of type dBoxProc (that is, alert boxes and modal dialog boxes) so that the lower-left corners of the windows appear onscreen. This gives users access to the area with the OK and Cancel buttons.
In addition, your application should respond to Display Manager changes if your application relies on display information that it stores internally. For example, if your application caches display positions, GDevice structures for displays other than the main screen, or the value in the screenBits.bounds field of the screenBits global variable, this information may become invalid after the user changes the display configuration. Therefore, your application should update its internal values accordingly after a display configuration change.
To determine whether the Display Manager is available, use the Gestalt function with the gestaltDisplayMgrAttr selector. Test the bit field indicated by the gestaltDisplayMgrPresent constant in the response parameter. If the bit is set, then the Display Manager is present.
Presence of the Display Manager does not guarantee that a computer also supports video mirroring. To determine whether QuickDraw supports video mirroring on the user’s computer system, use the DMQDIsMirroringCapable function.
Handling Events in Response to Display Manager Changes
Handling the Display Notice Event as a High-Level Event
Handling the Display Notice Event Outside of an Event Loop
Managing Windows In Response to the Display Notice Event
Determining the Characteristics of the Video Devices
Setting Configurations and Display Modes for Video Devices
Last updated: 2007-05-03