summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* spice-widget: Fix file drag-n-drop mime-typeHans de Goede2013-04-091-1/+1
| | | | | | | Currently the user can drag-drop text onto the widget, and it will try to open it as a file, not good, this fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* cairo: fix reference leakMarc-André Lureau2013-04-051-1/+1
| | | | | | | | cairo_surface_finish() doesn't remove the reference, cairo_surface_destroy() does and will call surface_finish(). Thanks to Uli Schlachter for noticing that in: https://bugs.freedesktop.org/show_bug.cgi?id=61876
* usb-device-manager: fix log messages to match vid:pid changeUri Lublin2013-04-041-4/+14
| | | | | | On Windows clients now USB devices are identified by their vid:pid (sometimes these values are being held by variables "bus" and "addr") Change log messages accordingly.
* usb-device-manager: Windows: identify devices by vid:pid instead of bus.addressUri Lublin2013-04-041-0/+33
| | | | | | | | | | | | | | | | | | | | | rhbz#842816 Sometimes bus.address of a USB device changes upon WinUSB driver installation for that device. This makes bus.address not a good identifier to use when running on Windows machines. Instead this patch makes usb-device-manager, when running on a Windows client, identify devices by their vid:pid. What changes were made in this patch (in addition to previous patches): - vid:pid are asked from the udev. - match functions that compare vid:pid were added - when comparing devices vid:pid are used. This also means that a scenario where two USB devices with the same vid:pid on a Windows client is not supported. However there was a problem with this scenario before as on Windows drivers for (specific) USB devices are installed based on their vid:pid.
* usb-device-manager: Windows: spice_usb_device_equal_libdev: compare vid:pidUri Lublin2013-04-041-0/+21
| | | | | | | | When comparing spice_usb_device with a libusb_device on Windows clients, use vid:pid instead of bus.address It seems that a device bus.address may change when WinUSB driver is being installed.
* usb-device-manager: use a function to get vid:pid from a libusb_deviceUri Lublin2013-04-041-10/+48
| | | | | | | To be reused later. Also implemented a get_device_descriptor function (in case it will be needed in the future).
* usb-device-manager: find_libdev: use a match functionUri Lublin2013-04-041-5/+11
| | | | | | Instead of comparing directly against <bus, address>. In preparation of comparing against vid:pid for Windows clients.
* usb-device-manager: find_device: use a match functionUri Lublin2013-04-041-3/+10
| | | | | | Instead of comparing directly against <bus, address> In preparation of comparing against vid:pid for Windows clients.
* usb-device-manager: constify spice_usb_device_get_ functionsUri Lublin2013-04-042-12/+12
|
* win-usb-dev: compare vid:pid instead of bus.addr (Windows)Uri Lublin2013-04-041-6/+6
| | | | | | | It seems that sometimes, on Win7 clients, bus.addr is changing when WinUSB driver is being installed (e.g. 4.1 -> 4.2). So compare vid:pid instead.
* win-usb-dev: make VID and PID available via get_property (Windows)Uri Lublin2013-04-041-0/+8
|
* channel-playback/record: Refuse audio-vol-msgs with 0 channelsHans de Goede2013-04-032-0/+10
| | | | | | | | | Older servers send these, explicitly warn about this, rather then triggering the following error later: (remote-viewer:8726): GSpice-WARNING **: set_sink_input_volume() failed: Invalid argument Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* win32: do not handle win keys when the keyboard is not grabbedMarc-André Lureau2013-04-021-0/+8
| | | | | | | | Special-case on win32, filter out the win keys when not having the keyboard grab. This is to avoid the win keys to be received both by the guest and the client, which can be undesirable in general. https://bugzilla.redhat.com/show_bug.cgi?id=873341
* Release pointer grab on grab-brokenMarc-André Lureau2013-04-021-7/+8
| | | | | | | | | | | | | | | | | | | | On windows, the client receives a WM_KILLFOCUS event which generates solely a keyboard grab-broken event. This event is received when pressing ctrl-alt-del (to show up the task manager), and we need to release the pointer grab and clip region in this case for the client to be usable. This also clear the clipping region when the client pops-up a dialog. Since keyboard focus is a pre-requisite for pointer grab, it sounds logical to release the pointer grab if losing keyboard focus, but for now, we just release it in grab-broken, as a result of discussion on the ML. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=857114 https://bugzilla.redhat.com/show_bug.cgi?id=922818
* channel-main: Don't send empty monitor config on main_init with agentHans de Goede2013-03-291-2/+2
| | | | | | | | | | | | | | Currently we send a monitor-config on any agent_start, including sending it if the agent is already started when the main channel connects, but when the main channel gets initialized, the display channels aren't intialized yet, so our monitor config will be empty. Resulting in the Linux agent logging: spice-vdagent[1285]: err: client sent config with all monitors disabled This patch fixing this by only sending our monitor-config to the agent when it (re)starts later on. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* main: copy the right nth monitor configMarc-André Lureau2013-03-291-4/+4
| | | | i is our counter for c->display[]
* Keep GSocketConnection around after initial connectChristophe Fergeau2013-03-274-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There has been reports of recent spice-gtk versions not working on RHEL6 or Ubuntu 10.04. This happens because these systems have an older glib version without: commit a0e1b226a21ca498b301981b0c89e89ad9a31eb1 Author: Dan Winship <danw@gnome.org> Date: Fri Apr 23 08:47:18 2010 -0400 GSocketConnection: don't close the socket if it's still reffed When disposing a GSocketConnection, don't explicitly close the underlying GSocket. The GSocket will close itself if it gets destroyed, and if it doesn't get destroyed, that presumably means the app still wants to use it. Eg, this lets you use GSocketClient to create a GSocketConnection, and then take the GSocket and destroy the GSocketConnection. https://bugzilla.gnome.org/show_bug.cgi?id=616855 and spice-gtk commit 0f9a432c "session: allow to connect via HTTP CONNECT proxy" changed spice_session_channel_open_host to get its socket by doing: open_host->socket = g_socket_connection_get_socket(connection); g_object_ref(open_host->socket); g_object_unref(connection); (see socket_client_connect_ready) If glib does not have the commit mentioned above, then this won't work as expected as open_host->socket will get closed when 'connection' gets destroyed. This commit changes spice_session_channel_open_host to return a GSocketConnection rather than a GSocket so that we can keep the socket open even on older glib versions. Huge thanks go to Brad Campbell <brad@fnarfbargle.com> for doing all the spice-gtk/glib bisecting work.
* Be less verbose about monitor configMarc-André Lureau2013-03-271-2/+3
|
* session: copy proxy settingMarc-André Lureau2013-03-251-7/+13
| | | | | | | Solve migration falling back to switch-host method when using proxy set through controller: https://bugzilla.redhat.com/show_bug.cgi?id=923894
* gtk-session: remove clipboard timeoutMarc-André Lureau2013-03-211-12/+10
| | | | | | | | A large clipboard may take longer than 7s on slow networks. Since the Gtk+ API forces us to use an inner main-loop, exit it asap, if agent is disconnected for instance. https://bugzilla.redhat.com/show_bug.cgi?id=752483
* main: warn if receiving message from disconnected agentMarc-André Lureau2013-03-211-0/+2
|
* main: only notify on agent status changeMarc-André Lureau2013-03-211-2/+4
|
* controller: don't try to set integrity on XP x64 editionMarc-André Lureau2013-03-191-2/+1
| | | | | | | | | | XP x64 uses version 5.2, but doesn't accept setting the pipe to low integrity. 5.2 seems to be shared with many versions (server 2003 for example), but only Vista+ matters, which is only major >=6. https://bugzilla.redhat.com/show_bug.cgi?id=918342
* Notify of monitors when not using MonitorConfigMarc-André Lureau2013-03-151-0/+5
| | | | | | | Windows guest don't use MonitorConfig, but we may want to notify the client of the number of monitors. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=919530
* Update current resolution when agent is startedMarc-André Lureau2013-03-151-21/+28
| | | | This ensures we have the requested resolution whenever possible.
* spice-widget: Reconfiguring the grab is only needed on win32Hans de Goede2013-03-151-0/+2
| | | | | | | | | | | | | | | | | Commit 8a7e72e3 "widget: regrab when widget is reconfigured" adds an ungrab + grab call to the configure event handling code. Because: "On Windows, we need to update the cursor clip. Call ungrab&grab to update it." But on X11 this is not needed, see man XGrabPointer, which explains that the grab automatically adjusts to window resizing. Not only is it not needed it is also racy, causing spice-gtk based apps to log messages like: (remote-viewer:9935): GSpice-WARNING **: pointer grab failed 3 This patch fixes this by disabling the ungrab + re-grab on non-win32. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* spice-widget: Fix auto-grab on window size changeHans de Goede2013-03-151-2/+4
| | | | | | | | | | | | | | | | | | | | | Commit 8a7e72e3 "widget: regrab when widget is reconfigured" adds an ungrab + grab call to the configure event handling code. But it does this without checking if the mouse is grabbed at all, causing an unsolicited grab in certain scenarios, ie: 1) User boots a vm 2) Connects with remote-viewer 3) Goes and do some web-browsing while the vm boots 4) Mouse happens to hover over the remote-viewer window 5) Guests changes resolution (ie X starts) 6) The mouse is grabbed, and when the user tries to move it to click something in his web-browser this does not work. This patch fixes this by checking that the mouse is grabbed before doing the ungrab + re-grab which is needed to reconfigure the grab to the new window size / location. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* spice-widget: Ignore duplicate configure eventsHans de Goede2013-03-151-0/+8
| | | | | | | | | | | gtk seems to be sending us identical / repeated configure events quite regularly (atleast under X11), we don't care about re-configures with the same size + coordinates, so filter these out. Note this patch uses the SpiceDisplayPrivate mx and my members which were already defined to store the window position, but not yet used. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* spice-channel: Do not segfault fault if peer_msg was a NULL pointerDunrong Huang2013-03-111-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ remote-viewer spice://192.168.0.233:111 # 111 is not a valid spice port (remote-viewer:29381): GSpice-WARNING **: incomplete link header (-104/16) Segmentation fault (core dumped) $ gdb /usr/bin/remote-viewer core [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `remote-viewer spice://192.168.0.233:111'. Program terminated with signal 11, Segmentation fault. switch_tls=0x7f9eb6855b88) at spice-channel.c:1675 warning: Source file is more recent than executable. 1675 switch (c->peer_msg->error) { (gdb) bt switch_tls=0x7f9eb6855b88) at spice-channel.c:1675 at spice-channel.c:2299 at coroutine_ucontext.c:58 at continuation.c:49 c->peer_msg->error was accessed without checking the validity of pointer in spice_channel_recv_link_msg(). Actually, c->peer_msg may be a NULL pointer if we got a error in spice_channel_recv_link_hdr(). This patch fixes this error. Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
* usb: Remove device from ::devices before emitting device-removedChristophe Fergeau2013-03-051-2/+6
| | | | | | | | | The code is currently removing the USB device that is gone from the SpiceUsbDeviceManager::devices array after the device-removed signal has been emitted. As signal handlers are called synchronously, this means that the list returned by spice_usb_device_manager_get_devices() will still contain the removed device if it's called from the signal handler.
* channel-main: Handle the new VD_AGENT_FILE_XFER_STATUS_SUCCESS status msgHans de Goede2013-03-041-12/+12
| | | | | | | So that we can pass along an error from the agent to report an xfer error after the last FILE_XFER_DATA message has been sent. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Update spice-commonHans de Goede2013-03-041-0/+0
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* channel-main: Send an error to the agent on file-xfer read errorHans de Goede2013-03-041-0/+7
| | | | | | So that the agent knows the rest of the file won't be coming. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* channel-main: Fix dangling references to freed file-xfer-tasks on agent cancelHans de Goede2013-03-042-0/+17
| | | | | | | | | While testing the agent error handling code I was triggering the agent-file-xfer-cancel code-path in spice-gtk. This crashes due to the flushing queue still having a reference to the task in question when its gets cancelled from the agent side. This fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add fallback for g_key_file_set_uint64Christophe Fergeau2013-02-282-0/+32
| | | | This was only added in glib 2.26
* Don't try to call _wocky_http_proxy_get_type with old gioChristophe Fergeau2013-02-281-0/+2
| | | | | | Proxy support is only built when gio is newer than 2.26, don't try to call symbols from wocky-http.c with older glib as this would result in link failures.
* smartcard: do not register monitor before smartcard initMarc-André Lureau2013-02-261-6/+14
| | | | | | Never call vevent_get_next_vevent() before calling vcard_emul_init() Some mutexes are initialized in vevent_queue_init(), during emul_init()
* smartcard: trivial cleanupMarc-André Lureau2013-02-263-15/+10
|
* session: warn on invalid port valueMarc-André Lureau2013-02-261-4/+12
|
* channel: swap tls status during seamless migrationMarc-André Lureau2013-02-201-0/+1
| | | | | | | In some cases, source and destinations may have different channel encryption. We need to swap tls state too during seamless migration. https://bugzilla.redhat.com/show_bug.cgi?id=855870
* main: use stable comparison function for monitorsMarc-André Lureau2013-02-191-1/+2
| | | | | If monitors are equal, compare them by their addresses, to get the effect of a stable sort.
* main: use glib sortMarc-André Lureau2013-02-191-2/+2
| | | | | Use glib sort for monitors. This allows to share the same implementation and behaviour on various platforms.
* Release v0.18v0.18Marc-André Lureau2013-02-131-0/+8
| | | | | | | | | v0.18 ===== - Build fix with Gtk+ unstable. - MinGW build fixes with old headers - Fixes rhbz#908057
* usb-device-manager: Fix coldplug raceHans de Goede2013-02-121-2/+0
| | | | | | | | | | | It is possible for us to see a device show up twice, if it gets plugged in between us starting listening for new devices and doing "coldplug", then it will get added once from the coldplug code, and then again from from the hotplug code path. We already have code checking for this, but the check is only compiled in under Windows -> Remove the #ifdef to also catch this under Linux. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* display: keep monitor config updated if resize-guest is disabledMarc-André Lureau2013-02-071-13/+17
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=908057
* Update spice-commonMarc-André Lureau2013-02-071-0/+0
|
* mingw: spice-widget: make sure MAPVK_VK_TO_VSC is definedUri Lublin2013-02-061-0/+3
| | | | | | | | MAPVK_VK_TO_VSC is defined in the file: <path-to-mingw-sys-root>/mingw/include/winuser.h In older mingw-headers the definition of MAPVK_VK_TO_VSC is defined only -- #if _WIN32_WINNT >= 0x0601
* build-sys: don't use -Wstrict-prototypes with Gtk+ 2.0Marc-André Lureau2013-02-062-10/+19
|
* build-sys: remove GTK_DISABLE_DEPRECATEDMarc-André Lureau2013-02-061-1/+0
| | | | | | | Gtk 3.0 no longer includes deprecated headers if it's defined: http://git.gnome.org/browse/gtk+/commit/?id=a1de67f438f057711353a55b322babce7044226f We added it as a workaround for Gtk 2.0 build issue.
* build-sys: bump spice-glib version-infoMarc-André Lureau2013-02-061-1/+1
| | | | | | | spice-glib version-info should have been bumped, since we have new symbols. 249dd73132a7ecc1ceb32b4fea6529491ca219d3