summaryrefslogtreecommitdiff
path: root/vdagent/desktop_layout.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-07-17Fix wrong size_t printf formatMarc-André Lureau1-1/+1
vdagent/desktop_layout.cpp:121:763: warning: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'std::vector<DisplayMode*>::size_type {aka long long unsigned int}' [-Wformat=]
2013-07-17Fix wrong DWORD print fmtMarc-André Lureau1-1/+1
format '%u' expects argument of type 'unsigned int', but argument 8 has type 'DWORD
2013-05-12vdagent: protect against NULL entry in _displaysUri Lublin1-2/+5
rhbz#958051 It may be that a _displays entry will be NULL. I encountered it when running with multiple QXL devices, for one of which the driver failed to load since it was "out of resources". Iterations over _displays should handle that case. We found four such iterations, and fixed them in this patch.
2013-04-24Try harder to enable monitorsMarc-André Lureau1-9/+26
0ba6e2936 was trying to fix CreateDC() failing when the monitor is disabled, unfortunately, enabling monitor with an arbitrary resolution may still fail (the previous resolution, or the current one). This patch address the issue by first trying the current resolution, and falling back to a well-known resolution. This causes a temporary client resolution change (bad), which is immediately adjusted to the arbitrary resolution. We may want to improve agent->driver communication of arbitrary resolution before the driver is loaded, perhaps using registry or via the spice server. Any of these solution will unfortunately take some more time which we are missing. https://bugzilla.redhat.com/show_bug.cgi?id=922394 (seem to solve related bugs, like mouse offset, or flashing monitors)
2013-03-16Reattach monitorsMarc-André Lureau1-0/+6
Teach vdagent to attach monitors. A monitor needs to be enabled before we can set the custom resolution. Fortunately, the client doesn't seem to have time to catch that, so things are smooth. This is require to allow the virt-viewer display menu to work properly and enable extra monitors: https://bugzilla.redhat.com/show_bug.cgi?id=919530
2012-07-25Fix remaining warningsMarc-André Lureau1-1/+1
2012-05-24desktop_layout: fix incorrect total_width/heightMarc-André Lureau1-0/+5
When resizing desktop to best match, the agent fails to update it's current mode width/height and then incorrectly report different total_width/total_height than real screen dimensions, then scaling input incorrectly results in mouse cursor offset. https://bugzilla.redhat.com/show_bug.cgi?id=823019
2012-05-24Resize to arbitrary resolutionMarc-André Lureau1-0/+26
Use QXL_ESCAPE_SET_CUSTOM_DISPLAY to update custom mode, and switch to it.
2012-03-01mingw: fix signed/unsigned comparison warningChristophe Fergeau1-1/+1
DWORD is an unsigned long, but it's assigned -1 in various places. mingw warns when comparing a DWORD value against -1. This commit casts the -1 to DWORD to avoid the warning.
2012-03-01mingw: pick min/max from the std:: namespaceChristophe Fergeau1-0/+5
2012-02-23mingw: fix format string warningsChristophe Fergeau1-2/+2
Most of them are caused by not using %lu to print a DWORD (which is an unsigned long).
2012-02-05vdagent: fix cursor position sync on multimon rhbz#757819Arnon Gilboa1-19/+33
On any change of the display settings, driven by client message or guest user, normalize all display positions to non-negative coordinates, and update total width and height of the virtual desktop. The bug was due to wrong handling of (non-primary) displays positioned on negative coordinates. Primary monitor is always located (in windows) in (0,0). When a secondary monitor is positioned above/to the left of the primary, it will have negative coordinate. This can be the case when guest display settings are changed either manually on the guest, or due to a message (auto-conf VD_AGENT_MONITORS_CONFIG) from the client to the agent. In VDAgent::handle_mouse_event(), mouse event is generated by scaling the received (x,y, display_id) to normalized absolute coordinates (0..0xffff) on the entire virtual desktop which contains all the displays. Keeping negative display coordinates, as received from the client, was mistakenly handled and generated wrong (sometimes even negative) coordinates.
2011-07-24vdagent: add castingArnon Gilboa1-1/+1
2011-04-28vdagent: remove dependency on qxl driver (rhbz#683166)Arnon Gilboa1-32/+72
-don't fail to start when no qxl driver installed -if qxls found use them, otherwise just use enumerated non-mirror devices -currently qxl/non-qxl multimon mix is not supported
2010-12-14vdagent: use best match for resolution changeArnon Gilboa1-31/+54
similar handling as linux agent
2010-11-09Revert "vdservice: don't start when no qxl device present"Arnon Gilboa1-1/+18
This reverts commit 349e6a5bf8804b25c3af6e1f439122a7cc269cc2 which breaks vsdervice on Windows 7
2010-08-24vdservice: don't start when no qxl device presentAlon Levy1-18/+1
2009-11-05fresh startArnon Gilboa1-0/+195