Commit Graph

68 Commits

Author SHA1 Message Date
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
12f99d327f client: skip spaces in --host-subject
This fixes fdo bug #32896:

"Subject in certificates is stored in following format (values separated by
comma and space):

grep Subject: server-cert.pem | awk -F": " '{print $2}'
O=REDHAT, CN=10.34.58.2

While spicec expects that values in host subject are separated only by comma:

spicec --host-subject "O=REDHAT,CN=10.34.58.2"
"

In this case, ignoring spaces make it much easier to directly copy and paste
the subject line from certificates.
2011-04-18 12:55:41 +02:00
Christophe Fergeau
f73ab66cb8 client: add --version cmdline option to spicec
This fixes freedesktop bug #33907
2011-04-18 12:38:47 +02:00
Christophe Fergeau
56a4a05ae7 client: s/AVAILIBLE/AVAILABLE in CmdLineParser
It was mispelt in a CmdLineParser enum.
2011-04-18 12:38:39 +02:00
Hans de Goede
9d204f8b74 client: Don't handle hotkeys while sticky alt is active
In some cases rhev-m changes the hotkey for releasing the mouse grab
to ctrl + alt. This makes it impossible to send ctrl + alt + other-key
to the guest, even when using sticky alt.

What happens is:
-press alt until sticky alt activates
-release alt (but recorded state stays pressed due to sticky alt)
-press ctrl
-hotkey code sees ctrl+alt pressed, releases mouse grab
-mouse grab release code does an unpress all -> end of sticky state.

This patch makes it possible to atleast send ctrl + alt + del (or other key)
using sticky alt. Note: even with this patch it is still a bad idea to
use ctrl + alt as hotkey combi.
2011-03-11 14:59:15 +01:00
Alon Levy
1af83642c1 client/smartcard: handle the --smartcard-db option 2011-03-08 21:18:55 +02:00
Alon Levy
645236df2b client: fix broken vs2008 build 2011-01-27 17:19:06 +02:00
Alon Levy
9394b2c50e client: --help should not need platform initialization
separate initialization into before command line parsing and after,
call later only if command line parsing succeeds (in particular, it
"fails" if --help is given).
2011-01-27 17:19:05 +02:00
Alon Levy
d3b22d86f0 client/server: add missing USE_TUNNEL
disable some code that only makes sense when USE_TUNNEL is defined
in client and server channel security level setting.
2011-01-25 17:16:27 +02:00
Alon Levy
5a2ef3b21c client/server: add missing smartchannel channel security handling
The name to channel id mapping for the smartcard channel is missing,
add it in client and server.
2011-01-25 17:16:18 +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
Hans de Goede
e47fb5d74f spicec: Add a --title cmdline option (rhbz#662452) 2010-12-16 14:54:46 +01:00
Alon Levy
0449d0520c mingw32 build: use PRIu64 instead of ll 2010-12-08 17:13:28 +02:00
Alon Levy
06749bd66b mingw32 build: fix signed/unsigned warnings as errors 2010-12-08 17:11:45 +02:00
Alon Levy
757686384f smartcard: client: add keyboard shortcuts for remove/insert virtual card 2010-12-07 13:31:31 +02:00
Alon Levy
a2afcde061 smartcard: client side (not enabled yet) 2010-12-07 13:31:31 +02:00
Hans de Goede
aa3e19bfa4 spicec: Don't show a white screen if guest resolution does not fit fullscreen
Currently when going / starting fullscreen if the guest resolution for one of
the monitors is higher then that monitor on the client can handle, we show a
white screen. Leaving the user stuck (unless they know the fullscreen key
switch combi) with a white screen when starting the client fullscreen from
the XPI.

This patch changes the client to fall back to windowed mode in this case
instead.
2010-11-25 11:23:02 +01:00
Hans de Goede
c278cfa88c spicec: Don't show gui when connection info is specified on the cmdline
Currently when compiled with the gui enabled if you specify a host to connect
to on the cmdline the gui flashes by (show_gui gets called, then the connect
handler calls hide_gui as soon as the connection is made).

This patch removes this ugly flashing by of the gui.
2010-11-09 13:03:58 +01:00
Hans de Goede
cec1d98029 spicec: Remove empty show / hide gui functions
When compiling without gui support just don't call show / hide
gui, rather then making them stubs, this makes it easier to follow what is
going on.
2010-11-09 13:03:57 +01:00
Hans de Goede
a6d76fb0fc spicec: Fix info layer sometimes not showing
Currently we are calling show_info_layer from hide_gui in application.cpp, but
there are 2 cases where this does not happen:

1) When compiled without gui support hide_gui is a complete nop, so we never
   show the info layer when compiled without gui support
