Commit Graph

107 Commits

Author SHA1 Message Date
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
Hans de Goede
7b84db7a74 spicec: Move setting of clipboard_owner to guest to platform code
Atleast under x11 there is a race condition when setting the clipboard
owner to guest from the RedClient code rather then doing it in Platform.

After the XSetSelectionOwner() in Platform::on_clipboard_grab(), which runs
from the main message loop thread, the x11 event thread can receive a
SelectionRequest event from another x11 app, before the RedClient code
has set the clipboard owner, which will trigger the owner != guest
check in the SelectionRequest event handling code.

By moving the setting of the owner in to Platform::on_clipboard_grab() it
gets protected by the clipboard lock, which closes this tiny race.
2010-10-06 19:17:08 +02:00
Hans de Goede
aabca2864d spicec-x11: Force processing of ownerchange event when releasing the cb
Make sure we process the XFixesSetSelectionOwnerNotify event caused by
us setting the clipboard owner to none, directly after setting the owner
to none. Otherwise we may end up changing the clipboard owner to none, after
it has already been re-owned because the XFixesSetSelectionOwnerNotify event
to owner none is event is still pending when we set the new owner, and
then changes the owner back to none once processed messing up our clipboard
ownership state tracking.

I saw this happening when doing copy twice in succession inside the guest.
2010-10-04 11:49:14 +02:00
Hans de Goede
8a160078d0 Keep track of clipboard ownership
Given that all clipboard handling is async, it is possible to for
example receive a request for clipboard data from the agent
while the client no longer owns the clipboard (ie a
VD_AGENT_CLIPBOARD_RELEASE message is in transit to the agent).

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.
2010-10-02 16:29:36 +02:00
Hans de Goede
deb849dfd5 Rename platform clipboard handling functions
Rename the 4 platform clipboard functions which get called
upon receival of an agent clipboard message to on_clipboard_*

The old set_clipboard_* names were confusing as they suggest being
a class property setter (like set_event_listener) rather then
event handler, and set_clipboard_owner was causing a name conflict
with the next patch in this series.
2010-10-02 15:32:48 +02:00
Hans de Goede
a2d645ffe3 Change VD_AGENT_CLIPBOARD_GRAB to an array of types
A clipboard owner can indicate that it can supply the data the clipboard
owns in multiple formats, so make the data passed with a
VD_AGENT_CLIPBOARD_GRAB message an array of types rather then a single
type.
2010-10-01 20:01:47 +02:00
Arnon Gilboa
c909198eca client: support clipboard/selection-owner model (v2)
-includes most of Hans' review fixes (up to the SelectionRequest comment [4]) & X11 wips sent by Hans (10x!)
-use the VD_AGENT_CLIPBOARD_* types in the platform code
-add ifs for VD_AGENT_CAP_CLIPBOARD_BY_DEMAND in both sides
-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)
-set client as clipboard listener instead of application
-add atexit(cleanup) in win platform

linux:
-instead of clipboard atom selection instead of XA_PRIMARY
-enable USE_XRANDR_1_2 and support clipboard in MultyMonScreen
-send utf8 with no null termination, remove ++size
-add xfixes in configure.ac & Makefile.am

windows:
-bonus: support image cut & paste, currently only on windows

not done yet:
-clipboards formats are still uint32_t, not mime types stores as strings
-platform_win is still used, not the root window
-not replaced the ugly windows CF_DIB in agent/winclient
2010-10-01 16:06:10 +02:00
Arnon Gilboa
ce03f5449d client: add clipboard support
* windows - untested
 * linux - small strings both ways, large implemented differently:
  * client to guest - support INCR
  * guest to client - we supply a single possibly very large property
 * requires server changes in next patch to work with spice-vmc
2010-07-19 10:30:19 +03:00
Alon Levy
4f8545ed62 fix typo DisplayModeListner -> DisplayModeListener 2010-07-19 10:28:06 +03:00
Alexander Larsson
9d8a76fcd0 Disable tunnel by default on windows 2010-07-08 22:25:32 +02:00
Alexander Larsson
ceff16cad6 Make distcheck work 2010-07-08 20:20:35 +02:00
Alon Levy
0e16cadc70 Make CEGUI optional
This makes the CEGUI dependency optional and off by default. Restoring
previous behaviour of exiting on disconnect if disabled.
2010-07-01 13:48:58 +02:00
Yonit Halperin
59152e31f0 client: add --include "common.h" for generated marshallers 2010-06-29 13:59:46 +02:00
Alexander Larsson
7e26ff3c26 Replace log4cpp with custom log function
Also prints a simpler error to stderr for WARN or above so that
we print something on the commandline if something go wrong.
2010-06-28 21:54:53 +02:00
Alexander Larsson
dc8625c7e1 Make pointers 32bit in new protocol format 2010-06-23 16:33:07 +02:00