summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-07spicy: fix reset of terminal when quitHEADmasterMarc-André Lureau1-3/+7
Only restore the terminal if it was actually saved. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-07usb: fix libusb_get_active_config_descriptor()Marc-André Lureau1-1/+1
I wrongly replaced "assert(!get_active_config())" with "if (!get_active_config())" in the previous commit. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-10-07Avoid compression of isochronous devicesSnir Sheriber3-0/+49
Device is considered isochronous if one of its endpoints is defined as isochronous transfer, in that case data transfer over the usbredir channel will not be compressed (it is assumed that there is a strong correlation between isochronous devices and devices which their data is usually compressed) E.g. Camera/mic device will usually be recognised as isochronous while storage devices won't Message-Id: <1475766822-26809-2-git-send-email-ssheribe@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-10-06Update NEWS for 0.33 releaseMarc-André Lureau1-0/+18
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-10-06build-sys: bump spice-glib versionMarc-André Lureau1-1/+1
New symbols in spice-glib, bump before release. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-10-06spicy: only watch stdin if testing org.spice.spicy portMarc-André Lureau1-2/+3
This fixes starting spicy with a shell in the background with &, spicy would hang in tcsetattr(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-05tests: fix -Wall -Wextra compiler warningsVictor Toso6-43/+43
With -Wall a few -Wunused-variable and -Wunused-but-set-variable; With -Wextra lots of -Wunused-parameter and a few -Wsign-compare. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-10-03tests: set binaries to have 'test' name prefixVictor Toso2-14/+14
To follow test-spice-uri and test-file-transfer standard. Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-09-14widget: Inform about transfer failurePavel Grunt1-1/+19
Call spice_main_file_copy_finish to get result of the transfer Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-09-09Remove trailing semicolonPavel Grunt2-2/+2
2016-09-07Ignore modifiers messages if no modifiers changedFrediano Ziglio1-2/+4
This avoid keep sending modifiers changes if guest is not synchronising the changes. I consider this as an improving as this avoids client to try again and again to force synchronisation however this does not prevent every unwanted keystroke insertion which possibly can be a real problem on some configurations. For instance if guest do not handle caps lock as the client do if client uses another modifiers (as num lock) this can force inserting virtual caps keypress. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Marc-André Lureau <mlureau@redhat.com>
2016-09-07spicy: fix 'tabled' typoChristophe Fergeau2-2/+2
Acked-by: Marc-André Lureau <mlureau@redhat.com>
2016-09-02clipboard: Return early if check_clipboard_size_limits() failsPavel Grunt1-5/+4
b0a2ff4 "clipboard: Add fixup_clipboard_text helper" mistakenly removed some early returns when text conversion fails for some reason. This commit readds it. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
2016-09-02util: Remove unused GError parameterPavel Grunt4-52/+16
The parameter is removed from functions: get_line spice_convert_newlines spice_unix2dos spice_dos2unix It was introduced in 75f1ea3ee9c4dbd6c5f27896caee07792bbdbba4 but never used Acked-by: Marc-André Lureau <mlureau@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-09-01Translate file transfer error messagesJonathon Jongsma2-4/+6
If we are to ever display error messages to a user in a UI, they need to be translated. Acked-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-09-01file-transfer: Add guards to public functionsPavel Grunt1-2/+8
Acked-by: Victor Toso <victortoso@redhat.com>
2016-09-01file-transfer: Add documentation for public functionsPavel Grunt2-12/+35
Acked-by: Victor Toso <victortoso@redhat.com>
2016-09-01clipboard: Use gtk_clipboard_request_text for text dataChristophe Fergeau1-15/+52
Currently, when the agent asks us for VD_AGENT_CLIPBOARD_UTF8_TEXT data, spice-gtk looks up for the first X11 target which would provide it with UTF8_TEXT data, and uses that for the clipboard request. This means we will use UTF8_STRING as the target for gtk_clipboard_request_contents(). However, some applications who can copy and paste text do not necessarily support the UTF8_STRING target. This is the case for Motif applications which support the STRING target however. It turns out gtk+ also provides a gtk_clipboard_request_text() method which will try several targets (UTF8_TEXT, COMPOUND_TEXT, TEXT), and will ensure the returned string is UTF-8, so we can use that when the agent asks us for some text data. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1348624
2016-09-01clipboard: Add fixup_clipboard_text helperChristophe Fergeau1-25/+44
This makes clipboard_received_cb a bit shorter, and will be useful in the next commit.
2016-08-31Add ability to get sizes from SpiceFileTransferTaskJonathon Jongsma6-8/+52
If a client is handling multiple SpiceFileTransferTasks at one time, it's not currently possible to provide a single overall progress to the user. The only information that the client can get is the percentage progress. This patch adds two new properties: - total-bytes: the size of the file transfer task in bytes - transferred-bytes: the number of bytes already transferred This allows a client UI to calculate the combined progress for all ongoing transfer tasks and present it to the user. Two convenience functions were added to retrieve these values: - spice_file_transfer_task_get_total_bytes() - spice_file_transfer_task_get_transferred_bytes()
2016-08-30build-sys: remove PKG_PREREQMarc-André Lureau1-2/+0
I added it to make sure AC_SUBST happened, but apparently AC_SUBST happens with very old pkg-config versions too, no need to check pkg-config pkg.m4 version. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-08-26mouse: Fix pointer grabbing in server modeChristophe Fergeau1-0/+11
Trying to click on spice-gtk window while in server mode should result in a pointer grab. This is currently failing, with the cursor wrapping to the top left corner of the window instead without being grabbed. This is caused by our use of gtk_event_box_set_above_child(), when clicking on the SpiceWidget, the grab is implicitly taken by the window which is above the event box (which is an internal GtkEventBox input-only GdkWindow). Then when we call gdk_pointer_grab() on the GtkEventBox::window, we get a grab-broken event indicating the grab was transferred from the internal input-only window to GtkEventBox::window (see gtk+ bug https://bugzilla.gnome.org/show_bug.cgi?id=769635#c2 for a detailed explanation). This commit ignores grab-broken events when the GdkWindow who got the grab corresponds to the one we called gdk_pointer_grab() on. An alternative would be to call gdk_pointer_grab() on the GdkWindow which received the button-press-event, but the call chain between button_event() and the eventual gdk_pointer_grab() call, so it would be not so elegant to pass the correct GdkWindow all the way.
2016-08-26widget: set keypress-delay to 0 on unix socketMarc-André Lureau1-1/+24
There is no strong need for keypress-delay on local connection (not verified: unless the system is heavily loaded, in which case the VM will probably be stuck too and may or not repeat the key when running). The benefit of removing keypress-delay is that games or interfaces that require "realtime" responses, such as FPS, are slightly better without the 100ms input delay. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-26widget: make set_keypress_delay a functionMarc-André Lureau1-9/+17
So the widget can call it without going through g_object_set(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-26channel: add read-only socket propertyMarc-André Lureau1-0/+23
Channel users (such as spice widget) may want to know some connection details. Instead of exposing various connection properties, we may as well just have a GSocket property, with a strong warning on usage. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-25build-sys: simplify checking for x11Marc-André Lureau1-10/+1
We no longer need the gtk+-quartz/win32 check, however we can simplify the x11 check if building gtk+-x11 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-25build-sys: require recent pkg-configMarc-André Lureau1-22/+4
So we can drop the AC_SUBST for _CFLAGS & _LIBS variable (since 0.24 but there is no clean way to check that before PKG_PREREQ in 0.29, released last year) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-22streaming: Fix the VideoDecoder queue_frame() documentationFrancois Gouget1-4/+3
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-19Add missing libX11 reference to build systemIan Stakenvicius2-0/+6
GTK on its own is not enough to ensure libX11 is properly linked with libspice-client-gtk. This patch adds X11_LIBS to SPICE_GTK_LIBADD_COMMON (and X11_CFLAGS to a relevant section as well) in src/Makefile.am, and performs an approriate pkg-config based check to determine the correct values in configure.ac when not building for win32 or quartz. For more info see http://bugs.gentoo.org/585118
2016-08-19Add Italian .po file.Frediano Ziglio2-0/+323
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Marc-André Lureau <mlureau@redhat.com>
2016-08-19Initialise gettext library properlyFrediano Ziglio10-8/+63
This will allow internationalisation to work correctly. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Marc-André Lureau <mlureau@redhat.com>
2016-08-16Do not require epoxy for WindowsPavel Grunt1-1/+3
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-16widget: Fix rendering issues with CSD on WindowsPavel Grunt1-1/+3
Replace GDK_WINDOW_HWND by gdk_win32_window_get_impl_hwnd() which gets the HWND directly, without any side effects. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1352216 Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2016-08-12streaming: Create the pipeline at the same time as the GStreamer decoderFrancois Gouget1-6/+6
This lets create_gstreamer_decoder() fail if it cannot create the pipeline it needs, allowing the caller to try fallbacks. This also means the pipeline has the same lifetime as the decoder which makes it possible to remove a check in queue_frame(). Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-12streaming: Don't crash if the stream creation failsFrancois Gouget1-0/+5
Note that this implies closing the stream before receiving any frame. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-12streaming: Don't crash if no frame was received before closing the streamFrancois Gouget1-19/+20
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-12Improve file transfer error messagesJonathon Jongsma1-2/+2
In preparation for potentially displaying error messages to a user in a UI, I thought I'd improve the messages slightly. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-12Fix docs for SpiceFileTransferTask::progressJonathon Jongsma1-3/+3
This property actually represents a fractional value from 0 to 1.0, not a percentage between 0 and 100. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-11streaming: Check the stream id in display_update_stream_report() tooFrancois Gouget1-1/+8
It's safer and more consistent than assuming the caller has done the check already. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-10vmcstream: Do not disconnect cancellable in coroutinePavel Grunt1-1/+0
It is disconnected when spice_vmc_input_stream_read_all_finish() is called. Silence many warnings appearing with webdav: GLib-GObject-WARNING **: gsignal.c:2635: instance '0x7fe658015c40' has no handler with id '13555' Acked-by: Victor Toso <victortoso@redhat.com>
2016-08-10channel-webdav: Remove extra SpiceWebdavChannel parameterPavel Grunt1-24/+19
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-08-10file-transfer: improve GHashTable with value_destroy_funcVictor Toso2-5/+1
By using g_hash_table_new_full() we can unref its value which is the SpiceFileTransferTask. This makes the code a little bit simpler as nowhere we use the xfer-task after removing it from hash table. Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-08-10file-transfer: increase reference for channel-mainVictor Toso1-4/+6
SpiceMainChannel uses the SpiceFileTransferTask reference given in the hash table provided by spice_file_transfer_task_create_tasks(). That means SpiceFileTransferTask is not holding a reference for itself but it relies on it due the async calls it provides. This patch increases the reference of each SpiceFileTransferTask for the hash table which will be unref'ed by channel-main in file_transfer_operation_task_finished(); the original reference is kept to SpiceFileTransferTask to be freed after the finish signal is emitted on spice_file_transfer_task_close_stream_cb(). This patch fixes some critical warnings as we have two g_object_unref but only one reference. Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-08-10channel-main: make debug helpful in case of failuresVictor Toso1-2/+2
Debug should come before the g_return_if_fail() otherwise we lose important debug data. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-08-10channel-main: improve code to use FileTransferOperationVictor Toso1-18/+22
Since commit b26818d0e00666 we are grouping all transferred files per operation (drag and drop); That leaded to some design flaws in the code. The changes suggested in this patch are (in execution order): * On spice_file_transfer_task_read_async() - Passing FileTransferOperation data so in the callback and in further function calls, we don't need to look for this; Note that FileTransferOperation is not freed while any of its SpiceFileTransferTask exists and by design they are never finished while on pending state, so file_xfer_read_async_cb() should have a valid FileTransferOperation pointer. * On file_xfer_read_async_cb() - Removed unnecessary variables; * On file_xfer_flush_async() - Using SpiceFileTransferTask as parameter which can retrieve the SpiceMainChannel and the GCancellable; - Using SpiceFileTransferTask as source_object for GTask with FileTransferOperation as user_data which is helpful for its callback; * On file_xfer_flush_finish() and file_xfer_data_flushed_cb() - Using SpiceFileTransferTask as parameter and source_object check for GTask Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-08-10file-transfer: Move initializations to _task_new()Victor Toso1-18/+22
This was a request introduced at f6b3b697093a16de to be done after moving the SpiceFileTransferTask code to its own file. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-08-05wocky: Pass GTask around instead of ConnectAsyncDataChristophe Fergeau1-27/+27
Now that the ConnectAsyncData we need is set as GTask data, we can pass around the GTask rather than the ConnectAsyncData instance, and remove the GTask pointer from it. We can get the ConnectAsyncData from the GTask when needed using g_task_get_task_data().
2016-08-05wocky: Set ConnectAsyncData instance as GTask dataChristophe Fergeau1-1/+2
Currently, the ConnectAsyncData instance is leaked if for example we trigger one codepath calling g_task_return_error(). If we associate it with the GTask with g_task_set_task_data(), this kind of leak will be avoided.
2016-08-05wocky: Simplify wocky_http_proxy_connect_finish()Christophe Fergeau1-3/+4
Rather than returning the whole ConnectAsyncData struct with g_task_return_pointer(), we can return only the GIOStream object as this is what we are interested in. This has the side-effect of fixing a ConnectAsyncData leak as after calling g_task_propagate_pointer() the old code had ownership of the ConnectAsyncData instance but was never freeing it. The leak is: ==20010== 4,348 (56 direct, 4,292 indirect) bytes in 1 blocks are definitely lost in loss record 20,762 of 20,999 ==20010== at 0x4C2DA60: calloc (vg_replace_malloc.c:711) ==20010== by 0xD0F6EB0: g_malloc0 (gmem.c:124) ==20010== by 0x75C0978: wocky_http_proxy_connect_async (wocky-http-proxy.c:359) ==20010== by 0xCB4E22C: g_socket_client_connected_callback (gsocketclient.c:1548) ==20010== by 0xCB57342: g_task_return_now (gtask.c:1107) ==20010== by 0xCB579E5: g_task_return (gtask.c:1165) ==20010== by 0xCB4FB1C: g_socket_connection_connect_callback (gsocketconnection.c:236) ==20010== by 0xCB47160: socket_source_dispatch (gsocket.c:3543) ==20010== by 0xD0F1702: g_main_dispatch (gmain.c:3154) ==20010== by 0xD0F1702: g_main_context_dispatch (gmain.c:3769) ==20010== by 0xD0F1AAF: g_main_context_iterate.isra.29 (gmain.c:3840) ==20010== by 0xD0F1B5B: g_main_context_iteration (gmain.c:3901) ==20010== by 0xCB7D58C: g_application_run (gapplication.c:2381) ==20010== by 0x41571C: main (remote-viewer-main.c:42)
2016-08-03spicy: Fix spice_file_transfer_task_get_filename leakChristophe Fergeau2-2/+5
It was wrongly annotated as (transfer none) An alternative would be to store what is returned by g_file_get_basename() in SpiceFileTransferTask and return that, this would allow to make spice_file_transfer_task_get_filename() (transfer none) without leaking memory. Acked-by: Victor Toso <victortoso@redhat.com>