[virt-tools-list] [virt-viewer] [PATCH] session-spice: Only update displays geometry if the agent is connected

Fabiano Fidêncio fabiano at fidencio.org
Tue Jun 2 20:58:51 UTC 2015


Pavel,

On Tue, Jun 2, 2015 at 7:07 PM, Pavel Grunt <pgrunt at redhat.com> wrote:
> Hi, it makes sense.
>
> What about moving the check to virt_viewer_session_spice_apply_monitor_geometry()?

May be. I just think that having it here is a bit cleaner.
But I would be okay moving it to
virt_viewer_session_spice_apply_monitor_geometry() as well.

>
> Pavel
>
> On Tue, 2015-06-02 at 17:35 +0200, Fabiano Fidêncio wrote:
>> ---
>>  src/virt-viewer-session-spice.c | 11 ++++++++---
>>  1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
>> index b69faa6..f763975 100644
>> --- a/src/virt-viewer-session-spice.c
>> +++ b/src/virt-viewer-session-spice.c
>> @@ -674,12 +674,17 @@ agent_connected_changed(SpiceChannel *cmain G_GNUC_UNUSED,
>>                          GParamSpec *pspec G_GNUC_UNUSED,
>>                          VirtViewerSessionSpice *self)
>>  {
>> +    gboolean agent_connected;
>> +
>>      // this will force refresh of application menu
>>      g_signal_emit_by_name(self, "session-display-updated");
>>
>> -    /* this will force update displays geometry when the agent has connected
>> -     * after the application (eg: rebooting the guest) */
>> -    virt_viewer_session_update_displays_geometry(VIRT_VIEWER_SESSION(self));
>> +    g_object_get(cmain, "agent-connected", &agent_connected, NULL);
>> +    if (agent_connected) {
>> +        /* this will force update displays geometry when the agent has connected
>> +         * after the application (eg: rebooting the guest) */
>> +        virt_viewer_session_update_displays_geometry(VIRT_VIEWER_SESSION(self));
>> +    }
>>  }
>>
>>  static void
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list


Best Regards,
-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list