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
331 | 331 |
[e4591275-d9d3-4a44-a18b-ef2fbc8ac3e2]
|
332 | 332 |
monitor-mapping=1:2;2:3
|
333 | 333 |
|
|
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 |
|
334 | 338 |
=head1 EXAMPLES
|
335 | 339 |
|
336 | 340 |
To connect to SPICE server on host "makai" with port 5900
|
150 | 150 |
[e4591275-d9d3-4a44-a18b-ef2fbc8ac3e2]
|
151 | 151 |
monitor-mapping=1:2;2:3
|
152 | 152 |
|
|
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 |
|
153 | 157 |
=head1 EXAMPLES
|
154 | 158 |
|
155 | 159 |
To connect to the guest called 'demo' running under Xen
|
369 | 369 |
GHashTable *displaymap = g_hash_table_new(g_direct_hash, g_direct_equal);
|
370 | 370 |
GHashTable *monitormap = g_hash_table_new(g_direct_hash, g_direct_equal);
|
371 | 371 |
int i = 0;
|
|
372 |
int max_display_id = 0;
|
372 | 373 |
gchar **tokens = NULL;
|
373 | 374 |
|
374 | 375 |
for (i = 0; i < nmappings; i++) {
|
|
413 | 414 |
g_debug("Fullscreen config: mapping guest display %i to monitor %i", display, monitor);
|
414 | 415 |
g_hash_table_insert(displaymap, GINT_TO_POINTER(display), GINT_TO_POINTER(monitor));
|
415 | 416 |
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;
|
416 | 425 |
}
|
417 | 426 |
}
|
418 | 427 |
|