Commit Graph

118 Commits

Author SHA1 Message Date
Arnon Gilboa
5f1e7630ae vdagent: remove pipe common defs 2012-11-14 10:50:51 +02:00
Arnon Gilboa
22d25256fd vdagent: use virtio-serial, remove pipe usage 2012-11-14 10:50:51 +02:00
Arnon Gilboa
3f7d4da4bc vdagent: mv vdi_port files from vdservice 2012-11-14 10:50:50 +02:00
Arnon Gilboa
9f44263959 vdservice: remove virtio-serial & pipe usage 2012-11-14 10:50:50 +02:00
Christophe Fergeau
b264830f93 rpm: Fix Buildrequires
For some reason, most of the required image decompression libraries
were missing.
2012-11-12 13:24:23 +01:00
Christophe Fergeau
075e6ddc07 rpm: Fix typo in spec file
'mingw_package_header' was spelt 'mingw_package_hedder'
2012-11-12 13:24:23 +01:00
Christophe Fergeau
4fe15524b4 rpm: Allow .spec file to be used with git snapshots
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-31 10:11:52 +01:00
Christophe Fergeau
23c87a26b1 build-sys: Use git-version-gen
This gives much better version numbers when using git snapshots.
2012-10-31 10:11:47 +01:00
Christophe Fergeau
f485c77727 rpm: Add spec file for mingw build
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-01 19:20:49 +02:00
Christophe Fergeau
57637a2009 build-sys: Set version to 0.7.0 in configure.ac
Last tagged release was 0.6.3.
2012-10-01 19:20:38 +02:00
Christophe Fergeau
301f697de0 build-sys: Add missing file to EXTRA_DIST
vdservice/resource.h was missing from generated tarballs, which
later broke the build.
2012-10-01 19:20:33 +02:00
Christophe Fergeau
5cde9acb53 build-sys: Include spice-protocol in tarballs 2012-10-01 19:20:28 +02:00
Christophe Fergeau
6c16b9d63f build-sys: Fix autogen.sh permissions
It needs to be executable to be useful
2012-10-01 19:20:22 +02:00
Arnon Gilboa
4929cb36f2 vdservice: stop service on virtio failure
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-16 11:48:09 +03:00
Arnon Gilboa
1f56b3812f vdservice: retry virtio-serial read on ERROR_NO_SYSTEM_RESOURCES (1450)
as recommended by MS. seems like defined behavior of the driver.

rhbz#839564
2012-09-13 17:23:02 +03:00
Arnon Gilboa
18f70a3376 vdservice: restart vdagent if killed manually
win7-only issue

rhbz#845222
2012-09-10 10:59:14 +03:00
Arnon Gilboa
900ef2b4db vdagent: don't stop due to UIPI blocking
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-10 10:17:23 +03:00
Arnon Gilboa
4e95b73ecf vdagent: add message_queue for messages written to pipe
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-09-10 09:48:46 +03:00
Marc-André Lureau
04a28a35ed Fix remaining warnings 2012-07-25 11:27:22 +02:00
Marc-André Lureau
eb29cb7c61 Update spice-protocol to 0.12 2012-07-25 10:46:52 +02:00
Marc-André Lureau
0bb7ed9363 Add configure --enable-debug 2012-06-21 11:31:45 +02:00
Marc-André Lureau
a095f4806e build-sys: statically build agent
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-06-08 13:13:23 +02:00
Marc-André Lureau
0cef8ba42b vdagent: reset clipboard event
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-25 20:21:54 +02:00
Marc-André Lureau
7d75ac51cc build-sys: move back vdservice to console
So we can use it from command line properly..
Sigh.. I wish they wouldn't make this useless distinction..
2012-05-24 19:04:13 +02:00
Marc-André Lureau
cee350027f mingw: fix broken build
Add missing declaration left-over.
2012-05-24 19:03:48 +02:00
Marc-André Lureau
b4e9afc721 desktop_layout: fix incorrect total_width/height
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-24 13:55:31 +02:00
Marc-André Lureau
3d45018086 Resize to arbitrary resolution
Use QXL_ESCAPE_SET_CUSTOM_DISPLAY to update custom mode,
and switch to it.
2012-05-24 13:55:31 +02:00
Marc-André Lureau
f2c2a136e2 Use spice-protocol submodule 2012-05-24 13:55:31 +02:00
Marc-André Lureau
2ab4fb7832 Allow running as a normal process again
The service code should be commented out if DEBUG_VDSERVICE.
Otherwise it fails to run as a standalone process.
2012-05-24 13:55:31 +02:00
Marc-André Lureau
1aa23d698a mingw: compile a non-console binary
Otherwise, a console dialog pops up
2012-05-24 13:55:31 +02:00
Marc-André Lureau
0c1658b1c2 mingw: link with RC file to provide needed version information 2012-05-24 13:55:31 +02:00
Marc-André Lureau
60e850c6e4 mingw: don't use *_s msvcrt variants
Apparently, it comes with a recent version of C library (msvcrt90?),
but I don't know if we can/should ship also a MS dll. Probably it used
to work with an inlined version with VS headers.

