Commit Graph

121 Commits

Author SHA1 Message Date
Yonit Halperin
8131249d6c client: fix for redundant shift+f11 RHBZ #674532
After shift+F11, both in Windows 7 and xp clients, WM_KEYUP events were missing for
SHIFT and F11. For F11 it was less important since unpress_all was preformed for all keys.
However, we perform sync for all the keyboard modifiers and the GetKeyboardState returns "down" for shift.
In windows7 client, we sometimes received afterwards a F11 KEYDOWN event repetition, and this caused SHIFT+F11 to be called again.
Not performing hiding of the windows while changing client resolutions, solved the problem of missing events, and I don't see any difference
in how spice looks while toggling to full screen.
Using GetAsyncKeyState, returns "UP" for shift in windows 7, and helps avoid performing shift+f11 again, if there is an F11 repetition
before we receive the KEYUP event for shift.
2011-06-14 10:15:41 +03:00
Arnon Gilboa
d1a1a1b4c7 client/windows: enable image randomization (ASLR) rhbz#701111
Enable image randomized base address, hindering some types of
security attacks by making it more difficult for an attacker
to predict target addresses.
2011-05-30 10:02:19 +03:00
Arnon Gilboa
ec56898570 client/windows: remove slash from x64 build dir
otherwise x64 is built in root if REDC_BUILD_DIR is not defined
2011-05-30 10:02:12 +03:00
Arnon Gilboa
a973e87a05 client/windows: remove precompiled header for common.h (fix broken windows debug build)
-Release currently doesn't use precompiled headers at all
-Debug is broken since common/*.c files don't include common.h
-PCH can be enabled for all but specifically-chosen c-files
2011-05-22 14:59:55 +03:00
Arnon Gilboa
8776562115 client/windows: undef SIZE_MAX in stdint.h
eliminating redefinition warning
2011-05-12 15:21:07 +03:00
Arnon Gilboa
ccddcdb82a client/windows: add common\ssl_verify.c/h to project
disable WarnAsError, due to c/c++ warnings
2011-05-12 15:13:40 +03:00
Arnon Gilboa
4ea4d4dc35 client/windows: inc version to 0,9,0,0 2011-05-12 15:13:39 +03:00
Arnon Gilboa
d3577b2772 client/windows: init PACKAGE_VERSION
in windows, we set PACKAGE_VERSION to the binary version
since we don't have config.h as generated by linux configure
2011-05-12 15:13:39 +03:00
Marc-André Lureau
27f771566d common: add windows.h where required, make gdi_handlers static
This patch has not been verified with VS/brew. It should be safe
hopefully. Compilation is fine with mingw32/spice-gtk.
2011-05-03 16:49:56 +02:00
Christophe Fergeau
4a989d6c7a win32: remove obsolete preprocessor #defines
SW_CANVAS_NO_CHUNKS isn't used anywhere but in this file.
SW_CANVAS_CACHE is now defined directly in the files where it's
needed so we no longer need it in the .vcproj file.
2011-05-03 14:44:11 +02:00
Christophe Fergeau
e0c20725c8 s/USE_OGL/USE_OPENGL
This is more explicit about what it does, and not much longer
2011-05-03 14:44:11 +02:00
Christophe Fergeau
78c1465ed3 add #include <config.h> to all source files
When using config.h, it must be the very first include in all source
files since it contains #define that may change the compilation process
(eg libc structure layout changes when it's used to enable large file
support on 32 bit x86 archs). This commit adds it at the beginning
of all .c and .cpp files
2011-05-03 14:44:10 +02:00
Christophe Fergeau
2db7212175 autotools: correctly build canvas-related code
spice client and spice server shares code from
common/{gdi,gl,sw}_canvas.[ch]. However, while most of the code is
shared, the server code wants a canvas compiled with
SW_CANVAS_IMAGE_CACHE defined while the client code wants a canvas
compiled with SW_CANVAS_CACHE.

The initial autotools refactoring didn't take that into account,
this is now fixed by this commit. After this commit, the canvas
files from common/ are no longer compiled as part of the
libspice-common.la convenience library. Instead, there are "proxy"
canvas source files in client/ and server/ which #include the
appropriate C files after defining the relevant #define for the
binary that is being built.

To prevent misuse of the canvas c files and headers in common/,
SPICE_CANVAS_INTERNAL must be set when including the canvas headers
from common/ or when building the c files from common/ otherwise
the build will error out.
2011-05-03 14:44:10 +02:00
Christophe Fergeau
2a4614ea94 autotools: refactor the whole build machinery
spice Makefile.am setup is a bit confusing, with source file
names being listed several times in different Makefile.am
(generally, once in EXTRA_DIST and another time in another
Makefile.am in _SOURCES). The client binaries are built
by client/x11/Makefile.am, which means recursing into client,
then into x11 to finally build spicec. This Makefile.am is
also referencing files from common/ and client/, which is
a bit unusual with autotools.

This patch attempts to simplify the build process to get
something more usual from an autotools point of view.
The source from common/ are compiled into a libtool convenience
library, which the server and the client links against which avoids
referencing source files from common/ when building the server and
the client. The client is built in client/Makefile.am and directly
builds files from x11/ windows/ and gui/ if needed (without
recursing in these subdirectories).

This makes the build simpler to understand, and also makes it
possible to list source files once, which avoids potential
make distcheck breakage when adding new files.

There is a regression in this patch with respect to
sw_canvas/gl_canvas/gdi_canvas. They should be built with
different preprocessor #defines resulting in different behaviour
of the canvas for the client and the server. However, this is not
currently the case, both the client and the server will use the same
code for now (which probably means one of them is broken). This will
be fixed in a subsequent commit.

make distcheck passes, but compilation on windows using the
autotools build system hasn't been tested, which means it's likely
to be broken. It shouldn't be too hard ot fix it though, just let
me know of any issues with this.
2011-05-03 14:44:10 +02:00
Christophe Fergeau
04780d6996 client: remove c++ wrappers
client/ contains several .cpp file which only #include a .c file
of the same name. This is unusual and seems to only be done to
get C++ name mangling on the symbols defined in the C file.
Now that all headers files in common/ use extern "C", these
wrappers are no longer useful.
2011-05-02 11:24:44 +02:00
Christophe Fergeau
8a3f1e8e7a configure.ac: fix make dist 2011-05-02 11:24:43 +02:00
Arnon Gilboa
1a648fb397 client/windows: cleanup vcproj based on updated libs
using updated windows libraries:
http://www.spice-space.org/download/stable/wspice-x86_08032011.zip
http://www.spice-space.org/download/stable/wspice-x64_08032011.zip

-remove IgnoreDefaultLibraryNames="MSVCRT.lib", since pixman is now compiled
using MT threading model similar to other libraries. It used to be mistakenly
compiled with MD.

-downgrade freetype lib to 2.3.11-7, which is the one used/tested with
CEGUI 0.6.2

-pthread lib patched (InterlockedCompareExchange), so x64 client will no
longer crash on SelectClipRgn, BitBlt etc.
2011-03-08 13:00:01 +02:00
Arnon Gilboa
a76fce5514 client/windows: use SPICE_PROTOCOL_DIR in project include dirs
instead of ..\..\..\spice-protocol. Relative path to another git tree is a bit
ugly, since it requires spice-protocol to be in a specific location.

SPICE_PROTOCOL_DIR should also be used in windows qxl and vdagent instead of
SPICE_COMMON_DIR, which is an old and confusing name, due to the common
directory in spice git repo.
2011-02-13 12:23:47 +02:00
Hans de Goede
81f0f04ddc Drop static_title.bmp from windows/Makefile.am 2011-02-11 15:36:43 +01:00
Alon Levy
42f83d18b5 client/windows: don't allocate console unless required 2011-01-27 17:19:07 +02:00
Hans de Goede
392ed65dda spicec: Remove spice-client watermark (rhbz#662450)
This patch stops us from drawing the spice client watermark at the top of
the virtual machine view. We have had requests through several channels to
remove this as it has little added value, and is seen as annoying by some.
Given that we now also have a bugzilla for this I think it is time we really
remove it.
2010-12-16 14:54:46 +01:00
Alon Levy
1bb1bcb9a0 mingw32 build: check for CXImage, disable if not found (only on mingw32)
v2:
 + simplify (Hans)
 + also report presence of cximage for mingw32 target
2010-12-08 17:13:52 +02:00
Alon Levy
916863202a mingw32 build: various fixes 2010-12-08 17:13:08 +02:00
Alon Levy
ff3fb423ed mingw32 build: fix two functions 2010-12-08 17:13:02 +02:00
Alon Levy
8bea5d6b5a mingw32 build: add missing switch flags (nop) 2010-12-08 17:12:56 +02:00
Alon Levy
a19080980d mingw32 build: eol fixes 2010-12-08 17:12:48 +02:00
Alon Levy
78f81ec61c mingw32 build: windows/Makefile.am: double NULL definition 2010-12-08 17:12:43 +02:00
Alon Levy
5aba28df73 mingw32 build: missing linked files for spicec.exe 2010-12-08 17:12:36 +02:00
Alon Levy
9728ea7f5c mingw32 build: remove unused, initialize uninitialized, reorder constructor initializers 2010-12-08 17:11:45 +02:00
Alon Levy
d14b720a3f mingw32 build: fix assignement as condition warning 2010-12-08 17:11:45 +02:00
Alon Levy
06749bd66b mingw32 build: fix signed/unsigned warnings as errors 2010-12-08 17:11:45 +02:00
Alon Levy
af1bfa6250 mingw32 build: fix various warnings 2010-12-08 17:11:45 +02:00
Gerd Hoffmann
f6cacd0e51 mingw32 build: fix build errors
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-08 17:11:45 +02:00
Gerd Hoffmann
71aad4d7e8 mingw32 build: add client/windows/Makefile, tweak configure
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-07 21:36:37 +02:00
Arnon Gilboa
dd31c0cbfd spicec-win: add image copy-paste support
-currently png & bmp
-using wspice libs cximage.lib & png.lib
-jpg & tiff will follow
2010-11-24 10:30:40 +02:00
Arnon Gilboa
6dbea1bda1 spicec-win: ignore MSVCRT.lib in x86 build
Same as in x64 build, for using the updated wspice-0.6.3
2010-11-08 10:39:01 +02:00
Arnon Gilboa
a0f32b620b spicec-win: add x64 to vcproj & sln (v2)
use CEGUI for x64 as well, no need for the SUPPORT_GUI hack
2010-10-25 08:35:56 +02:00
Arnon Gilboa
7966058618 spicec-win: map title string from utf8 to utf16
Fix win client broken by the utf8 patch.
2010-10-25 08:35:34 +02:00
Arnon Gilboa
3d08b908b4 spicec-win: add #ifndef _WIN64 for u/intptr_t typedefs 2010-10-24 16:33:01 +02:00
Arnon Gilboa
66d89ee04f spicec-win: Replace Set/GetWindowLong to LongPtr for x64 competability 2010-10-24 16:32:49 +02:00
Hans de Goede
4c81024ca2 Remove no longer used wstring_printf functions 2010-10-21 13:22:01 +02:00
Hans de Goede
fa2e125ec4 client: Interpret the title control message as utf8 instead of unicode16
The activex browser plugin is sending unicode16 text, where as the
xpi one is sending utf8 text. After discussing this on irc we've decided
that utf8 is what we want to use. So the client (this patch), and the
activex will be changed to expect resp. send utf8 text as the title.
2010-10-21 13:19:51 +02:00
Arnon Gilboa
4d0e6e525c spicec: add controller
Spice client controller enables external control (e.g., by XPI or ActiveX) of
the client functionality.

The controller protocol enables setting parameters (host, port, sport, pwd,
secure channels, disabled channels, title, menus, hotkeys etc.), connecting
the server, showing and hiding the client etc.

The controller is based on the cross-platform named pipe.
2010-10-18 10:17:28 +02:00
Arnon Gilboa
20c550d278 spicec: add foreign menu
Spice foreign menu enables external control of the client menu.

The foreignmenu protocol enables an external application to:
add a submenu, set its title, clear it, add/modify/remove an item etc.

Foreign menu is based on the cross-platform named pipe.
2010-10-18 10:03:46 +02:00
Arnon Gilboa
e789c8b9aa spicec-win: move named_pipe defines 2010-10-17 17:03:37 +02:00
Arnon Gilboa
b04bf7f9b0 spicec-win: fix menu id push to free_sys_menu_id 2010-10-17 17:03:33 +02:00
Arnon Gilboa
57cea3235f spice-win: handle multiple types on clipboard grab send & receive 2010-10-11 17:29:46 +02:00
Arnon Gilboa
1148edfea4 spice-win: remove clipboard_changer hack
Instead of keeping a flag, we simply check wether the new owner is us or not
2010-10-11 17:29:44 +02:00
Arnon Gilboa
f2ef521740 spice-win: handle type VD_AGENT_CLIPBOARD_NONE in Platform::on_clipboard_notify() 2010-10-11 17:29:43 +02:00
Arnon Gilboa
26814c4f9c spice-win: remove windows-specific bitmap cut & paste support
will wait until png comes in
2010-10-11 17:29:00 +02:00