Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
New symbols in spice-glib, bump before release.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
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>
|
|
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>
|
|
To follow test-spice-uri and test-file-transfer standard.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Call spice_main_file_copy_finish to get result of the transfer
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
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>
|
|
Acked-by: Marc-André Lureau <mlureau@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
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
|
|
This makes clipboard_received_cb a bit shorter, and will be useful
in the next commit.
|
|
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()
|
|
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>
|
|
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.
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
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
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <mlureau@redhat.com>
|
|
This will allow internationalisation to work correctly.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <mlureau@redhat.com>
|
|
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
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>
|
|
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>
|
|
Debug should come before the g_return_if_fail() otherwise we lose
important debug data.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
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>
|
|
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>
|
|
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().
|
|
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.
|
|
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)
|
|
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>
|