[Spice-devel] [PATCH vdagent-win] vdagent: enable disabled monitor with default resolution
Christophe Fergeau
cfergeau at redhat.com
Mon Apr 22 08:27:52 PDT 2013
On Sun, Apr 21, 2013 at 12:12:46PM +0300, agilboa at redhat.com wrote:
> On 04/19/2013 12:31 PM, Christophe Fergeau wrote:
> >To my eyes, the root cause is that the monitor is disabled, and the way the
> >code is laid out does not cope well with disabled monitors.
> >After reading
> >http://msdn.microsoft.com/en-us/library/windows/desktop/dd162617%28v=vs.85%29.aspx
> >I wonder if it would be enough to move the
> >LONG ret = ChangeDisplaySettingsEx(dev_info.DeviceName, &dev_mode, NULL,
> > CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
> >
> >call from set_displays() to before setting the custom resolution with
> >ExtEscape. This ChangeDisplaySettingsEx call will be done with
> >DM_POSITION set in dev_mode->dmFields, and the link above says:
> >"To add a display monitor to a multiple-monitor system programmatically,
> >set DEVMODE.dmFields to DM_POSITION and specify a position (using
> >DEVMODE.dmPosition ) for the monitor you are adding " (I read this as 'this
> >call will enable the monitor')
> But this exact ChangeDisplaySettingsEx call is already there before
> ExtEscape, isn't it?
> http://git.app.eng.bos.redhat.com/?p=spice/win/vdagent.git;a=blob;f=vdagent/desktop_layout.cpp;h=bce9ac0e#l256
But dev_mode->dmFields does not necessarily have DM_POSITION at this point.
I guess it could always have it as set_pos is always true anyway.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130422/268a71f1/attachment.pgp>
More information about the Spice-devel
mailing list