[Spice-devel] How to send a custom resolution message to windows/linux guest vdagent
Christophe Fergeau
cfergeau at redhat.com
Mon Mar 6 09:16:33 UTC 2017
On Fri, Mar 03, 2017 at 09:48:45PM -0300, Thiago Nascimento Araujo wrote:
> >> ----- Mensagem original -----
> >> De: "Pavel Grunt" <pgrunt at redhat.com>
> >> Para: "Thiago Nascimento Araujo" <taraujo at artit.com.br>, "Jonathon Jongsma" <jjongsma at redhat.com>
> >> Cc: spice-devel at lists.freedesktop.org
> >> Enviadas: Sexta-feira, 3 de março de 2017 6:20:13
> >> Assunto: Re: [Spice-devel] How to send a custom resolution message to windows/linux guest vdagent
> >> On Thu, 2017-03-02 at 13:00 -0300, Thiago Nascimento Araujo wrote:
> >> Hi,
> >>
> >> First of all, thank you all for the quick answers.
> >>
> >> The cut off message was my fault, sorry about that.
> >>
> >> I am trying to understand this:
> >>
> >> Lets say I am connected to a win/lnx guest though remote-viewer and
> >> my remote-viewer is a window with the dimensions 1440x900, so:
> >>
> >> When I resize the window from 1440x900 to 1024x768 (manually resize
> >> the remote-viewer window, not the screen resolution inside the
> >> guest), what is the process involved from the remote-viewer to
> >> communicate to the guest (with spice-guest-tools installed) to
> >> peform the guest resize ?
> >>
> >> Is something like:
> >> a) remote-viewer inform his new resolution sending a message ?
> >yes
>
> So, remote-viewer is connected to spice-server on port 5901 and send a
> message "hey my new resolution is WxH, please inform the QXL" ?
>
> >> b) the agents capture this message ?
> >no (not anymore) server takes this message and sends it to the QXL video card
>
> Server sends to spice channel on port 5901 and vdservice grabs and inform QXL ?
>
> >> c) the agents set the new resolution inside the client ?
> >the window manager notices the change and adjusts the resolution
>
> So, vdservice (if I am not wrong) receives a new WxH and inform the
> QXL to create an arbitrary resolution and scales the screen? I am
> totally lost, because I simply cannot force an arbitrary resolution
> using the program I created using win-api, it just returns -2 all the
> time, meaning "bad resolution".
remote-viewer sends a message to spice-server on port 5901, the
spice-server library receives it. It checks whether to do the guest
resize through vdagent (legacy method), or through the QXL device
(current method).
In the new codepath, spice-server sets some property on the QXL hardware
device (as seen in the guest), and emits an interrupt. The guest QXL
driver catches it, notices there is a new resolution to expose to the
guest, and adds it to the list of known resolutions.
Then I don't know exactly how the resize of the desktop is triggered on
windows. On linux, a property is set on a DRM connector, and userspace
is notified, the window manager (mutter) catches this, and resizes the
desktop.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170306/74af8a88/attachment.sig>
More information about the Spice-devel
mailing list