summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-util.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-util.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-util.h')
-rw-r--r--src/virt-viewer-util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virt-viewer-util.h b/src/virt-viewer-util.h
index 98badd2..f1cb08b 100644
--- a/src/virt-viewer-util.h
+++ b/src/virt-viewer-util.h
@@ -57,8 +57,8 @@ gchar* spice_hotkey_to_gtk_accelerator(const gchar *key);
gint virt_viewer_compare_buildid(const gchar *s1, const gchar *s2);
/* monitor alignment */
-void virt_viewer_align_monitors_linear(GdkRectangle *displays, guint ndisplays);
-void virt_viewer_shift_monitors_to_origin(GdkRectangle *displays, guint ndisplays);
+void virt_viewer_align_monitors_linear(GHashTable *displays);
+void virt_viewer_shift_monitors_to_origin(GHashTable *displays);
#endif