Skip to content
  • Owen W. Taylor's avatar
    Simplify relationship between mapping and visibility · 6726fcd2
    Owen W. Taylor authored
    Previously, changes to the visibility of a window could be indicated
    by meta_compositor_map_window(), meta_compositor_unminimize_window(),
    meta_compositor_set_window_hidden(), etc, with the exact behavior
    depending on the 'live_hidden_windows' preference.
    
    Simplify this so that visibility is controlled by:
    
     meta_compositor_show_window()
     meta_compositor_hide_window()
    
    With an 'effect' parameter provided to indicate the appropriate
    effect (CREATE/UNMINIMIZE/MINIMIZE/DESTROY/NONE.)
    
    The map state of the window is signalled separately by:
    
     meta_compositor_map_window()
     meta_compositor_unmap_window()
    
    And is used only to control resource handling.
    
    Other changes:
    
     * The desired effect on show/hide is explicitly stored in
       MetaWindow, avoiding the need for the was_minimized flag.
       At idle, once we calculate the window state, we pass the
       effect to the compositor if it matches the new window
       state, and then clear the effect to start over for future
       map state changes.
    
     * meta_compositor_switch_workspace() is called before any windows
       are hidden or shown, allowing the compositor to avoid hiding
       or showing an effect for windows involved in the switch.
       http://bugzilla.gnome.org/show_bug.cgi?id=582341
    
     * Handling of post-effect cleanups for MutterWindow are
       simplified - instead of trying to do different things based
       on the individual needs of different effects, we just wait until
       all effects complete and sync the window state to what it
       should be.
    
     * On unmap, once we destroy the pixmap, we tell ClutterX11Pixmap
       that we've done so, so it can clean up and unbind. (The
       unbinding doesn't seem to be working properly because of
       ClutterGLXPixmap or video driver issues.)
    
    http://bugzilla.gnome.org/show_bug.cgi?id=587251
    6726fcd2