summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-01Sync only on focus changeclient_syncFrediano Ziglio3-5/+78
Limit the virtual keystrokes sent to the remote machine. The modifiers are synced only when the application receive or lose the focus. This reduce a lot the possible virtual keystrokes sent to the guest to synchronize the modifiers. This affect the situations where modifiers are configured differently in client and guest. When the application receive the focus the synchronization is attempted from client to guest while when the application lose focus is attempted guest to client (basically is moved following user moving). This patch is actually not complete but more an RFC: - only X11 and Windows are currently supported; - what happen with multimonitors? I don't think this patch it's causing regressions anyway; - there are some possible changes in behavior for keymap_modifiers_changed; - one possible regression is that if you are using virt-viewer and the guest is booted it's possible the boot process will switch modifiers status. Honestly I consider this more of an improvement than a regression. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-01Add can_set_keyboard_lock_modifiers functionFrediano Ziglio2-0/+15
Allows to understand if we can set client modifiers Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-01Implements set_keyboard_lock_modifiers for WindowsFrediano Ziglio4-0/+522
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-01Add os_is_64bit utility functionFrediano Ziglio2-0/+45
Allow to know if the system is 64 bit or not. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-01Avoid too much #ifdef inside set_keyboard_lock_modifiers functionsFrediano Ziglio1-3/+6
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-01Add set_keyboard_lock_modifiersFrediano Ziglio2-0/+74
Code from commit 063c1b9c0627c87eb7f5369c4a6b9776a22e5c7d. This code will be used to set local key modifiers allowing syncronization from guest to client. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-01Move code to handle modifier in a specific fileFrediano Ziglio4-60/+131
Allows to extend it in the future. This code is OS dependent and is not a good idea to keep with SpiceGtkSession. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2017-01-31Add support for VP9Frediano Ziglio3-1/+9
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31Update spice-commonVictor Toso1-0/+0
Frediano Ziglio (1): protocol: Add support for VP9 video codec Victor Toso (1): protocol: add preferred video codec message Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-01-31usb: remove disconnect_device() deprecation warningMarc-André Lureau1-10/+20
Use a static function instead of the deprecated public function. The usage of the function seems to be fine for sync case, since the device was already removed, but I added a TODO just in case someone looks at this code. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31Give a hint about spice_usb_device_manager_disconnect_device() deprecationMarc-André Lureau1-1/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31audio: fix deprecation warningMarc-André Lureau3-18/+28
Use a private function to avoid the spice_audio_new() deprecation warning. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31Revert "audio: Remove spice_audio_new() from the public header"Marc-André Lureau3-3/+6
This reverts commit c6d9fa1c4af03d9875bf503ce6eabc9e7b52acc3. There is no rush to remove a deprecated API from public headers. It's better to do that when the whole library breaks API/ABI altogether. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31pygtk: remove bindings leftoverMarc-André Lureau3-290/+0
PyGtk 2.0 got removed in 0917002c48a0a5deb615d120a0e5997eefc89fd4, remove some remaining files. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-01-24doc: Remove SpiceGtkBoxPavel Grunt1-2/+0
Removed from code in a7565265532f6abec0fd3c6d843683b58eee070a
2017-01-23keymap: Add missing keys for XF86 and X11Pavel Grunt1-4/+25
Broadway backend keymap (vncdisplaykeymap_x112xtkbd.c) was missing the "shift" variants of many keys, like: !,@,#,$,%,^,&,*,(,),... making its usage very limited. This change allow us to use it at least with the EN_US keyboard layout. Keys were taken from `xmodmap -pk`. To reproduce the issue: brodwayd GDK_BACKEND=broadway spicy firefox 127.0.0.1:8080 Also add F11/F12/102nd key to XF86 making them available in: vncdisplaykeymap_xorgxwin2xtkbd.c vncdisplaykeymap_xorgkbd2xtkbd.c Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=99407 Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-01-23Move spicy tools to its own folderVictor Toso12-55/+72
So we can have the tools and the libraries in different folders. In the src/Makefile.am I've only removed the lines related to the tools but not all lines were copied into tools/Makefile.am as we don't really need them. Other lines were adjusted to have the paths correctly; Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-01-19streaming: Fix a race condition in the GStreamer frame display queueFrancois Gouget1-2/+1
When a frame is late we schedule its display right away with g_timeout_add(0, ...). This scheduling is done in one of the GStreamer thread, and the display_frame() callback will be called from the main thread. This can result in display_frame() being called before g_timeout_add() returns. This would cause the timer_id being reset before schedule_frame() had set it so that it would then never be reset. So from that point schedule_frame() would always think a frame was being displayed and thus would not schedule any more frames resulting in a video freeze. display_frame() now takes the queues mutex before resetting timer_id eliminating the race. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-01-11ssl: Use accessors rather than direct struct accessSebastian Andrzej Siewior2-17/+100
In OpenSSL 1.1.0, the struct fields are private so we can no longer directly access them. The accessors are not available in previous OpenSSL releases, so we need to add compat helpers.
2017-01-11ssl: Rework our custom BIO typeSebastian Andrzej Siewior1-29/+28
This commit changes to an actual new BIO method rather than reusing an existing BIO method, and overriding only the fields that we need. The approach before this commit would be causing issues with OpenSSL 1.1.0 as some of the fields we access have become opaque.
2017-01-11ssl: Stop creating our own X509_LOOKUP_METHODSebastian Andrzej Siewior1-9/+4
OpenSSL 1.1.0 does not seem to provide API to do that anymore. There is no need to create a custom lookup to begin with. This method here has no callbacks implemented and is doing nothing. The way I understand it, it is used to retrieve a `lookup' object which provides a certificate store. The SSL ctx provides also such a store. Acked-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-01-09streaming: Allows protocol to have more codecsFrediano Ziglio1-2/+2
The source file contains a list of fixed codecs for streaming. This list is tested to include all codecs from spice-protocol. If spice-protocol is extended to add more codecs this file starts failing to compile due to missing codecs. This patch allow to compile supporting less codecs than the ones listed in spice-protocol. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-12-22win-usb: remove usbclerkVictor Toso6-853/+23
As we have UsbDk integration now which is well maintained upstream. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-12-19Ignore warnings about unavailable function around webdavVictor Toso2-0/+8
We do an extra check in configure to enable webdav and build everything with a PHODAV variable check. The warnings below are false positive and can be ignored while we don't bump the requirements. giopipe.c:481:5: warning: ‘g_simple_io_stream_new’ is deprecated: Not available before 2.44 [-Wdeprecated-declarations] giopipe.c:482:5: warning: ‘g_simple_io_stream_new’ is deprecated: Not available before 2.44 [-Wdeprecated-declarations] channel-webdav.c:317:5: warning: ‘g_output_stream_write_all_finish’ is deprecated: Not available before 2.44 [-Wdeprecated-declarations] channel-webdav.c:339:9: warning: ‘g_output_stream_write_all_async’ is deprecated: Not available before 2.44 [-Wdeprecated-declarations] channel-webdav.c:375:5: warning: ‘g_inet_socket_address_new_from_string’ is deprecated: Not available before 2.40 [-Wdeprecated-declarations] Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-12-09Adjust to spice_marshaller_add_ref renamePavel Grunt3-9/+9
It was renamed in the spice-common submodule Submodule update contains following changes: Francois Gouget (1): codegen: Fix compatibility with Python 2.6 Frediano Ziglio (9): Start adding protocol file documentation Start writing some documentation on protocol Extended protocol documentation More work on attribute protocol documentation Fix BNF notation in documentation Add protocol documentation for "channel" and "protocol" Define a new SPICE_VERIFY macro Detect LZ4_compress_fast_continue function marshaller: Remove deprecated replacement functions Jonathon Jongsma (1): Marshaller: rename _add_ref() to _add_by_ref() Pavel Grunt (5): codegen: Do not generate extra null check silence -Wunused-parameter spice-deps: Fix accidently deleted comment spice-deps: Make LZ4 check depending on function spice-deps: Set python version based on modules availability Victor Toso (6): build-sys: requires liblz4 129 or newer Fix gitignore with new docs folder canvas-base: use helper to get surface canvas-base: group ifdef and defined together canvas-base: remove user data from CanvasBase sw-canvas: remove unused defines Acked-by: Victor Toso <victortoso@redhat.com>
2016-12-08spicy: Disable deprecation warningsChristophe Fergeau1-0/+2
It still uses GtkUIManager and GtkAction Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Francois Gouget <fgouget@codeweavers.com>
2016-12-08build-sys: Enable deprecation warnings instead of ignoring them entirelyFrancois Gouget2-1/+3
For Spice-gtk most deprecation issues come from changes outside Spice (GLib) and thus should not be treated as errors to not break compilation for users who have newer third-party libraries. However they must be visible otherwise Spice developers will not be aware of them and thus will not fix them before breakage happens. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-12-08gtk: Temporarily ignore the keyboard/mouse grabbing deprecation warningsFrancois Gouget1-1/+26
Note that the *_IGNORE_DEPRECATIONS macros are treated as separate statements by the compiler so they need to be put in a proper code block where appropriate. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-12-02streaming: Stop streaming if frames cannot be decodedFrancois Gouget4-10/+51
Report the stream as invalid if the frames cannot be decoded. This will force the server to send regular screen updates instead. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-12-02streaming: Report invalid streams to the serverFrancois Gouget1-30/+39
The error is sent using the existing client stream report message where the dropped frame count is maxed out while the received frame count is zero. Servers that recognize it can then switch to sending regular screen updates for that area so the client is not stuck with a frozen area on the screen. This can be useful in case the client is unable to decode the stream for some reason like a bug in the GStreamer plugins, the decoder not liking odd video dimensions, etc. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-12-01channel-usbredir: Fix crash on channel-upVictor Toso1-0/+7
SpiceSession does not initialize its SpiceUsbDeviceManager object on startup that could lead to a race condition where channel-usbredir is requested to flush data while it is uninitialized. In a few places, spice_usb_device_manager_get() is called as in usb-device-widget.c and spice-gtk-session.c but not used in spicy-stats, making the tool to crash on startup if it encounters an usbredir channel. #0 in usbredirhost_write_guest_data (host=0x0) at usbredir/usbredirhost/usbredirhost.c:876 #1 in spice_usbredir_channel_up (c=0x643830) at channel-usbredir.c:821 #2 in spice_channel_up (channel=0x643830) at spice-channel.c:1238 #3 in spice_channel_recv_auth (channel=0x643830) at spice-channel.c:1225 #4 in spice_channel_coroutine (data=0x643830) at spice-channel.c:2580 #5 in coroutine_trampoline (cc=0x642ec0) at coroutine_ucontext.c:63 #6 in continuation_trampoline (i0=6565568, i1=0) at continuation.c:55 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1399838 Signed-off-by: Victor Toso <victortoso@redhat.com> Reported-by: Michael Cullen <michael@cullen-online.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-12-01channel-main: demote log level from warning to debugVictor Toso1-2/+2
The volume-async happens when agent announce its capabilities. It is common that we don't have a playback stream being played at this time and it is even harder for a record stream. If the audio back-end does not cache the last volume used or if this is the first time the application is launched, this message will be seen. Failing to get playback or record volume async on startup is very common making this warning too worrisome for users. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-16Revert "win-usb-dev: report error to g_udev_client_new()"Victor Toso3-6/+5
This reverts commit eba83a7056d4213b60466f692a03e515115b0826. This is breaking build in linux as it relies on the actual GUdevClient API. Let's simply revert and find a different way to get the error. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-11-15win-usb-dev: improve warning messageVictor Toso1-1/+1
With the actual reason for failure. This might help to identify why code might be crashing or failing. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-11-15win-usb-dev: let _finalize() do libusb_exit()Victor Toso1-3/+0
This fixes a hang in mingw-spice-gtk when the GUdevClient fails to initialize due to problems in the UsbDk installation. Before this patch, libusb_exit() was being called twice: - At g_udev_client_initable_init(), after failure with priv->ctx as argument - At g_udev_client_finalize() as g_udev_client_initable_init() failure implies the object failed to initialize and it is terminated. Here it was being called with NULL as priv->ctx was set to NULL in g_udev_client_initable_init() Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=98686 Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-15usb-device-manager: handle failures from g_udev_client_new()Victor Toso1-0/+5
As we must handle when GUdevClient creation can fail otherwise code might crash. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-15channel-usbredir: handle failure from SpiceUsbDeviceManagerVictor Toso1-1/+5
As spice_usb_device_manager_get() can be NULL Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-15win-usb-dev: report error to g_udev_client_new()Victor Toso3-4/+4
Otherwise application will not be able to know the reason for failure. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-15win-usb-dev: make usage of early returnVictor Toso1-5/+4
No need for if else here. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-14file-xfer: do not send unnecessary 0 bytes messagesVictor Toso1-0/+8
This fixes the situation when VDAgent receives 0 byte message regarding a file-transfer operation that was terminated in the previous message. This makes the VDAgent to send a STATUS_ERROR after STATUS_SUCCESS to client. Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=97227 Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-11-14usb: Allow to compile if LZ4 is disabledFrediano Ziglio1-0/+2
spice_usbredir_channel_get_spice_usb_device is used only if LZ4 is enabled so avoid to define if not used as this cause a compile error. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-11-14vncdisplaykeymap: Include missing headersPavel Grunt1-0/+4
Causing build failures on win32 .libs/vncdisplaykeymap.o: In function `vnc_display_keymap_gdk2xtkbd_table': /builddir/build/BUILD/spice-gtk-0.33.19-efbfd/build_win32/src/../../src/vncdisplaykeymap.c:198: undefined reference to `GDK_IS_WIN32_WINDOW' collect2: error: ld returned 1 exit status Regression from 9ff67a108bb76e50a2c85a5054e6521088df1800 Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-11-14Adjust include header to new location of macrosPavel Grunt1-0/+3
minor & major macros were moved to sysmacros.h usbutil.c: In function ‘spice_usbutil_get_sysfs_attribute’: usbutil.c:110:14: warning: ‘__major_from_sys_types’ is deprecated: In the GNU C Library, `major' is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use `major', include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro `major', you should #undef it after including <sys/types.h>. [-Wdeprecated-declarations] major(stat_buf.st_rdev), minor(stat_buf.st_rdev), attribute); Acked-by: Victor Toso <victortoso@redhat.com>
2016-11-10gtk-session: Fix typo in commentChristophe Fergeau1-1/+1
2016-10-31build-sys: Use spice-protocol's deprecation macrosFrancois Gouget3-5/+4
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-10-31build-sys: Remove SPICE_NO_DEPRECATEDFrancois Gouget2-10/+3
The new policy is that deprecation warnings should not be disabled globally or even per-file with SPICE_NO_DEPRECATED. Instead they should either be fixed, or ignored locally with G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-10-31audio: Remove spice_audio_new() from the public headerFrancois Gouget3-6/+3
It has been deprecated for long enough. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-10-31gdk: Ignore clipboard_get()'s deprecation warningsFrancois Gouget1-2/+6
Its implementation is modeled after gtk_dialog_run() which still uses these deprecated thread functions. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-10-31vncdisplaykeymap: Remove obsolete GTK+ 2 compatibility macrosFrancois Gouget1-26/+1
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-10-31gtk: Ignore GLib's too-new warnings where we explicitly check its versionFrancois Gouget3-0/+12
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>