summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* webdav: move initialization to sessionMarc-André Lureau2014-12-013-19/+30
| | | | Use session accessors to initialize the webdav server
* Rename display_channels_count/n_display_channelsMarc-André Lureau2014-12-013-8/+8
|
* session: add and use internal accessorsMarc-André Lureau2014-12-016-17/+76
| | | | | Avoid dereferencing session private data directly, and use accessors instead.
* session: set session for migration when connectingMarc-André Lureau2014-12-012-1/+3
|
* session: rename migration_copy/for_migrationMarc-André Lureau2014-12-013-3/+3
|
* smartcard: use spice_session_is_for_migration()Marc-André Lureau2014-12-011-2/+2
|
* smartcard: do not initialize manager for migration sessionMarc-André Lureau2014-12-011-8/+9
| | | | The migration session is temporary and shouldn't interact with system.
* Add spice_session_is_for_migration()Marc-André Lureau2014-12-015-0/+23
|
* session: protect internal functions against invalid argsMarc-André Lureau2014-12-011-54/+76
| | | | | | Make sure calling an internal session function returns with an error when called with a NULL pointer. This will help channel code when it is removed from session before being destructed.
* audio: move spice_audio_get() to sessionMarc-André Lureau2014-12-012-31/+34
|
* audio: add accessor to check if audio is enabledMarc-André Lureau2014-12-013-9/+19
|
* audio: Avoid bad pipelines from gst_parse_launchVictor Toso2014-12-011-6/+14
| | | | | gst_parse_launch may return not NULL even when error is set. This can lead to data loss when playing or recording audio.
* audio: new-sample callback must return GST_FLOW_OKVictor Toso2014-12-011-2/+3
|
* build-sys: simplify autogen.shMarc-André Lureau2014-12-011-2/+3
|
* build-sys: fix out-of-tree autofooMarc-André Lureau2014-12-011-4/+7
|
* Release keyboard grab using keyboard shortcutPavel Grunt2014-11-302-7/+47
| | | | | | | | | | | This commit adds the ability to release the keyboard grab when the release keys (ctrl+alt) are pressed and released. It allows to use keyboard shortcuts (eg alt+tab, alt+f4) on the client. The keyboard is grabbed again when the release keys are pressed and released or when the mouse moves. https://bugs.freedesktop.org/show_bug.cgi?id=85331
* spice-widget: check whether the widget is realized in focus_in_event()Fabiano Fidêncio2014-11-271-0/+3
| | | | | | | | | | | | | | | | | | | Returning early on focus_in_event(), when widget is not realized, avoids segfault when running on Windows using GTK3. Program received signal SIGSEGV, Segmentation fault. _gdk_windows_has_impl <window=window@entry=0x0> at gdkwindow.c:584 <gdb> bt #0 _gdk_window_has_impl (window=window@entry=0x0) at gdkwindow.c:584 #1 0x70f02821 in gdk_win32_window_get_handle (window=0x0) at gdkwindow-win32.c:3459 #2 0x00c759ef in update_display (display=0x1b18440) at spice-widget.c:1297 #3 0x00c77280 in focus_in_event (widget=0x1b18440, focus=0x1b02b68) at spice-widget.c:1462 #4 0x665727f5 in ?? () from C:\Program Files\VirtViewer (GTK3)\bin\libgtk-3-0.dll #5 0x00000000 in ?? ()
* migration: delay switch host reconnectMarc-André Lureau2014-11-242-3/+6
| | | | | | | | | | | | The following critical happens on switch-host: (remote-viewer:4617): GSpice-CRITICAL **: channel_connect: assertion 'c->sock == NULL' failed The critical happens since the main channel reset code calls set_agent_connected(), which will yield to main loop, so reconnection can't happen after calling spice_channel_disconnect(), and must wait until the channel reset completes.
* migration: don't check socket errorMarc-André Lureau2014-11-211-0/+4
| | | | | | During migration, the original socket is closed before the coroutine finishes, so it's not guaranteed that c->sock will still be set when the channel is in an error state in spice_channel_iterate().
* coroutine: reference object when signalingMarc-André Lureau2014-11-211-1/+4
| | | | | | | Before the signal is actually emitted, the channel may be released. Let's keep a reference to the object during the function time, to prevent the object from being destroyed before calling g_signal_emit() or g_object_notify() in main context.
* migration: use spice_session_abort_migration() on errorMarc-André Lureau2014-11-211-2/+2
| | | | Use a more complete method for the job
* migration: remove unnecessary referenceMarc-André Lureau2014-11-211-2/+1
|
* migration: create the migration session earlierMarc-André Lureau2014-11-211-8/+15
| | | | | | The migration session creation may fail. Instead of delaying the session creation to the main_connect() callback, do it directly from the message handler context, to report failure early to server.
* migration: improve debug logMarc-André Lureau2014-11-212-1/+4
|
* migration: remove migration cleanup from disposeMarc-André Lureau2014-11-211-15/+9
| | | | | | The spice_session_disconnect() method now calls spice_session_abort_migration(), so it is not necessary to do migration cleanups in dispose anymore
* migration: set connecting state before fd requestMarc-André Lureau2014-11-211-5/+8
| | | | | | | | | | | | | | | | | | | | | | During migration, the main channel coroutine initiating the process is waiting for connection completion of all channels. migrate_channel_event_cb() yields back to the main channel coroutine once all channels have completed connection, or it will abort migration for unexpected channel events, such as SPICE_CHANNEL_CLOSED If the migration is cancelled before connection completes, but the channels state are still in the SPICE_CHANNEL_STATE_UNCONNECTED state, no events will be emitted in channel_disconnect(), and the source session main channel will remain frozen waiting for migration completion or failure. Currently, for client-fd channels, the channel state remains UNCONNECTED until the fd is provided. But if cancellation occurs, no channel events are emitted and the source session is stuck. Before requesting the fd, set the channel state to connecting, so it will emit an error if disconnect happens, and it will finish cancelling the migration in source session main channel.
* migration: fail with client provided fdMarc-André Lureau2014-11-213-5/+18
| | | | | | | Currently the fd request is done on the migration session, which is not connected with the client session, so the client has no way to provide fd for the migration. And the original and migration session ends up stuck. Failing early seems the best for now.
* migration: set session migration during connectMarc-André Lureau2014-11-213-14/+13
| | | | | Track the migration session earlier, so that disconnecting before migration finished will abort and release it.
* migration: add "connecting" stateMarc-André Lureau2014-11-212-0/+3
| | | | | Add a new migration state to track early migration step, when migration session is connecting to destination
* migration: abort migrate on disconnectMarc-André Lureau2014-11-211-0/+5
| | | | | If the session has an ongoing migration, but it is disconnected, abort it.
* migration: add a few more pre-conditions in migration codeMarc-André Lureau2014-11-212-0/+5
| | | | | Those preconditions help to figure out several issues related to migration.
* usb: stop processing usb events on errorMarc-André Lureau2014-11-211-0/+1
| | | | | If libusb returned an error in the event loop, stop further event handling. This avoid spinning in an error loop in error cases.
* audio: use weak references to channelMarc-André Lureau2014-11-212-91/+57
| | | | | | | | | | The audio channels are currently referenced and released on channel close events. However, this event may not happen if the channel never was connected. Keeping channels alive also prevent session from finishing. By not holding the ref, the channel can go to dispose when it is no longer needed, and the session can be disposed too.
* Add missing finalize chainingMarc-André Lureau2014-11-213-0/+9
| | | | | | Finalize should chain up to the finalize method of the parent class. Trivial fix.
* Remove obsolete TODO itemMarc-André Lureau2014-11-211-1/+0
| | | | | | | Tunnel are long obsoleted (did they ever work) Remove it from TODO list. Pushed unreviewed as trivial
* usb-device: Expose libusb deviceFabiano Fidêncio2014-11-194-0/+27
| | | | | | | | | As we only can filter USB devices by their Classes and sometimes it is not enough (eg: I do not want to have Keyboard and Mouse, but I want to have Joysticks, being all of them part of HID Class), let's expose the libusb device associated to the SpiceUsbDevice, so the applications can have access to whatever information they need, directly from the libusb device, to refine their filters.
* Really fix SndCodec leaks in handle_{playback,record}_startChristophe Fergeau2014-11-192-3/+2
| | | | | | | The leak fix from commit 6729c341120f was actually not doing anything at all as it was setting c->codec to NULL before trying to free it. It was also not fixing the exact same leak in the record channel. This commit addresses these 2 issues.
* Recheck clipboard size after modifying its dataChristophe Fergeau2014-11-191-7/+23
| | | | | | | | | | | | | | SpiceGtkSession::clipboard_received_cb() starts by checking if the clipboard is empty, or if the length of its data exceeds 'max-clipboard-size'. Later in that function, the data is modified, and can be shortened (removal of trailing '\0' or of '\r' for Windows -> linux copy and paste), or enlarged (addition of '\r' for linux -> Windows c&p). This commit adds another check that the clipboard length is still valid (non-0, and not bigger than 'max-clipboard-size') after making these transformations.
* Fix empty clipboard checkChristophe Fergeau2014-11-191-4/+4
| | | | | | | | | | SpiceGtkSession::clipboard_received_cb starts by checking if the length of the X selection data is not 0. However, right after this check, if gtk_selection_data_get_length() returned -1, it decides it got an empty clipboard, sets the selection length to 0, and does not return early. This commit reworks the len == 0 / len == -1 checks to make sure we always return early when we get no data from the clipboard.
* Draw server-side pointer when the session has the grabMarc-André Lureau2014-11-042-4/+8
| | | | | | | | | | If there are several SpiceDisplay widgets, only one will have the grab, but the pointer may need to be drawn on another of the displays. We thus need to track the grab status on SpiceSession, not just per-display. This solves the following bug: https://bugs.freedesktop.org/show_bug.cgi?id=38024
* gtk-session: add pointer-grabbed propertyMarc-André Lureau2014-11-042-0/+40
| | | | Returns TRUE if the pointer is currently grabbed by this session.
* Add missing G_GNUC_INTERNALMarc-André Lureau2014-11-041-0/+1
| | | | Trivial fix
* Drop glib < 2.28 supportChristophe Fergeau2014-10-3111-327/+11
| | | | | | With el6 now shipping glib 2.28, there is no very good reason to keep support for older glib versions alive, especially as it will barely be tested.
* Add GStreamer 1.0 audio supportVictor Toso2014-10-313-6/+79
| | | | | | | | | | Based on Christophe Fergeau's patch. To enable audio with GStreamer 1.0: --with-audio=gstreamer1 There is only a few changes between those versions, worth mentioning: - audio capabilities "audio/x-raw,format=..." instead of "audio/x-raw-int,..." - appsink signal for new data changed from "new-buffer" to "new-sample"
* Always use #include "config.h"Christophe Fergeau2014-10-3030-53/+20
| | | | | | | gnulib 'make syntax-check' prohibits use of #ifdef HAVE_CONFIG_H so this commit removes it from where it's used. It also makes sure we always use the same syntax for including config.h (#include "config.h" VS #include <config.h>) as a consistent way of doing that is expected.
* Remove spice-mime.xml/spicy.desktopChristophe Fergeau2014-10-305-41/+0
| | | | | | They were never translated from .in files to actual files, and now it's clear we don't want to promote spicy as a first-class desktop application.
* Fix "can not" typo in commentChristophe Fergeau2014-10-301-1/+1
|
* Remove redundant use of constChristophe Fergeau2014-10-303-6/+6
| | | | | const guint16 const * has one extra 'const' which is removed by that commit
* Remove trailing whitespaceChristophe Fergeau2014-10-301-1/+1
|
* Remove blank lines at end of filesChristophe Fergeau2014-10-3011-16/+2
|