summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-22Revert "vdagent: add vdagent_helper to support mouse when UAC dialog takes ↵Arnon Gilboa5-470/+1
focus" This reverts commit dd9d1f41cace5e73bfd847ff8d0cfa303e141b1c.
2013-03-18vdagent: add vdagent_helper to support mouse when UAC dialog takes focusArnon Gilboa5-1/+470
Running the helper with ShellExecute(..."runas"...) is the way to SendInput() to the UAC dialog in Windows Vista and above. http://stackoverflow.com/questions/2426594/starting-a-uac-elevated-process- from-a-non-interactive-service-win32-net-power http://www.microsoft-questions.com/microsoft/Platform-SDK-Security/29620442/ how-to-proper-use-sendinput-to-a-elevated-window-from-a-service.aspx rhbz #908422
2013-03-18vdagent: don't terminate if stop event cannot be openedArnon Gilboa1-13/+9
so vdagent can keep running as standalone without dependency on vdservice. Regression was due to commit c1807e. rhbz #903379
2013-03-18vdagent: log unsupported grabbed clipboard formatsArnon Gilboa1-3/+8
rhbz #919451 debugging, useful anyway
2013-03-18vdagent: for Win7 class, use ClipboardFormatListener apiArnon Gilboa2-2/+42
(Win7 class includes Win8/Vista/Server2012/Server2008/R2) This new api was introduced in Vista/2K8 to keep track of clipboard changes, without the need to trust the (mis)behavior of other applications registered to the clipboard. If the issue is reproduced on XP as well, it can be hacked by a periodic call to ChangeClipboardChain & SetClipboardViewer as described in http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/ 521183dc-7872-472e-8104-8c0d75b1bf53 rhbz #919451
2013-03-18vdservice: extract supported_system_version() to vdcommonArnon Gilboa4-24/+48
rhbz #919451 preparation
2013-03-18vdagent: on encoding only, use HBITMAP to keep the correct paletteArnon Gilboa1-1/+5
for decoding, keep using CF_DIB and CxImage.CopyToHandle() as before. Regression was due to commit da07ce (rhbz #919150) rhbz #921980
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
2013-03-16Refresh monitor config only when neededMarc-André Lureau1-1/+1
Somehow wnd_proc()->get_display() may be reentered during ChangeDisplaySettings
2013-03-12vdagent: use HBITMAP instead of DIB for image encodingArnon Gilboa1-3/+8
CxImage DIB to PNG encoding seems to ignore pallete in some scenarios. This issue happens when copying a png from FireFox, but with IE it's ok. rhbz #919150
2013-02-26vdservice: reset vdagent stop event after waitArnon Gilboa1-0/+1
vdagent terminates when the global event is set by vdservice. vdservice is also responsible to reset the event in any case, without trusting vdagent to do so. Otherwise, it may terminate the following vdagent instance immediately as well. Regression was due to commit 2d03cc. rhbz #868254
2013-02-15spec: Automatically substitute versionChristophe Fergeau2-3/+2
This commit generates a .spec file with the right version number when configure is run.
2013-02-15spec: Add missing call to %mingw_debug_packagesChristophe Fergeau1-0/+1
This automatically generates the needed debug packages for .debug files. Without this, the rpm build fails.
2013-01-31vdservice stops vdagent via eventArnon Gilboa3-2/+20
Terminate agent politely instead of ugly TerminateProcess(), so now VD_AGENT_CLIPBOARD_RELEASE is sent (if guest owned the clipboard), followed by cleanup. rhbz #903379
2013-01-22Add OLDMSVCRT fallback for _ftime_sChristophe Fergeau2-14/+6
Aliasing _ftime_s to _ftime when OLDMSVCRT is defined makes it possible to remove the timestamp-less implementation of LOG() while still getting a binary working on Windows XP. I've tested this with a MinGW build, hopefully this won't break VC++ builds...
2013-01-22vdlog: Get swprinft_s definition from vdcommon.hChristophe Fergeau1-4/+1
vdlog.cpp has an #ifdef check for OLDMSVC to choose between using swprintf or swprintf_s. Since vdcommon.h provides a compat #define for swprintf_s when OLDMSVC is set, it's better to use this one.
2012-12-09build-sys: remove *vdi_port* from Makefile.amArnon Gilboa1-6/+0
2012-12-09vdagent: git rm *vdi_port*Arnon Gilboa6-576/+0
2012-12-09vdagent: remove vdi_port from vcprojArnon Gilboa1-24/+0
2012-12-09vdagent: remove vdi_port, use vio_serial directlyArnon Gilboa1-130/+109
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-25vdservice: set process handle for vdagent launched on session>0Arnon Gilboa1-0/+7
The problem on XP was failing to terminate agent running on session>0, since during agent process creation, a handle was not set, so it was NULL. Therefore, the new agent created (at the session we switched to) was unable to open vitio-serial which was still used by the other running agent instance. rhbz#868254
2012-11-25vdservice: support Windows 8 & Server 2012Arnon Gilboa1-2/+2
vdagent was ok, but vdservice required adding these to the version check. Both are handled as the rest of the Win7 class. Tested on Win8x64.
2012-11-18vdagent: remove a wrong returnArnon Gilboa1-1/+0
2012-11-15Fix mingw compilationChristophe Fergeau1-7/+7
This got broken with the recent code moves from vdservice to vdagent.
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: remove pipe common defsArnon Gilboa1-31/+0
2012-11-14vdagent: use virtio-serial, remove pipe usageArnon Gilboa2-243/+256
2012-11-14vdagent: mv vdi_port files from vdserviceArnon Gilboa6-0/+0
2012-11-14vdservice: remove virtio-serial & pipe usageArnon Gilboa2-459/+36
2012-11-12rpm: Fix BuildrequiresChristophe Fergeau1-2/+12
For some reason, most of the required image decompression libraries were missing.
2012-11-12rpm: Fix typo in spec fileChristophe Fergeau1-1/+1
'mingw_package_header' was spelt 'mingw_package_hedder'
2012-10-31rpm: Allow .spec file to be used with git snapshotsChristophe Fergeau1-2/+4
git snapshots will contain the short version of the hash that was used to generate the snapshot in their version number, take that into account in the spec file.
2012-10-31build-sys: Use git-version-genChristophe Fergeau3-6/+232
This gives much better version numbers when using git snapshots.
2012-10-01rpm: Add spec file for mingw buildChristophe Fergeau1-0/+81
Fedora has all the mingw dependencies for vdagent packaged but don't want to ship mingw Windows binaries. This .spec can be used to run local mock builds of vdagent using mingw, or scratch builds on koji, ...
2012-10-01build-sys: Set version to 0.7.0 in configure.acChristophe Fergeau1-2/+2
Last tagged release was 0.6.3.
2012-10-01build-sys: Add missing file to EXTRA_DISTChristophe Fergeau1-0/+1
vdservice/resource.h was missing from generated tarballs, which later broke the build.
2012-10-01build-sys: Include spice-protocol in tarballsChristophe Fergeau2-0/+3
2012-10-01build-sys: Fix autogen.sh permissionsChristophe Fergeau1-0/+0
It needs to be executable to be useful
2012-09-16vdservice: stop service on virtio failureArnon Gilboa6-23/+27
read & write are async, and their completion is handled by handle_event(), which returns status used by service execute loop. previously an error in GetOverlappedResult caused vdservice hang. rhbz#839564
2012-09-13vdservice: retry virtio-serial read on ERROR_NO_SYSTEM_RESOURCES (1450)Arnon Gilboa1-1/+1
as recommended by MS. seems like defined behavior of the driver. rhbz#839564
2012-09-10vdservice: restart vdagent if killed manuallyArnon Gilboa1-0/+10
win7-only issue rhbz#845222
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é Lureau3-6/+7
2012-07-25Update spice-protocol to 0.12Marc-André Lureau1-0/+0
2012-06-21Add configure --enable-debugMarc-André Lureau2-1/+9
2012-06-08build-sys: statically build agentMarc-André Lureau2-3/+7
Fix build by default when using mingw (when more compiler are supported we could do case by case) Since we are statically building, strip resulting binary (we also use lto, whole-program but that doesn't seem to change much..)
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.