Commit Graph

1901 Commits

Author SHA1 Message Date
Fabiano Fidêncio
ef02f447e5 win-usb-driver-install: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:53 +01:00
Fabiano Fidêncio
9d20a84b3c vmcstream: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:49 +01:00
Fabiano Fidêncio
379aac1dc7 usb-device-manager: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:44 +01:00
Fabiano Fidêncio
79ed45373f usb-acl-helper: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:40 +01:00
Fabiano Fidêncio
fe44cc70ed spice-pulse: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:37 +01:00
Fabiano Fidêncio
f8e4ec428a spice-gstaudio: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:33 +01:00
Fabiano Fidêncio
9c7a6df606 spice-channel: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:29 +01:00
Fabiano Fidêncio
0ec8c08da9 smartcard-manager: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:25 +01:00
Fabiano Fidêncio
f0866e141e channel-usbredir: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:21 +01:00
Fabiano Fidêncio
3b130da8fc channel-port: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:16 +01:00
Fabiano Fidêncio
a172e8f115 channel-main: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:47:11 +01:00
Fabiano Fidêncio
8693e7d3f7 channel-base: Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.
For using the new GTask API, let's bump GIO (part of GLib) dependency
version to 2.36, which is safe based on major distro support:
- Debian Jessie: glib-2.42
- RHEL-7.1: glib-2.40
- SLES12: glib-2.38
- Ubuntu LTS 14.04: glib-2.40

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-14 22:46:30 +01:00
Marc-André Lureau
6d8ca210d8 gtk: add GtkGLArea
GtkGLArea is the proper modern way to have opengl in an gtk+
application. Unfortunately, it may use various backends and interfaces
to initialize it, but dmabuf image sharing requires egl atm.

This patch keeps using our egl setup on X11, while it uses gtkglarea on
known gdk backend based on egl, such as the wayland one. This brings
wayland support for local gl to spice-gtk.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 13:48:48 +01:00
Marc-André Lureau
2cb74f4ac1 gtk: use GtkStack
Move the GtkDrawingArea in a GtkStack, so other widgets can be switched
to for the display: the next patch adds a GtkGLArea for an opengl
rendering. One can imagine other display widgets to show text etc..

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 13:48:47 +01:00
Marc-André Lureau
c73950df1f gtk: require gtk+ 3.16
3.16 is the minimal version for GtkGLArea widget, used in following
patches.

Drop conditional epoxy support, as it is now required by gtk+.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 13:48:45 +01:00
Marc-André Lureau
70a00b8fcc gtk: drop deprecated stuff from spice-gtk
Breaking ABI is a good time to remove deprecated code.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:53 +01:00
Marc-André Lureau
0917002c48 Drop GTK+ 2.0
Not so many systems require gtk+ 2.0 these days, let's move on.

