summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-session.h
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-10-07 17:05:01 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2015-10-09 09:17:52 -0500
commitaff6c79ae080db286e4cb853cdfa02f2da0d0398 (patch)
tree92d902e32e03b82d669492a8f3c552289f35eac7 /src/virt-viewer-session.h
parent63317571648089595e66e8dadfae955481c4c3d4 (diff)
downloadvirt-viewer-aff6c79ae080db286e4cb853cdfa02f2da0d0398.tar.gz
virt-viewer-aff6c79ae080db286e4cb853cdfa02f2da0d0398.tar.xz
virt-viewer-aff6c79ae080db286e4cb853cdfa02f2da0d0398.zip
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
Diffstat (limited to 'src/virt-viewer-session.h')
-rw-r--r--src/virt-viewer-session.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/virt-viewer-session.h b/src/virt-viewer-session.h
index 85f17cc..d3a9ccc 100644
--- a/src/virt-viewer-session.h
+++ b/src/virt-viewer-session.h
@@ -94,7 +94,8 @@ struct _VirtViewerSessionClass {
void (*session_cut_text)(VirtViewerSession *session, const gchar *str);
void (*session_bell)(VirtViewerSession *session);
void (*session_cancelled)(VirtViewerSession *session);
- void (*apply_monitor_geometry)(VirtViewerSession *session, GdkRectangle* monitors, guint nmonitors);
+ /* monitors = GHashTable<int, GdkRectangle*> */
+ void (*apply_monitor_geometry)(VirtViewerSession *session, GHashTable* monitors);
gboolean (*can_share_folder)(VirtViewerSession *session);
gboolean (*can_retry_auth)(VirtViewerSession *session);
};