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>
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.
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.
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.
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>
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>
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>
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>
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>
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>
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
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>
This is an update to fix build issues with spice-protocol.git.
generated_server_demarshallers.c: In function
‘parse_msgc_display_gl_draw_done’:
generated_server_demarshallers.c:767:23: error:
‘SpiceMsgcDisplayGlDrawDone’ undeclared (first use in this function)
mem_size = sizeof(SpiceMsgcDisplayGlDrawDone);
...
Also needed for upcoming gl-scanout messages.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
When using multiple monitors moving mouse between monitors releases
keyboard grab.
Reproduce bug
-Open multiple monitors remote-viewer session
-Click on one of the monitors to get focus & keyboard-grab
-Move mouse to another monitor and try keyboard command (do not click)
At this point all keyboard commands are being executed on the client
machine instead of the remote machine
I added keyboard_has_focus and mouse_has_pointer variables at the
session and now these properties are being tested for the session
instead for the current widget (works also when using alt-tab).
Resolves: rhbz#1275231
Acked-by: Pavel Grunt <pgrunt@redhat.com>
spice_marshaller_flush must be called before writing a message to
calculate pointer offsets.
This is only an issue when ptr submarshallers are used, which currently
is only used by Tunnel::service_add. Since this is disabled by default,
this buug is not going to be hit by the current codebase.
e0c2182937 dropped some #include from channel-smartcard.c and spicy.c as
they were redundant with the headers already included from
spice-common/common/messages.h. While this is true for the newer
libcacard.h header, we need to include more headers to support older
libcacard, or compilation breaks.
gst_init() will terminate the program in case of a failure so it's
better to use gst_init_check() so we can recover from errors.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Their absence should not be reported as an error since they are not
needed for the build, but the developer will need them to test the code
so it's appropriate to warn him.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Rather than GStreamer/PulseAudio backend being mutually exclusive at
compile-time, this commit allows to enable both at the same time.
PulseAudio will then be favoured, with a fallback to GStreamer if it's
not available.
Note that --with-audio is kept for backward compatibility.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>