This drops the old python bindings (non-gir based), and the
unsteady/experimental gtk2-only XShm support.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:52 +01:00
Marc-André Lureau
693cef4eaa gtk: make SpiceGrabSequence private
Do not leak internals of SpiceGrabSequence in public headers. This makes also
the class final, which let us extend more easily without fear of breaking ABI.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:50 +01:00
Marc-André Lureau
bc3d12efb2 gtk: make SpiceUsbDeviceWidget private
Do not leak internals of SpiceUsbDeviceWidget in public headers. This makes also
the class final, which let us extend more easily without fear of breaking ABI.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:49 +01:00
Marc-André Lureau
8d1da627fb gtk: make SpiceGtkSession private
Do not leak internals of SpiceGtkSession in our headers. This makes also
the class final, which let us extend more easily without fear of
breaking ABI.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:47 +01:00
Marc-André Lureau
0e70894bff gtk: make SpiceDisplay private
Do not leak internals of SpiceDisplay in our headers. This makes also
the class final, which let us extend more easily without fear of
breaking ABI.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:46 +01:00
Marc-André Lureau
cbfc0e9e3f build-sys: bump spice-gtk current version info
The following patches need to break the ABI (in particular the parent of the
SpiceDisplay widget).

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:44 +01:00
Marc-André Lureau
0a1f9bfd29 build-sys: fix make check when polkit not available
acl-helper needs polkit (and unix atm) to build.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-03-11 20:02:46 +01:00
Marc-André Lureau
1aeb0e0509 doc: add a bunch of Since: 0.31
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-03-11 19:17:20 +01:00
Marc-André Lureau
0072e8abe1 Prepare for v0.31 release
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-11 19:04:46 +01:00
Marc-André Lureau
8796b264a7 logging: use more idiomatic spice-gtk logging
spice-gtk uses SPICE_DEBUG for debug lines (for now), and prefer direct
glib glog/g_warning.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-03-11 19:04:46 +01:00
Marc-André Lureau
0c9dfb7197 session: use debug message for optional key value
This fixes make check failing because of recent spice-common logging
switch to glib.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-03-11 19:04:24 +01:00
Jonathon Jongsma
3095455205 Update POTFILES.skip
spicy.desktop.in no longer exists.
2016-03-11 10:49:24 -06:00
Jonathon Jongsma
c1683c3463 Add tests for usb-acl-helper 2016-03-11 10:41:38 -06:00
Jonathon Jongsma
17b00a13f2 usb-acl-helper: add env var for specifying acl helper binary
Setting SPICE_USB_ACL_BINARY allows us to execute a custom mock acl
helper binary for testing purposes.
2016-03-11 10:40:40 -06:00
Jonathon Jongsma
6eb8d0a335 Rename spice_usb_acl_helper_open_acl() to _open_acl_async()
Follow established practice and make the function's behavior more
explicit.
2016-03-11 09:52:47 -06:00
Jonathon Jongsma
da1b2ad771 Remove spice_usb_acl_helper_close_acl()
This function is now only called after the open_acl() task completes,
and in that scenario it basically does the same thing that the
SpiceUsbAclHelper destructor does, so it's pointless. Remove it.
2016-03-11 09:52:47 -06:00
Jonathon Jongsma
9c8f8982c1 usb-acl-helper: Avoid deadlock when cancelled
cancelled_cb() (which is triggered when the GCancellable's "cancelled"
signal is emitted) called spice_usb_acl_helper_close_acl(), which calls
spice_usb_acl_helper_cleanup(), which in turn calls
g_cancellable_disconnect(). Calling g_cancellable_disconnect() from
within a "cancelled" handler results in a dealock, as mentioned in the
documentation. Instead of closing the acl here, simply cancel the task
here. The cleanup() call will happen when the SpiceUsbAclHelper object
is destroyed.
2016-03-11 09:52:46 -06:00
Jonathon Jongsma
3e5004dd57 Introduce spice_usb_acl_helper_cancel()
This function explicitly cancels a open_acl() task. It is similar to
close_acl(), but its behavior is more explicit. This function is very
similar to the existing close_acl() function but it requires that the
task has not already been completed. Also, although it releases its
reference on priv->result to avoid circular references, it doesn't call
cleanup(), preferring instead to wait for the destructor to clean up.
This makes the close_acl() function essentially pointless and will be
removed in the following commit.
2016-03-11 09:52:46 -06:00
Marc-André Lureau
cc8adb63ee Update spice-common submodule
Pick codegen build fix

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-10 17:05:24 +01:00
Francois Gouget
27410ce1c1 spice-gtk: Fix the signedness of a couple of mm-time traces
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Marc-André Lureau <mlureau@redhat.com>
2016-02-23 16:29:23 +01:00
Ignacio Casal Quinteiro
6a7393e6e6 namedpipelistener: do not leak the error message 2016-02-23 09:05:46 +01:00
Christophe Fergeau
f84ae99f82 Simplify spice_usb_device_manager_device_to_libdev()
The Windows-specific version duplicates some code from
spice_usb_device_equal_libdev(), this commit
switches to using that helper instead.
2016-02-18 08:39:07 +01:00
Christophe Fergeau
7c85f88f26 Simplify spice_usb_device_equal_libdev()
The Windows-specific version duplicates some code from
spice_usb_device_manager_libdev_match(), this commit
switches to using that helper instead.
2016-02-18 08:38:49 +01:00
Marc-André Lureau
f81ffa25ae gtk: add spice-widget GL scanout support
Hook to spice-glib events to show the GL scanout.

