[Spice-devel] [PATCH vdagent v2 7/8] vdagent: Use GMainLoop

2017-09-29 Thread Jakub Janků
Replace existing main while-loop with GMainLoop. Use GIOChannel with g_io_add_watch() to manage IO from x11 connections in the main loop. udscs_connect() now internally creates GSources by calling g_io_add_watch(). This enables GMainLoop integration, clients no longer need to call udscs_client_fi

[Spice-devel] [PATCH vdagent v2 3/8] vdagent: move file xfer finalize to a function

2017-09-29 Thread Jakub Janků
From: Victor Toso This patch creates vdagent_finalize_file_xfer() to finalize and stop file xfer. Moving this code to a function removes some duplication. Signed-off-by: Victor Toso --- src/vdagent/vdagent.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff -

[Spice-devel] [PATCH vdagent v2 2/8] vdagent: move file xfer initialization to a function

2017-09-29 Thread Jakub Janků
From: Victor Toso This patch creates two functions: - xfer_get_download_directory() - vdagent_init_file_xfer() The logic should be similar as it was before this patch, taking in consideration the global variables fx_open_dir and fx_dir which are set from command line. Signed-off-by: Victor Toso

[Spice-devel] [PATCH vdagent v2 6/8] vdagent: Introduce VDAgent object

2017-09-29 Thread Jakub Janků
Related to ongoing work to use GMainLoop and GTK integration Signed-off-by: Victor Toso --- Makefile.am | 3 ++ configure.ac | 1 + src/vdagent/vdagent.c | 140 ++ src/vdagent/vdagent.h | 54 +++ 4 files chan

[Spice-devel] [PATCH vdagent v2 1/8] Bump GLib version to 2.34

2017-09-29 Thread Jakub Janků
This is required for the following GMainLoop integration, which utilizes some of the new functions/definitions, namely: [definition][GLib version] g_clear_pointer() 2.34 G_SOURCE_REMOVE 2.32 G_SOURCE_CONTINUE 2.32 g_unix_signal_add() 2.30 GLib version accross distributions: - Fedora 26 2

[Spice-devel] [PATCH vdagent v2 4/8] vdagent: Use glib's commandline parser

2017-09-29 Thread Jakub Janků
From: Victor Toso As we already depend on glib, let's remove code that glib can take care of. In this case, we don't need to handle commandline parsing ourselves. In regard the global variables: * static const char * -> static gchar * [only paths] path variables: portdev, fx_dir, vdagentd_soc

[Spice-devel] [PATCH vdagent v2 8/8] udscs: remove client support for select()

2017-09-29 Thread Jakub Janků
Drop functions: - udscs_client_fill_fds() - udscs_client_handle_fds() These became obsolete with GMainLoop integration. Move required code to udscs_server_fill_fds() and udscs_server_handle_fds(), respectively. --- src/udscs.c | 48 ++-- src/udscs.h | 16

[Spice-devel] [PATCH vdagent v2 0/8] GMainLoop integration

2017-09-29 Thread Jakub Janků
Major changes since v1: - restore original command line options behaviour (note that long names for all options had to be introduced, as it is mandatory in GOptionEntry) - rename SpiceVDAgent object to VDAgent (related function/struct/macro names have changed too) - move GIOChannel code conc

[Spice-devel] [PATCH vdagent v2 5/8] vdagent: small refactor on udscs setup function

2017-09-29 Thread Jakub Janků
From: Victor Toso This is mostly a preparatory patch to reduce the usage of globals and the GMainLoop integration. The changes target one function by: * Changing its name from client_setup() to client_setup_sync(): As it important to clarify that the function block; * Removing the 'reconnect'

Re: [Spice-devel] [PATCH spice-server v2] gl: fix client mouse mode

2017-09-29 Thread Frediano Ziglio
> > On Thu, 2017-09-07 at 15:49 +0100, Frediano Ziglio wrote: > > Since 2.8, QEMU now longer creates QXL primary surfaces when using > > GL. > > This change broke client-side mouse mode, because Spice server relies > > on > > primary surface conditions. > > > > When GL is enabled, use GL scanout