Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
send_input() may not be immediately called from handle_mouse_event() on
movement. INPUT structure is generated and stored and a timer may be set
instead. If subsequent call to handle_mouse_event() occurs before timer
expires, prepared INPUT structure gets overwritten and MOUSEEVENTF_MOVE
bit is lost. Windows doesn't see updated mouse position as the result.
Make handle_mouse_event() merely store the new mouse state, and move
INPUT structure generation to send_input(). Shuffle new mouse state to
previous only after mouse events are submitted to SendInput() Windows
API function.
This patch was sent to the mailing list by an anonymous contributor
with minimal style changes.
You can easily test increasing VD_INPUT_INTERVAL_MS (like 1000).
For instance you can try in a word processor to move the cursor
clicking the mouse on different positions.
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
Clear automatically tasks items.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Limit too much manual work.
By default delete the file, unless success() is called.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
In C++ simply declaring the struct add the structure name to the global
namespace, no needs for additional typedef.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
There's no reason beside losing performances to align
that structure, is not passed as binary data.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
There's no reason to tell the package installed on the build system
used.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Currently happens using Visual Studio 2015.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Ensure std::min is declared including directly algorithm header.
Undefine possible min and max macros, some Windows headers define them.
Currently happens using Visual Studio 2015.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Not used anymore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This reverts commit 5d5a268d94c5ba32cb134bea9ce6039ec7e66f37.
Committed by mistake
|
|
Enable NX (prevent data to be executable) and ASLR (address
randomisation).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Some characters are reserved and should not be used in Windows
independently by the file system used.
This avoid to use paths in the filename which could lead to some
nasty hacks (like names like "..\hack.txt").
The return statement cause the file transfer to be aborted with
VD_AGENT_FILE_XFER_STATUS_ERROR as status.
":" is used to separate filenames from stream names and can be used
to create hidden streams. Also is used for drive separator (A:)
or device names (NUL:).
"/" and "\" are reserved for components (directory, filename, drive,
share, server) separators.
"*" and "?" are wildcards (which on Windows are supported by
different APIs too).
"<", ">", """ and "|" are reserved for shell usage.
More information on "Naming Files, Paths, and Namespaces" page at
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
This fixes also https://bugzilla.redhat.com/show_bug.cgi?id=1520393.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This allows to test BitmapCoder::from_bitmap.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
This allows to reuse the code to save a DIB to a file.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
The network expect the format of the data to match a file
format so prepending DIB data with BITMAPFILEHEADER change
the format from DIB to BMP file.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
|
|
RPM does not allow dash in version string.
Replace dashes with underscores.
This make easier to run "make dist" followed by rpmbuild.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pavelgrunt@gmail.com>
|
|
This allows git.mk to include some missing files to ignore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This sync git.mk file with https://github.com/behdad/git.mk.
New version is able to create ignore files that take into account
some files currently ignored (like vdagent/.deps directory).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This complicated macro was used as an helper for LOG macro
which expand PRINT_LINE macro twice. Now that LOG expand PRINT_LINE
only once there's no need to have this macro which make logging code
more complicated.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
VDLog::printf is called only using a VDLog pointer.
Since this class is a singleton, there can only be one instance of it,
so LOG() does not really need to deal with it, VDLog::printf can
do that instead.
This simplifies LOG macros by not having to choose between printf and
VDLog::printf.
The manual GNU __attribute__ is used as the format to use is
not the standard __printf__ format used in SPICE_GNUC_PRINTF
but you need to use the gnu_printf format. For instance the "%llu"
syntax is accepted by gnu_print format but not by __printf__ one.
MinGW C++ by default uses gnu_printf format for all formatting
functions.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
LTO option allows to have smaller executable stripping
unneeded part of code.
These options were added by a095f4806e ("build-sys: statically
build agent").
The gain of using these options currently are quite small,
from a small test:
$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 506880 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 198656 Jul 26 11:26 vdservice.exe
$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 509952 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 200192 Jul 26 11:26 vdservice.exe
Considering that there are some bug in some recent MinGW distributions
like https://bugzilla.redhat.com/show_bug.cgi?id=1475237 and
the small gain I would disable these options.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Currently to fully run checks we need Wine for both 32 and 64 bit.
Some distros (like RHEL 7) don't seem to allow installing
both 32 and 64 bit versions so turn on checks based on distro
versions.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Test various image and formats.
The idea is to decode and encode again an image and
check for differences. ImageMagick is used to create
some test image and compare results.
Wine is used to execute a test helper.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Remove CxImage linking.
Support Windows BMP format.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This will make easier to change code that handle images.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
event_type should come only with specific values but
this in theory can change in the future.
To prevent overflows (just for logging) check value size
against lookup array.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
|
|
The "z" size specifier is not supported by Visual Studio.
Cast to unsigned long and use "l" specifier as the type has
enough precision for this vector.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Instead of having to get the version information from the
executable resources get from the build configuration file.
The same version is used to build the version information
resource.
This also remove a bug in log_version where "throw" statements
were used to raise again a not existing exception on case
of failures.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
log_version() declares 2 info_buf variables, the inner one is used to
hold allocated memory, but then we free the outer one, which is NULL.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This saves some stack memory not reducing any readability.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Instead of having a long if statement with checks and assignment
split in two.
The conditions where used to compute 2 different path, this does
not help much with code readability.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
vd_printf adds __FUNCTION__
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Compiler warnings for unused static variable.
Not for constants.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
The spec file cause the generation of debuginfo packages however
the build fails as the executables are not compiled with debugging
information.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
We just need the handle of the process.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Avoid extra field that could be out of sync.
Having a valid process handle is enough.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
This is not needed so we can close it
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Uses secure version https://www.spice-space.org.
Avoid not secure and use same full name.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
Signed-off-by: kunming.xie <kunming.xie@hotmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Without this dependency mock builds fails to build.
Tried Fedora 25, Fedora 26 and Rawhide (all x86-64) and all
mock builds are failing with "cannot find -lpthread" error.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|