The opengl context is created with egl, and is currently
x11-only (supporting wayland with bare-egl doesn't seem trivial).

Using GtkGLArea is left for a future series, since SpiceDisplay widget
is a GtkDrawingArea and can't be replaced without breaking
ABI. Furthermore, GtkGLArea won't work on non-egl contexts, so this
approach is necessary on gtk+ < 3.16 or X11 (because gdk/x11 uses glx).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-02-16 14:22:24 +01:00
Marc-André Lureau
1e4c78e304 glib: add local GL scanout support
Add spice-glib support for gl scanout messages.

A note about SpiceGlScanout: it is struct with scanout details,
registered as a boxed type, with associated gl-scanout property. That
way, it doesn't need a seperate signal for change notification and the
current scanout can be retrieve with gobject getter. Since boxed
property are always duplicated by g_object_get(), an additional
spice_display_get_gl_scanout() method returns the current scanout
without duplication (that's what spice-gtk display widget will use).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-13 11:28:26 +01:00
Marc-André Lureau
983eed1073 build-sys: check for epoxy-egl support
The following code requires epoxy with egl support. Check for pkg-config
and egl headers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-13 11:28:24 +01:00
Marc-André Lureau
1877229a43 Add spice_channel_unix_read_fd()
Utility function used in the messages with socket ancillary fd.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-13 11:28:23 +01:00
Marc-André Lureau
c3b52e0f95 build-sys: bump to spice-protocol 0.12.11
Needed for GL messages

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-02-13 11:28:22 +01:00
Fabiano Fidêncio
8427871a01 typo: s/GTask/GSimpleAsyncResult
Seems that I messed up with cd0c100831
while rebasing my GTask series on top of this patch, causing a build
breakage due to non-intentional insertion of a GTask replacing a
GSimpleAsyncResult.

Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-02-12 16:05:37 +01:00
Fabiano Fidêncio
cd0c100831 Use #ifdef {HAVE,USE}_FOO instead of #if {HAVE,USE}_FOO
While "#if USE_FOO" checks for the value of the variable USE_FOO,
"#ifdef" checks whether USE_FOO is defined or not.

It means, if we had something like: #define USE_FOO 0, we would have:
 #if USE_FOO
 /* Any code in here would NOT be compiled */
 #endif

 #ifdef USE_FOO
 /* Any code in here would be compiled */
 #endif

No problem was faced on spice-gtk till now because either USE_FOO is not
defined or defined as 1, but let's try to have it standardized.

Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-02-12 10:39:17 +01:00
Marc-André Lureau
57df040cc5 gtk: replace configure-event for size-allocate
For size-allocate, it's simpler to connect to the signal rather than
override the default signal handler since there is no automatic chaining
to parent handler otherwise. Doing this removes the need to have a
window.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-02-03 20:13:34 +01:00
Fabiano Fidêncio
5166f891e5 usb-device-{manager,widget}: Add counter of free channels
As the message showed when the last usbredir channel is taken can be a
bit confusing, let's add a counter of free channels to the widget's
label.
In order to add the counter, a new property for SpiceUsbDeviceManager
was introduced ("free-channels").

Related: rhbz#1298772
2016-01-22 10:50:03 +01:00
Fabiano Fidêncio
b757d75b9b Remove GSLice usage
It's being slowly deprecated in glib
https://bugzilla.gnome.org/show_bug.cgi?id=754687
2016-01-22 10:50:00 +01:00
Victor Toso
c5bb4882f6 gstaudio: set output parameter to NULL on error
This is not really triggered in the current code but this is usually
expected in case of errors; Also, the same function on record side
already does this.

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-01-19 09:47:56 +01:00