- Jan 16, 2019
-
-
Lukáš Hrázký authored
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
-
- Jan 04, 2019
-
-
Frediano Ziglio authored
Make sure all module files include config.h Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
Remove HAVE_CONFIG_H check, it is always defined. Remove indentation of includes, now the include is not in a condition and also some were indented some not. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
We need to pass the original argument list, however argv is modified by g_option_context_parse so save a copy of the array to make it possible to restart with the same arguments. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
People can think that 32 means 32 bit while it is always a long. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
Different tools (compilers or analysers) recognise missing break in switch as possible problems. Many recognise a "fall through" comment to tell it is wanted. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Jan 03, 2019
-
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
Frediano Ziglio authored
Modify directly the new_wbuf->buf buffer instead of writing into a temporary buffer and then copy in the final one. This also fixes Coverity warning: | uninit_use_in_call: Using uninitialized value "message_header". Field | "message_header.data" is uninitialized when calling "memcpy". Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
- Dec 20, 2018
-
-
Jonathon Jongsma authored
Get the CRTC ID from the output struct rather than using the output_index as an index into the array of crtcs Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
-
- Dec 19, 2018
-
-
Victor Toso authored
In the current code, output should never be negative but the check exists after we use the variable as index. Make the check earlier. This patch also breaks the check in two in order to provide more accurate error log. Found by coverity: | check_after_sink: You might be using variable "output" before | verifying that it is >= 0. Changes in v2: - Move overflow check before accessing the arrays (Frediano) Changes in v3: - Move the whole check before accessing the arrays. - Improve commit log. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Victor Toso authored
And use well defined macros for standard file descriptors. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Dec 15, 2018
-
-
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Nov 16, 2018
-
-
Victor Toso authored
Easier to trigger on Wayland guest by running > xrandr --output XWAYLAND0 --rotate left In current master, this causes the spice-vdagentd to disconnect from the client. In 0.18 branch (latest release), mouse becomes unusable as mentioned in the referred bug below. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1641723 Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Frediano Ziglio authored
The function name is XRRGetScreenSizeRange not RRGetScreenSizeRange. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
If connection fails the socket descriptor is not closed causing a leak. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Nov 02, 2018
-
-
Jonathon Jongsma authored
The "Requisite" directive is intended to require that the virtio port device exists before starting the vdagent socket unit. If the device does not exist, the socket should fail to start. However, without using "After", the socket will still start even when the device is not present. The man page for systemd.unit (v239+) says the following about 'Requisite=': "Similar to Requires=. However, if the units listed here are not started already, they will not be started and the starting of this unit will fail immediately. Requisite= does not imply an ordering dependency, even if both units are started in the same transaction. Hence this setting should usually be combined with After=, to ensure this unit is not started before the other unit." See also https://github.com/systemd/systemd/issues/4756 for further details (particularly the following comment: https://github.com/systemd/systemd/issues/4756#issuecomment-267005324 ) Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
-
- Sep 21, 2018
-
-
Jakub Janků authored
Remove @type_to_string, @no_types arguments from udscs_connect(), udscs_create_server{,_for_fd}(). udscs is used only in vdagent.c and vdagentd.c and in both cases the args are the same (vdagentd_messages, VDAGENTD_NO_MESSAGES). Add debug_print_message_header(). Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Sep 19, 2018
-
-
Jakub Janků authored
All command line options now have long names as they are required by GLib. So the supported command line options now are: -h, --help -d, --debug -s, --virtio-serial-port-path -S, --vdagentd-socket -u, --uinput-device -f, --fake-uinput -x, --foreground -o, --one-session -X, --disable-session-integration Change the types of some global variables that hold the options: - const char * --> gchar * - int --> gboolean Define DEFAULT_UINPUT_DEVICE as "/dev/uinput", since there's already DEFAULT_VIRTIO_PORT_PATH, VDAGENTD_SOCKET. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Sep 13, 2018
-
-
It is possible that g_get_user_special_dir() return NULL for G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure thing to happen in case xdg-user-dirs hasn't been run yet. Keeping spice-vdagent to run on Initialization stage of X-GNOME-Autostart-Phase could trigger a race with xdg-user-dirs that also runs on Initialization, which is the earliest stage possible. Moving to spice-vdagent to run WindowManager stage avoids the race with xdg-user-dirs and still runs before any graphical application. Tested also moving to Desktop stage, which is 4th stage (out of 5) and worked without apparent drawbacks. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623947 Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
-
- Sep 07, 2018
-
-
Jakub Janků authored
Move code handling VDAGENTD_FILE_XFER_STATUS messages from agent_read_complete() to a separate function to make the switch statement less cluttered. Simplify the code a bit. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Move code handling VDAGENTD_GUEST_XORG_RESOLUTION messages from agent_read_complete() to a separate function to make the switch statement less cluttered. Remove unnecessary res variable. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
The functions would return -1 only if malloc() failed, otherwise 0. Since malloc() was replaced by g_malloc(), which terminates the program if the allocation fails, return void instead. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
The functions would return -1 only if malloc() failed, otherwise 0. Since malloc() was replaced by g_malloc(), which terminates the program if the allocation fails, return void instead. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Some older parts of the code currently use memory functions defined in stdlib.h and usually handle allocation errors. On the other hand, newer parts of the code and GLib/GTK+ functions themselves commonly use wrappers provided by GLib that terminate the program when there isn't enough memory. So it doesn't make much sense to check for ENOMEM somewhere, while the program can be terminated at any time elsewhere. Unify the code and use GLib wrappers only. malloc --> g_malloc, g_new calloc --> g_malloc0, g_new0 free --> g_free Use g_clear_pointer where possible for simplification. Replace subsequent alloc and memcpy calls with single g_memdup where possible. Note: this commit only partially touches src/vdagent/x11.c as the clipboard-handling code here should be removed in the future. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Required GLib version was bumped from 2.28 to 2.34 by 61fc548f. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Aug 28, 2018
-
-
Jakub Janků authored
udscs_get_peer_cred() is currently used only in vdagentd.c to obtain PID, so let's drop udscs_get_peer_cred() and add udscs_get_peer_pid() instead. Acked-by: Victor Toso <victortoso@redhat.com>
-
- Aug 14, 2018
-
-
Lukáš Hrázký authored
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Lukáš Hrázký authored
The handler is meant to ignore the X11 error, name it properly. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Jul 23, 2018
-
-
Jakub Janků authored
364b6bba introduced session_info_session_is_locked() in session-info.h, however dummy-session-info.c implemented session_is_locked() instead, causing builds with --with-session-info=none to fail. This was fixed by d66fbb9d, but it didn't remove the incorrect session_is_locked(). Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Jun 06, 2018
-
-
Victor Toso authored
Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Victor Toso authored
Including some basic building tests. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Victor Toso authored
Before this patch, the summary would have 'auto' instead of yes or no for building with gtk. Signed-off-by: Victor Toso <victortoso@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Victor Toso authored
To have a similar output to other configure options we have. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- May 30, 2018
-
-
Uri Lublin authored
Unlike virtual graphic cards, device-assigned graphic cards can have more than one crtc per output. Still we currently pick only a single crtc for each output (but looping over them to find an active one) Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Apr 10, 2018
-
-
Jakub Janků authored
Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Introduce new functions to handle clipboard, add new files clipboard.[ch] This is only a preparatory patch for following GTK+ clipboard implementation. Acked-by: Victor Toso <victortoso@redhat.com>
-
- Mar 05, 2018
-
-
Jakub Janků authored
This code using Xlib was removed by commit "x11: retrieve _NET_WM_NAME using GDK" a4f5c7dc. Bring it back to make GTK+ optional for now. Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Add --with-gtk configure option. If used, favor GTK+ over Xlib. Acked-by: Victor Toso <victortoso@redhat.com>
-
- Dec 11, 2017
-
-
Jakub Janků authored
Since version 1.9.2, Marco sets _NET_WM_NAME to "Metacity (Marco)" instead of "Marco", see: http://git.mate-desktop.org/marco/commit/?id=cbf24f5d78719b930fc0cd6c0c80e00e9d62c95a Add this new value to wms_with_icons_on_desktop[], so that vdagent_x11_has_icons_on_desktop() returns TRUE. Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Don't cache _NET_WM_NAME, instead refetch it with each vdagent_x11_has_icons_on_desktop() call so that correct result is returned even if the window manager changes during the lifetime of vdagent_x11 struct. Remove char *net_wm_name from vdagent_x11. Remove x11 argument from vdagent_x11_has_icons_on_desktop(). Acked-by: Victor Toso <victortoso@redhat.com>
-