2) When run with --controller we never show the gui, and hide_gui
   checks if there is a gui to hide as the first thing and if not returns
   resulting in show_info_layer not being called, and thus the info layer
   not showing when launched from the xpi

This patch fixes both by adding a call to show_info_layer from
on_visibility_start note that on_visibility_start also calls hide_gui,
so in some cases show_info_layer may be called twice, this is not a
problem as show_info_layer is protected against this.
2010-11-09 13:03:57 +01: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
Hans de Goede
df6df8e587 Make the gui use Application::hide_gui rather then hide_me
Now that Application::hide_me actually does what the name suggests
(hide the entire client, ie all client windows), the gui using it to
not show the gui layer leads to the entire client disappearing when
one presses close in the GUI or dismisses a GUI dialog. This patch makes
the GUI code call hide_gui instead of hide_me, fixing this.
2010-10-18 14:43:06 +02:00
Hans de Goede
421ddb7422 client: change monitor mode setting <-> fullscreen window mode setting order
1) Make the order when starting up in fullscreen mode the same as when
   switching from window -> fullscreen:
   First set the mode, then make the window fullscreen
2) Change the order when leaving fullscreen mode, first restore the original
   monitor mode, then make the window non fullscreen. Changing the monitor
   mode in X11 causes the window manager to re-arrange windows, and if this
   happens while compiz is busy mapping the window it gets confused and
   maps the window with a maxmimized size.
2010-10-18 10:40: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
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
Alexander Larsson
93dc13c91a client: Include config.h from common.h
config.h should be availible everywhere, so move its inclusion
to the top of common.h.
2010-09-29 13:26:21 +02:00
Alexander Larsson
a5abceccb2 Fix warning from OSX compiler
The OSX compiler warns about uninitialized variable, so we change
a bit how size is initialized.
2010-09-29 12:36:39 +02:00
Yonit Halperin
a5194d37e9 client: fix - exit on bad display-effect argument 2010-08-23 08:19:09 +03:00
Alon Levy
01c06d6eaa client: Application::get_screen: fix double SpicePoint size, second hiding the first 2010-07-29 13:22:54 +03: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
Yonit Halperin
9877e7ae84 client: command line arguments for setting windows guest monitors'
color depth and disabling some display options (helpful on WAN)
2010-07-19 09:40:11 +03:00
Alexander Larsson
633e962ac3 Make tunnel support optional in client too 2010-07-08 22:25:28 +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
Alexander Larsson
d69fd9408c client: Use ASSERT, not assert 2010-07-01 10:50:12 +02:00
Yonit Halperin
270a1e6df3 fixed unhandled destroy screen in Application:restore_screens_size 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
012bd25779 Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
Gerd Hoffmann
d9084bfb64 Revert "[debug] migration troubleshooting"
This reverts commit 08927fabe5.
2010-05-19 12:09:22 +02:00
Gerd Hoffmann
08927fabe5 [debug] migration troubleshooting 2010-05-19 11:22:07 +02:00
Alexander Larsson
ae40f270cf Remove all mentions of "cairo" from the code
The command line option is renamed from "cairo" to "sw", and
similarly all filenames and types from Cairo to Sw (and similar).
2010-05-03 12:38:02 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Yonit Halperin
88aa56045a client: handling SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST
disconnecting from the current host and connecting to the target host.
2010-04-06 14:56:46 +02:00
Yonit Halperin
457693fcfa client: add command line support for ciphers, ca file, and host certificate subject 2010-03-18 10:21:47 +01:00
Alexander Larsson
1caa4b65c5 Remove no longer needed CAIRO_CANVAS_CACH_IS_SHARED define and code 2010-02-23 22:52:06 +01:00
Alexander Larsson
98dde80ed3 Replace custom region implementation with pixman_region32_t
pixman_region32_t is an efficient well tested region implementation (its
the one used in X) that we already depend on via pixman and use in
some places. No need to have a custom region implementation.
2010-02-23 22:52:06 +01:00
Alexander Larsson
1f51697852 Rename symbols that were changed in spice-protocol
This is an automatic change using:
$ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
$ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-02-04 18:49:00 +01:00
Yaniv Kamay
8ceb531958 client: add Platform::term_printf
Platform::term_printf is a variant of printf that
on windows dynamically opens console in order to
have visible output during command line processing.
2010-01-11 19:57:29 +02:00
Yaniv Kamay
3c1ff6448d client: fix logger init mix-up 2010-01-11 19:39:54 +02:00