summaryrefslogtreecommitdiffstats
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
...
* spicec: Make loglevel configurable through the environmentHans de Goede2011-07-211-0/+7
| | | | | | | Having a loglevel variable is much more useful if we can actually change its value without a recompile. Use a SPICEC_LOG_LEVEL environment variable so we can do this from the spice xpi / activex too (by setting the environment variable before starting the browser).
* client: add missing "," in option listChristophe Fergeau2011-07-191-1/+1
| | | | | | | | | | In commit 44073d1b38e2 - client: improve WAN option description one "," was missing at the end of the line. Since the next argument was a string too, gcc silently concatenated them, and thanks to C++ polymorphic functions, the compiler didn't complain about the missing argument, so it went unnoticed. The effects are pretty bad though, since it prevents spicec from running because it thinks command line parsing fails.
* client: rename connect_unsecure to connect_to_peerUri Lublin2011-07-182-4/+15
| | | | | | | | Both connect_secure() and connect_unsecure() call connect_to_peer(). Prior to this commit spicec.log reported all connections as unsecure, as connect_secure() called connect_unsecure() to make the connection. This fixes RH bug #653545
* client: don't crash when agent is missing WAN supportChristophe Fergeau2011-07-181-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you try to connect to a linux guest with WAN options, SPICE window opens up and is blank - it then fails with vdagent timeout message. It should give a warning that this is only applicable for windows guest and still connect to guest. It all starts in RedClient::handle_init This function checks whether we have an agent or not, because if we have an agent, there will be some kind of handshake to check both sides capabilities before all the spice channels are created. When there is no agent running, the startup process goes on with SPICE_MSGC_MAIN_ATTACH_CHANNELS When there is a windows agent running, VD_AGENT_ANNOUNCE_CAPABILITIES and VD_AGENT_DISPLAY_CONFIG messages are sent to the agent, and when processing the agent answer to the VD_AGENT_DISPLAY_CONFIG message, SPICE_MSGC_MAIN_ATTACH_CHANNELS will be sent and the startup process will go on. However, when there is no agent running but --color-depth was used, handle_init won't send the SPICE_MSGC_MAIN_ATTACH_CHANNELS message but will wait for the agent handshake to proceed to its end, which won't happen, so it will timeout waiting for agent answers. Similarly, the linux agent handles VD_AGENT_ANNOUNCE_CAPABILITIES messages, but it doesn't handle VD_AGENT_DISPLAY_CONFIG messages, so we'll never reach the point where a SPICE_MSGC_MAIN_ATTACH_CHANNELS will be sent. This commit fixes this in 2 places: - unconditionnally send SPICE_MSGC_ATTACH_CHANNELS when no agent is running in handle_init - send SPICE_MSGC_MAIN_ATTACH_CHANNELS in RedClient::on_agent_announce_capabilities if the agent doesn't have the VD_AGENT_CAP_DISPLAY_CONFIG capability This fixes RH bug #712938
* client: improve WAN option descriptionChristophe Fergeau2011-07-181-2/+2
| | | | | | | | The WAN options (--color-depth and --disable-effects) need support from the guest agent to be working. Currently they are only supported on Windows. While I don't want to explicitly mention Windows in --help output, we can hint that it won't work with all guests in --help. This fixes RH bug #712941
* x11: don't return freed memory from get_clipboardChristophe Fergeau2011-07-181-2/+6
| | | | | | | | | | | | There is a double free in client/x11/platform.cpp. In get_selection(), in the exit: case with ret_val == -1 and data != NULL, *data_ret (which is returned to the caller) has already been assigned "data", so it will be pointing to freed memory when "data" is XFree'd'. Then in handle_selection_notify, get_selection_free is called on this pointer, which causes a double free. When the length of the read data = 0, set the returned value to NULL, this way subsequent free attempts will be a noop. Fixes RH bug #710461
* client: match delete[] with new[]Christophe Fergeau2011-07-181-1/+1
| | | | | vinfo in x11/platform.cpp is allocated using new[] so it needs to be freed with delete[]
* client: s/recive/receiveChristophe Fergeau2011-07-184-25/+25
|
* sndworker: add AudioVolume/AudioMute messagesMarc-André Lureau2011-06-221-0/+2
| | | | | | | | | | | | | | | | | | | These messages allow the guest to send the audio device volume to the client. It uses an arbitrary scale of 16bits, which works good enough for now. Save VolumeState in {Playback,Record}State, so that we can send the current volume on channel connection. Note about future improvements: - add exact dB support - add client to guest volume change Updated since v2: - bumped record and playback interface minor version to allow conditional compilation Updated since v1: - sync record volume on connection too
* client: fix for redundant shift+f11 RHBZ #674532Yonit Halperin2011-06-143-10/+27
| | | | | | | | | | | 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.
* client/windows: enable image randomization (ASLR) rhbz#701111Arnon Gilboa2011-05-301-2/+2
| | | | | | Enable image randomized base address, hindering some types of security attacks by making it more difficult for an attacker to predict target addresses.
* client/windows: remove slash from x64 build dirArnon Gilboa2011-05-301-4/+4
| | | | otherwise x64 is built in root if REDC_BUILD_DIR is not defined
* client/windows: remove precompiled header for common.h (fix broken windows ↵Arnon Gilboa2011-05-221-4/+4
| | | | | | | | 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
* client: fix flipped video in Linux guest on windows client, RHBZ #667689Yonit Halperin2011-05-191-3/+5
| | | | | | Video streams from Linux guests are oriented top-down, where gdi_canvas_put_image always received display context for down-top oriented bitmap. I fixed create_bitmap to consider the stream orientation.
* client/windows: undef SIZE_MAX in stdint.hArnon Gilboa2011-05-121-1/+1
| | | | eliminating redefinition warning
* client/windows: add common\ssl_verify.c/h to projectArnon Gilboa2011-05-121-2/+10
| | | | disable WarnAsError, due to c/c++ warnings
* client/windows: inc version to 0,9,0,0Arnon Gilboa2011-05-121-4/+4
|
* client/windows: init PACKAGE_VERSIONArnon Gilboa2011-05-122-3/+5
| | | | | in windows, we set PACKAGE_VERSION to the binary version since we don't have config.h as generated by linux configure
* client: fix return code when missing hostAlon Levy2011-05-121-0/+1
|
* client: make use of ssl_verify.cMarc-André Lureau2011-05-034-385/+36
| | | | | | | Fixed since v1: - don't include C code, rather use the common lib - add missing spice_openssl_verify_free() call - keep the extra-parsing of subject for error reporting
* common: add windows.h where required, make gdi_handlers staticMarc-André Lureau2011-05-031-1/+0
| | | | | This patch has not been verified with VS/brew. It should be safe hopefully. Compilation is fine with mingw32/spice-gtk.
* client: remove unused mb() macroChristophe Fergeau2011-05-031-6/+0
|
* add missing staticChristophe Fergeau2011-05-032-2/+2
|
* win32: remove obsolete preprocessor #definesChristophe Fergeau2011-05-031-4/+4
| | | | | | 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.
* s/USE_OGL/USE_OPENGLChristophe Fergeau2011-05-0317-100/+100
| | | | This is more explicit about what it does, and not much longer
* add #include <config.h> to all source filesChristophe Fergeau2011-05-0367-3/+202
| | | | | | | | 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
* autotools: correctly build canvas-related codeChristophe Fergeau2011-05-0314-15/+65
| | | | | | | | | | | | | | | | | | | | | 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.
* autotools: refactor the whole build machineryChristophe Fergeau2011-05-034-571/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* add missing "LGPLv2.1 or later" header to source filesChristophe Fergeau2011-05-0211-1/+184
|
* client: remove c++ wrappersChristophe Fergeau2011-05-0217-338/+36
| | | | | | | | 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.
* configure.ac: fix make distChristophe Fergeau2011-05-021-2/+1
|
* client: skip spaces in --host-subjectChristophe Fergeau2011-04-181-1/+8
| | | | | | | | | | | | | | | | | | 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.
* client: add --version cmdline option to spicecChristophe Fergeau2011-04-181-1/+9
| | | | This fixes freedesktop bug #33907
* client: s/reqired/required in CmdLineParserChristophe Fergeau2011-04-182-5/+5
|
* client: s/AVAILIBLE/AVAILABLE in CmdLineParserChristophe Fergeau2011-04-184-5/+5
| | | | It was mispelt in a CmdLineParser enum.
* gl: remove unused variablesChristophe Fergeau2011-04-081-6/+0
| | | | gcc 4.6 warned about these.
* gl: use correct pixman accessor for image dataChristophe Fergeau2011-04-081-1/+1
| | | | | | | | | Commit 774e5bd36f4 changed - dest->source.pixmap.x_image->data + + (uint8_t *)pixman_image_get_stride(dest->source.pixmap.pixman_image) + The correct accessor to use is pixman_image_get_data. Thanks to gcc 4.6 for warning about a "different size" int to pointer conversion.
* client: use silent generation rules in Makefile.amChristophe Fergeau2011-04-081-4/+4
| | | | | | | | The server Makefile.am rules for marshallers generation are prefixed with AM_V_SILENT to integrate nicely with automake silent rules. The same AM_V_SILENT prefix isn't used in client/Makefile.am resulting in verbose output even when automake silent mode is enabled. This commit removes this verbosity.
* spicec-x11: Work around a bug in xselHans de Goede2011-03-231-1/+3
| | | | | | | | | | | | | | | | | | | | Although ICCCM 2.2. Responsibilities of the Selection Owner: http://tronche.com/gui/x/icccm/sec-2.html#s-2.2 Clearly states (about selection notify events): The owner should set the specified selection, target, time, and property arguments to the values received in the SelectionRequest event. xsel sets the selection notify event target member to the incr atom when it is going to send the clipboard data incremental, rather then setting it to the UTF8_STRING atom (which was the target of the SelectionRequest). Work around this (esp as it is likely other programs may get this wrong too) and accept the incr atom as a valid target in a selection notify event. This fixes Alon's test with running: python -c "print list(range(1000))" | xsel -i -b on the client.
* spicec-x11: Don't crash on apps sending bad atoms as TARGETSHans de Goede2011-03-231-12/+16
| | | | | | | | | Some apps (bad xsel, bad!) send invalid Atoms in their TARGETS property, causing spicec to exit because of an XError. This patch makes spicec survive this scenario. For more info on the xsel bug, see: https://bugzilla.redhat.com/show_bug.cgi?id=690214
* opengl: fix compilationChristophe Fergeau2011-03-231-3/+0
| | | | | | When OpenGL is enabled, build fails in DisplayChannel::create_surface because Canvas *canvas is declared twice. Remove the first declaration to fix compilation.
* client/smartcard: use proper include delemitersAlon Levy2011-03-221-4/+4
|
* client: Don't handle hotkeys while sticky alt is activeHans de Goede2011-03-111-4/+6
| | | | | | | | | | | | | | | | | 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.
* client/smartcard: handle the --smartcard-db optionAlon Levy2011-03-081-1/+4
|
* client/windows: cleanup vcproj based on updated libsArnon Gilboa2011-03-081-8/+8
| | | | | | | | | | | | | | | | 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.
* x11: Use _exit rather then exit on X errors (rhbz#680763)Hans de Goede2011-03-011-2/+2
| | | | | | | This avoids us trying to restore the original resolution when we're fullscreen and an X error happens. As restoring fullscreen is a bad idea then as this involves making more X calls, which can get us stuck (in side an XLockDisplay call for example).
* client: exit nicely for --controller with no SPICE_XPI_SOCKET (rhbz#644292)Uri Lublin2011-03-011-0/+1
| | | | | When starting spicec with --controller, SPICE_XPI_SOCKET environment variable must be defined so spicec and the controller can be connected.
* Fix keyb modifiers not syncing from client to client os (rhbz#679467)Hans de Goede2011-03-011-0/+2
|
* client/windows: use SPICE_PROTOCOL_DIR in project include dirsArnon Gilboa2011-02-131-4/+4
| | | | | | | | | 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.
* Drop static_title.bmp from windows/Makefile.amHans de Goede2011-02-111-1/+0
|