The callback procedure is passed an Apple event that the application has to parse. The Graphical Truffles column in develop Issue 25 describes this in more detail. The Display Manager passes all the information about the old and new display configurations to the application when the world changes. The Apple event-handling code on this issue's CD shows some ways to handle Display Manager events. This is especially a problem with games or multimedia applications that would like to hide the menu bar.
Most applications hide the menu bar by adding the menu bar area to the gray region.
If the application wants to show the menu bar again, it removes the old menu bar area from the rebuilt gray region, but this will not accurately reflect the available screen real estate. This top strip, where the menu bar was, would be lost. As shown in Figure 1, the menu bar was on the display on the left before the application was launched. The application saved the menu bar location and added it to the gray region so that it could draw there. As shown in Figure 2, when the application quit, it subtracted the old menu bar area back out of the gray region.