Next: 3.2 Timeouts Up: 3 Animation Via Work Previous: 3 Animation Via Work

3.1 Handling Iconification

When the paperplane window is open, we want the animate work procedure to update the 3D scene continuously. If the user iconifies the window, it would be wasteful to continue animating a no longer visible scene. To avoid wasting resources rendering to an unmapped window, paperplane installs an event handler called map_state_changed for the top-level widget to notice UnmapNotify and MapNotify events. The handler makes sure the work procedure is removed or added to reflect the map state of the window.


mjk@asd.sgi.com
Wed Oct 19 18:08:51 PDT 1994