Codebase list virt-viewer / 233c61e
monitor-mapping: Do not allow to skip a display Skipping a display does not have an effect because displays will be reconfigured and shifted on the guest side anyway. these monitor mappings are not valid: 'monitor-mapping=1:2;3:1' - display #2 is not specified 'monitor-mapping=4:2;2:1' - displays #1, #3 are not specified 'monitor-mapping=3:3' - displays #1, #2 are not specified Pavel Grunt 8 years ago
3 changed file(s) with 17 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
331331 [e4591275-d9d3-4a44-a18b-ef2fbc8ac3e2]
332332 monitor-mapping=1:2;2:3
333333
334 The monitor-mapping must contain ids of all displays from 1 to the last
335 desired display id, e.g. "monitor-mapping=3:3" is invalid because mappings
336 for displays 1 and 2 are not specified.
337
334338 =head1 EXAMPLES
335339
336340 To connect to SPICE server on host "makai" with port 5900
150150 [e4591275-d9d3-4a44-a18b-ef2fbc8ac3e2]
151151 monitor-mapping=1:2;2:3
152152
153 The monitor-mapping must contain ids of all displays from 1 to the last
154 desired display id, e.g. "monitor-mapping=3:3" is invalid because mappings
155 for displays 1 and 2 are not specified.
156
153157 =head1 EXAMPLES
154158
155159 To connect to the guest called 'demo' running under Xen
369369 GHashTable *displaymap = g_hash_table_new(g_direct_hash, g_direct_equal);
370370 GHashTable *monitormap = g_hash_table_new(g_direct_hash, g_direct_equal);
371371 int i = 0;
372 int max_display_id = 0;
372373 gchar **tokens = NULL;
373374
374375 for (i = 0; i < nmappings; i++) {
413414 g_debug("Fullscreen config: mapping guest display %i to monitor %i", display, monitor);
414415 g_hash_table_insert(displaymap, GINT_TO_POINTER(display), GINT_TO_POINTER(monitor));
415416 g_hash_table_insert(monitormap, GINT_TO_POINTER(monitor), GINT_TO_POINTER(display));
417 max_display_id = MAX(display, max_display_id);
418 }
419 }
420
421 for (i = 0; i < max_display_id; i++) {
422 if (!g_hash_table_lookup_extended(displaymap, GINT_TO_POINTER(i), NULL, NULL)) {
423 g_warning("Invalid monitor-mapping configuration: display #%d was not specified", i+1);
424 goto configerror;
416425 }
417426 }
418427