The build can be tweaked to use the -non-_s variant with -DOLDMSVCRT
CFLAGS.
2012-05-24 13:55:31 +02:00
Marc-André Lureau
55cf72c2a8 Revert "Revert "mingw: make sure unicode support is enabled""
This reverts commit dec8f9d049.
2012-05-24 13:55:31 +02:00
Marc-André Lureau
b4b7105c57 mingw: add standard main() entry function
Thanks Paolo for the suggestion:
http://lists.freedesktop.org/archives/spice-devel/2012-May/009291.html
2012-05-24 13:53:43 +02:00
Marc-André Lureau
1a7ad7ab1f build-sys: fix autoreconf -vfi 2012-05-10 23:43:39 +02:00
Christophe Fergeau
74af857e8e Revert "mingw: remove tMain use"
This patch wasn't sent for review, and wasn't meant to be pushed
as part of the mingw series

This reverts commit 63541ea6ac.
2012-03-01 16:58:18 +01:00
Christophe Fergeau
dec8f9d049 Revert "mingw: make sure unicode support is enabled"
This patch wasn't sent for review, and wasn't meant to be pushed
as part of the mingw series

This reverts commit 04e53efb31.
2012-03-01 16:57:36 +01:00
Christophe Fergeau
6670fc556a Fix spacing in VDAgent initialization list
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-01 14:32:39 +01:00
Christophe Fergeau
63541ea6ac mingw: remove tMain use
mingw does not support it.
2012-03-01 12:59:05 +01:00
Christophe Fergeau
04e53efb31 mingw: make sure unicode support is enabled
UNICODE and _UNICODE must be defined before including any mingw
header for proper unicode support.
2012-03-01 12:59:05 +01:00
Christophe Fergeau
8da556a6c1 mingw: add Visual C++ files to EXTRA_DIST 2012-03-01 12:59:05 +01:00
Christophe Fergeau
84628d5475 mingw: workaround _ftime_s bug
mingw has a _ftime_s prototype in its headers, but no corresponding
symbol available at link time. Workaround this issue for now by
 #defining it to _ftime. This is untested on win64 where the workaround
may not be needed.
2012-03-01 12:59:05 +01:00
Christophe Fergeau
025d0bd580 mingw: add autotools build system
This makes building with mingw much more convenient.
2012-03-01 12:59:05 +01:00
Christophe Fergeau
afade2bc00 mingw: fix format string for wchar_t
%ls (or %S) must be used to printf a wchar_t *
2012-03-01 12:59:05 +01:00
Christophe Fergeau
b1e2f1a8ed mingw: fix another signed/unsigned warning
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-01 12:59:05 +01:00
Christophe Fergeau
97777a13a3 mingw: use const char * in DisplaySetting()
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-01 12:59:05 +01:00
Christophe Fergeau
c006de51f6 mingw: don't redefine CTL_CODE if it's already defined 2012-03-01 12:59:05 +01:00
Christophe Fergeau
ff0a9e72b3 mingw: workaround ximage.h #defining min/max
This confuses the deque implementation of gcc which uses std::min
std::max and causes compile failure.
2012-03-01 12:59:05 +01:00
Christophe Fergeau
22dffb81ad mingw: fix signed/unsigned comparison warning
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-01 12:59:05 +01:00
Christophe Fergeau
92583e91d4 mingw: workaround "use of unitialized var" warning
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-01 12:59:05 +01:00