mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-31 02:55:52 +00:00
Cleanup: only add display when it's created
This wasn't causing any problems because the _add_display() function has an early return for the case that the display has already been added to the session, but it's quite confusing when reading the code to see this _add_display() function being called for every display every time we get a monitor configuration update.
This commit is contained in:
parent
7ddbd28756
commit
c543941a17
@ -727,10 +727,9 @@ virt_viewer_session_spice_display_monitors(SpiceChannel *channel,
|
||||
display = virt_viewer_display_spice_new(self, channel, i);
|
||||
g_debug("creating spice display (#:%d)", i);
|
||||
g_ptr_array_index(displays, i) = g_object_ref_sink(display);
|
||||
virt_viewer_session_add_display(VIRT_VIEWER_SESSION(self),
|
||||
VIRT_VIEWER_DISPLAY(display));
|
||||
}
|
||||
|
||||
virt_viewer_session_add_display(VIRT_VIEWER_SESSION(self),
|
||||
VIRT_VIEWER_DISPLAY(display));
|
||||
}
|
||||
|
||||
for (i = 0; i < monitors->len; i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user