aff6c79 Use the display ID to configure fullscreen monitors

Authored and Committed by jjongsma 8 years ago
    Use the display ID to configure fullscreen monitors
    
    When starting virt-viewer in fullscreen mode, we generally try to
    arrange guest displays exactly the same as client monitors. So if a
    client machine has two monitors, we'll try to enable display 0 and 1 on
    the guest (in that order). However, when using the configuration file to
    map fullscreen displays to different monitors, the guest displays may
    not be sequential, or there may be displays missing. For example,
    consider the following configuration:
    
    monitor-mapping=1:2;2:1
    
    In virt_viewer_session_spice_fullscreen_auto_conf(), we were building an
    array of GdkRectangles for the initial monitors that we want to enable
    on the guest. We then configured the guest displays using the index of
    the array for the as the id of the guest display. But when displays
    are sparse or are out-of-sequence, the array index will not match the
    >ntended display ID. This created problems where displays were arranged
    incorrectly. By changing the simple array into a GHashTable, we can keep
    the display ID together with the GdkRectangle until we need to use it,
    and things will be configured correctly.
    
    This regression was introduced by c586dc8c.
    
    Fixes: rhbz#1267184
    
        
file modified
+25 -18
file modified
+8 -22
file modified
+2 -1
file modified
+39 -19
file modified
+2 -2