summaryrefslogtreecommitdiff
path: root/vdagent
AgeCommit message (Collapse)AuthorFilesLines
2012-12-09vdagent: when SetClipboardData fails, set clipboard control event to stop waitArnon Gilboa1-14/+16
Currently, a SetClipboardData failure is followed by useless wait for timeout (VD_CLIPBOARD_TIMEOUT_MS). In addition, we remove the clipboard open-empty-set-close retry, which became irrelevant with the current on_clipboard_request().
2012-11-18vdagent: remove a wrong returnArnon Gilboa1-1/+0
2012-11-14vdagent: set timeout for next clipboard chunk instead of complete receptionArnon Gilboa1-33/+34
currently: -handling client disconnect during clipboard data trasfer is buggy -agent also timeouts on large paste from client (>10sec) therfore: -reduce VD_CLIPBOARD_TIMEOUT_MS to 3sec from previous clipboard chunk -remove _clipboard_event and use _control_event(CONTROL_CLIPBOARD) instead -use _clipboard_tick for clipboard timeout, updated on each clipboard chunk -use cleanup_in_msg() to reset incoming message state rhbz#833835
2012-11-14vdagent: extract event_dispatcher from input_desktop_message_loopArnon Gilboa1-49/+56
2012-11-14vdagent: use virtio-serial, remove pipe usageArnon Gilboa2-243/+256
2012-11-14vdagent: mv vdi_port files from vdserviceArnon Gilboa6-0/+576
2012-09-10vdagent: don't stop due to UIPI blockingArnon Gilboa1-3/+8
User Interface Privilege Isolation is usually used only for specific windows of system security applications (anti-viruses etc.), so with this patch mouse will be irresponsive for these windows but keep working for the rest. A complete solution might be switching to server mouse mode while the agent is still active.
2012-09-10vdagent: add message_queue for messages written to pipeArnon Gilboa1-95/+91
This is only part of the message corruption solution. The other part is fixing virtio-serial / spice-qemu-char throttling code. -replace write_[lock/unlock/completion] calls with [new/enqueue]_message -remove clipboard specific _out_msg_* class members -remove ugly loop - while (a->_out_msg && a->write_clipboard()); -add _message_mutex for message queue -fix pending_write race using _write_mutex -TODO: enqueue large message without dividing it to chunks in advance rhbz #846427
2012-07-25Fix remaining warningsMarc-André Lureau2-2/+2
2012-05-25vdagent: reset clipboard eventMarc-André Lureau1-2/+21
Waiting for a Windows event will not last if it is already set. For example, the client may send clipboard_release() messages while we are not waiting in on_clipboard_request(), and this will SetEvent(clipboard_event) The following clipboard request will thus not wait for the data, resulting in an empty clipboard & paste for the guest application. We could say there is fundamentally a race as there is no obvious way to know if a received message is related to the current request, but by reseting the event before waiting for new events to come, we at least clear the past events.
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-05-24mingw: add standard main() entry functionMarc-André Lureau1-0/+4
Thanks Paolo for the suggestion: http://lists.freedesktop.org/archives/spice-devel/2012-May/009291.html
2012-03-01Revert "mingw: remove tMain use"Christophe Fergeau1-1/+1
This patch wasn't sent for review, and wasn't meant to be pushed as part of the mingw series This reverts commit 63541ea6ac722d332966f28e1779e4d668244fcb.
2012-03-01Fix spacing in VDAgent initialization listChristophe Fergeau1-2/+2
The convention in vdagent codebase seems to put a space before the opening parenthesis in initialization list, this commit fixes 2 inconsistencies related to that.
2012-03-01mingw: remove tMain useChristophe Fergeau1-1/+1
mingw does not support it.
2012-03-01mingw: fix another signed/unsigned warningChristophe Fergeau1-2/+2
VDAgent::_mouse_x and VDAgent::_mouse_y are both signed but are always assigned values from VDAgentMouseState which are unsigned. gcc warns about this so change them to unsigned values.
2012-03-01mingw: use const char * in DisplaySetting()Christophe Fergeau1-1/+1
If we use char * instead of const char *, mingw gets confused when calling the constructor with a const char *: it tries to convert it to a mutable string through a std::string conversion and outputs a warning.
2012-03-01mingw: workaround ximage.h #defining min/maxChristophe Fergeau1-0/+2
This confuses the deque implementation of gcc which uses std::min std::max and causes compile failure.
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: workaround "use of unitialized var" warningChristophe Fergeau1-1/+1
mingw warns about using a variable before it's initialized, but it's a false alarm. Initialize it to 0 to avoid the warning.
2012-03-01mingw: use unsigned int in for loops when neededChristophe Fergeau1-4/+4
gcc complains about mixed use of signed/unsigned otherwise
2012-03-01mingw: fix initialization list order for VDAgent()Christophe Fergeau1-2/+2
2012-03-01mingw: remove unused variableChristophe Fergeau1-1/+0
2012-03-01mingw: fix header caseChristophe Fergeau1-1/+1
linux systems need it in lower-case, Windows systems shouldn't care.
2012-03-01mingw: pick min/max from the std:: namespaceChristophe Fergeau1-0/+5
2012-02-23mingw: fix format string warningsChristophe Fergeau3-56/+56
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 Gilboa2-19/+34
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-11-16vdagent: release clipboard ownership on agent stop & desktop switch rhbz#731628Arnon Gilboa1-21/+65
-use event queue for agent stop & desktop switch -exit gracefully on session end
2011-07-24vdagent: add castingArnon Gilboa1-1/+1
2011-07-24vdagent: remove whitespacesArnon Gilboa1-4/+4
2011-05-03vdagent: use SPICE_PROTOCOL_DIR in project include dirsArnon Gilboa1-4/+4
instead of SPICE_COMMON_DIR, which is an old and confusing name, due to the common directory in spice git repo.
2011-04-28vdagent: remove dependency on qxl driver (rhbz#683166)Arnon Gilboa2-32/+73
-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 Gilboa2-32/+57
similar handling as linux agent
2010-11-23vdagent: add image copy-paste supportArnon Gilboa2-76/+159
-currently png & bmp -using wspice libs cximage.lib & png.lib -jpg & tiff will follow
2010-11-09Revert "vdservice: don't start when no qxl device present"Arnon Gilboa3-9/+19
This reverts commit 349e6a5bf8804b25c3af6e1f439122a7cc269cc2 which breaks vsdervice on Windows 7
2010-10-11vdagent: handle multiple types on clipboard grab send & receiveArnon Gilboa1-29/+41
2010-10-06vdagent: remove clipboard_changer hackArnon Gilboa1-7/+5
Instead of keeping a flag, we simply check wether the new owner is usor not
2010-10-06vdagent: Keep track of clipboard ownershipArnon Gilboa1-30/+79
Given that all clipboard handling is async, it is possible to for example receive a request for clipboard data from the client while the agent no longer owns the clipboard (ie a VD_AGENT_CLIPBOARD_RELEASE message is in transit to the client). Thus it is necessary to keep track of our notion of clipboard ownership and check received clipboard messages (both from other apps on the client machine and from the agent) to see if they match our notion and if not drop, or in case were a counter message is expected nack the clipboard message.(citing hansg) clean ups: capability checks, return values
2010-10-05vdagent: receiving a clipboard request with an unsupported type is replied ↵Arnon Gilboa1-2/+3
by data with a none type Currently we send a VD_AGENT_CLIPBOARD_RELEASE when we receive a VD_AGENT_CLIPBOARD_REQUEST with a type which we do not support. This is not correct, as this means given up clipboard ownership while we may be able to answer requests with different types. The correct response is to nack the request by sending a VD_AGENT_CLIPBOARD (data) message with a type of VD_AGENT_CLIPBOARD_NONE.(citing hansg)
2010-10-05vdagent: remove windows-specific bitmap cut & paste supportArnon Gilboa1-26/+18
will wait until png comes in
2010-09-29vdagent: support & check VD_AGENT_CAP_CLIPBOARD_BY_DEMANDArnon Gilboa1-20/+23
cleanup, rename change -> grab, render->request
2010-09-21vd_agent: support clipboard/selection-owner modelArnon Gilboa1-70/+253
-enable the clipboard support -support the GRAB/REQUEST/DATA/RELEASE verbs in both ways. -pasting clipboard data is now "only-by-demand" from both sides (client and agent), whose behavior is symmetric. -client and agent don't read or send the contents of the clipboard unnecessarily (e.g. copy, internal paste, repeating paste, focus change) -bonus (no cost): support image cut & paste, currently only with win client
2010-09-21vdservice: cleanup vcprojsArnon Gilboa1-157/+0
-remove deprecated Detect64BitPortabilityProblems -add setupapi.lib to AdditionalDependencies in x64
2010-08-31vdagent: support announce_capabilitiesAlon Levy1-1/+89
2010-08-24vdservice: don't start when no qxl device presentAlon Levy3-19/+9
2010-08-24Controlling Windows display settings (e.g., wallpaper, UI effects and font ↵Yonit Halperin5-0/+721
smoothing) The configuration is received from Spice client. The main usage of this option is for disabling display features in order to accelerate Spice performance over limited network connections.
2010-08-23vdagent: support basic clipboard support (disabled by default)Arnon Gilboa1-0/+159
-add CLIPBOARD_ENABLED ifdefs in the agent for disabling clipboard support -currently supports text only (UTF8)
2010-08-23vdservice/vdagent: fixes leading to clipboard (aka large) message handlingArnon Gilboa1-24/+60
-add VDAgent::dispatch_message() -in VDAgent::read_completion() handle multi-chunk msgs -fix chunk size bug in VDService::handle_pipe_data() -add size to VDPipeMessage
2010-08-23include path fixes because of spice-protcol updatesAlon Levy1-1/+1
* mutex.h inlined into common/vdcommon.h * vdagent.h renamed to spice/vd_agent.h