summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* spice-channel: plug a small memory leakMarc-André Lureau2012-12-141-1/+4
|
* gtk/channel-port: include glib-compat for g_clear_pointerUri Lublin2012-12-101-0/+1
|
* glib-compat: add g_slist_free_fullUri Lublin2012-12-103-0/+33
|
* channel-display: add more protection against bad access to streamsUri Lublin2012-12-101-2/+14
|
* spice-widget: Fix rendering issue with X11 backend enabledDunrong Huang2012-12-071-0/+4
| | | | | | | | | | | | | | commit 5ec6e4d fixes a rendering issue on win32 platform, but raises another bug on linux platform. If X11 backend is enabled, app window will becomes while screen when draging it. This bug can be reproduced easily: compile spice-gtk using: $ ./configure --with-gtk=2.0 --with-x11 $ make $ gtk/spicy -h host -p port Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
* channel: rely on couroutine instead of channel stateMarc-André Lureau2012-12-052-28/+9
| | | | | We can simplify the channel state callback and simplify a little the code by relying on coroutine state instead.
* spicy: demo SpicePort usageMarc-André Lureau2012-12-052-0/+150
| | | | | | | | | | | spicy has been modified to recognized 2 different port types to play with: * org.spice.spicy: will connect the port to the current stdin/stdout, and can be used as a chardev for the qemu monitor * org.spice.spicy.break: will send a break event on connect and disconnect immediately (exercice the port event and flush)
* Add a port channelMarc-André Lureau2012-12-059-0/+536
| | | | | | | | | | | | A Spice port channel carry arbitrary data between the Spice client and the Spice server. It may be used to provide additional services on top of a Spice connection. For example, a channel can be associated with the qemu monitor for the client to interact with it, just like any qemu chardev. Or it may be used with various protocols, such as the Spice Controller. A port kind is identified simply by a fqdn, such as org.qemu.monitor, org.spice.spicy.test or org.ovirt.controller...
* channel: add flush_async()Marc-André Lureau2012-12-055-1/+108
| | | | | Add spice_channel_flush_async() that asynchronously will write all the pending channel data.
* update spice-commonMarc-André Lureau2012-12-051-0/+0
|
* channel: make spice_msg_out_send() slightly easier to readMarc-André Lureau2012-11-301-7/+9
| | | | | Avoid the obfuscating many -> indirection by using the SpiceChannelPrivate *c variable.
* win32: fix rendering issue when widget is partially off screenMarc-André Lureau2012-11-271-1/+1
| | | | | | | | | | | | Gtk+ in win32 has a rendering bug with window non-buffered: https://bugzilla.gnome.org/show_bug.cgi?id=688962 According to Alex Larsson, this shouldn't affect performance much, since there is already extra-copy done for offscreen buffers, and might even make it faster in gtk+ 3.0... Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=874482
* channel: learn to load certificate from memoryMarc-André Lureau2012-11-221-8/+61
| | | | | | Sadly, OpenSSL doesn't provide a way to load certificate from memory, but all the functions necessary to do so are actually public, so we can implement our own version and avoid files, how awesome!
* Add SpiceSession:ca propertyMarc-André Lureau2012-11-222-2/+46
|
* win32: translate virtual-key code to scancode via MapVirtualKeyMarc-André Lureau2012-11-191-0/+6
| | | | | | | | | | | | | | | | Local client keyboard layout shouldn't affect hardware scancode sent to guest, so that guest keyboard layout configuration can map it properly. Unfortunately, the Win32 GdkEventKey.hardware_keycode isn't a hardware scancode, but the Windows virtual-key code. We could modify Gdk to return the scancode (available in MSG.lParam or via global hook), but that would mean some Gdk breakage, or some unnecessary complexity. Instead, we can rely on MapVirtualKey(), which translates the vitual-key code into a scan code using current keyboard layout. This solves the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=871125
* win32: track current window handleMarc-André Lureau2012-11-181-8/+17
| | | | | | We need current window handle for the global keyboard hook. It is not enough to rely on focus-in event to set it, so do it also in key-event. This avoids extra warnings on Windows.
* win32: clip and move cursor within window regionMarc-André Lureau2012-11-141-19/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows grab do not exist like on X11, so we need to clip the cursor to our client window, while making sure it doesn't overlap with windows statusbar. When wrapping the cursor, we need to make sure we also stay within the clip region, or else the clip is inverted (pointer can't enter the clip region anymore), and we also lose the keyboard hook/grab. The end result works better than spicec, which didn't exclude the Windows statusbar, and was subject to losing pointer when wrapping mouse over it. Another approach I have been playing with is to clip the cursor, and process raw input messages, this will have the advantage to work even when the client is completely out of the working area (under the statusbar for example), but the complexity involved is too high for very poor benefit (interacting with a non-visible client), we could even argue that the behaviour implemented by this patch is more correct (it refuses to grab the cursor if the client isn't visible in the working area). v2: - choose the nearest monitor for clipping - the ClipRegion is in Windows coordinate, we can't use gdk warp - fix https://bugzilla.redhat.com/show_bug.cgi?id=872640 This solves the following bugs: https://bugzilla.redhat.com/show_bug.cgi?id=857430 https://bugzilla.redhat.com/show_bug.cgi?id=857389
* widget: regrab when widget is reconfiguredMarc-André Lureau2012-11-121-0/+4
| | | | On Windows, we need to update the cursor clip. Call ungrab&grab to update it.
* widget: don't redraw server mouse until movedMarc-André Lureau2012-11-122-1/+3
| | | | | | | | When switching between client mode and server mode, the pointer is being invalidated on each display and the cursor will end up being drawn on both. Since there is no information on which display the cursor is supposed to be until a move is received, hide the cursor until it actually moves.
* win-usb-driver: use usbclerk new message: USB_CLERK_DRIVER_SESSION_INSTALLUri Lublin2012-10-253-27/+51
| | | | | | | | | | | | | | | | With this message usbclerk keeps a list of devices for which a libusb driver was installed (per connection). When a spice-gtk client exits, the connection is closed, and usbclerk uninstalls the driver for all devices in the list. That means we need to keep the connection open, so added the win-usb driver installer to usb-device-manager's priv. This prevents the case were the user exits the client, while a usb device is connected to the guest, and can not use the device from the client machine. rhbz#869542
* controller/win32: limit access to current user onlyMarc-André Lureau2012-10-251-1/+49
| | | | Based on RHEV spicec-win only code.
* controller/win32: allow ActiveX connection on untrusted websiteMarc-André Lureau2012-10-255-2/+150
| | | | | | | | | | Set low integrity on named-pipes. This bug was originally resolved as: https://bugzilla.redhat.com/show_bug.cgi?id=668980 Fixes regression: https://bugzilla.redhat.com/show_bug.cgi?id=844461
* spice-gtk: controller: log messages received from a controllerUri Lublin2012-10-241-0/+25
|
* win32: implement disabling mouse accelMarc-André Lureau2012-10-232-0/+13
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=867885
* move mouse acceleration code in a seperate functionMarc-André Lureau2012-10-232-23/+28
|
* Fix disabling mouse acceleration on X11Marc-André Lureau2012-10-232-14/+14
| | | | | | | | | It turns out the acceleration code didn't work, because we didn't set it to the default values. Then we need to restore it back. Eventually, it would be nicer to inhibit gnome-settings-daemon to apply devices changes, and restore settings when un-inhibiting. https://bugzilla.redhat.com/show_bug.cgi?id=867885
* Empty host subject from qemu should only validate hostnameMarc-André Lureau2012-10-191-0/+4
| | | | | | | Validate empty host subject from qemu exactly like when no explicit host subject is specified. https://bugzilla.redhat.com/show_bug.cgi?id=858228
* channel: improve debugging messageMarc-André Lureau2012-10-191-1/+1
| | | | | | | The open_host() can return FALSE when the connection is discarded or skipped. Improve the message to not indicate a failure. https://bugzilla.redhat.com/show_bug.cgi?id=858232
* Print list of supported channelsMarc-André Lureau2012-10-191-0/+18
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=834513
* channel-inputs: Fix sending 00 scancodes to guests with scancode capHans de Goede2012-10-181-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for handling single key up / down events in spice-server is: SpiceMsgcKeyDown *key_down = (SpiceMsgcKeyDown *)buf; uint8_t *now = (uint8_t *)&key_down->code; uint8_t *end = now + sizeof(key_down->code); for (; now < end && *now; now++) { kbd_push_scan(keyboard, *now); } Notice the *now, which makes sure that no scancodes with the value 0 get send! But the new SPICE_MSGC_INPUTS_KEY_SCANCODE in the server does: uint8_t *code = (uint8_t *)buf; for (i = 0; i < size; i++) { kbd_push_scan(keyboard, code[i]); } And thus will push any 0 bytes in the buffer. Resulting in these message in the guest: atkbd serio0: Unknown key pressed (translated set 2, code 0x0 on isa0060/serio0). atkbd serio0: Use 'setkeycodes 00 <keycode>' to make it known. Rather then making the server skip 0 bytes I believe it is better to just make spice-gtk not send these in the first place, which is what this patch does. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* win32: implement sync_keyboard_lock_modifiers()Marc-André Lureau2012-10-171-0/+35
| | | | | Fix numlock numerical keypad being broken: https://bugzilla.redhat.com/show_bug.cgi?id=856538
* spicy: show the correct ungrab key combinationMarc-André Lureau2012-10-171-18/+9
| | | | | | | | | | | | | The gtk accelerator for ungrab is useless, since it has to be handled by the spice widget only. It could be useful to still show the ungrab key sequence in the menu (for help), but unfortunately, spice-gtk grab sequence syntax is not the same as gtk accelerator syntax, and that would be needlessly complicated to handle. Also correctly show the configured sequence in the status bar when the widget has the grab. https://bugzilla.redhat.com/show_bug.cgi?id=851090
* widget: apply color conversion when creating imageMarc-André Lureau2012-10-161-2/+14
| | | | | | | | | | The color conversion only happened during "invalidate", but we also need to apply it when the image is created in the first place. This solves initial screen being black after connection to agent-less guest with 16b colour depth: https://bugzilla.redhat.com/show_bug.cgi?id=843134
* win32: ignore hardware keycode 255Marc-André Lureau2012-10-151-1/+7
| | | | | | It's a reserved value, and it doesn't have a valid scancode translation. Currently, We hit a warning in the delayed key handling later.
* vnc keymap: fix incorrect table sizeMarc-André Lureau2012-10-151-2/+2
| | | | This lead to out of bound array access
* Add a warning if scancode lookup failedMarc-André Lureau2012-10-151-0/+3
| | | | | This helps tracking some send_keys() issues, such as https://bugzilla.gnome.org/show_bug.cgi?id=686170
* win32: fix quote key handlingMarc-André Lureau2012-10-151-1/+1
| | | | | | Fix keymaps to correctly handle the quote key. https://bugzilla.redhat.com/show_bug.cgi?id=856317
* Add spice-usbredir-filter alias for spice-usbredir-auto-redirect-filter (v2)Hans de Goede2012-10-111-0/+14
| | | | | | | | | For commandline backward compatibility with older spice-gtk versions. Changes in v2: -warn about spice-usbredir-filter being deprecated when it gets used Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* UsbDeviceManager: Don't warn on EINTRHans de Goede2012-10-111-1/+1
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* UsbDeviceManager: Hookup redirect-on-connect propertyHans de Goede2012-10-111-0/+47
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* UsbDeviceManager: Build channel list after building the device listHans de Goede2012-10-111-11/+11
| | | | | | This is necessary for redirect-on-connect Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* UsbDeviceManager: Add a redirect-on-connect propertyHans de Goede2012-10-112-0/+55
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Rename spice-usbredir-filter option to spice-usbredir-auto-redirect-filterHans de Goede2012-10-111-5/+6
| | | | | | | | | The spice-usbredir-filter cmdline option was not chosen well, as it does not indicate what it filters. Now that we are also getting a filter for selecting already plugged in devices to redirect when a spice connection gets established, it needs to be renamed to make its function more clear. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb-redir: Fix read error handling depending on SpiceUsbDevice == libusb_deviceHans de Goede2012-10-094-32/+24
| | | | | | | | This has not been true for a while now, but since getting an error return from usbredirhost_read_guest_data() is rare no one has tripped over this sofar. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* channel-usbredir: Properly reset state from reset callbackHans de Goede2012-10-081-2/+15
| | | | | | | This is necessary to be able to use the usbredir channel after a non seamless migration. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Set channel state before calling channel_resetHans de Goede2012-10-082-4/+6
| | | | | | | | | This way functions called from the channel_reset function can rely on state accurately reflecting the state. This is necessary to stop channel-usbredir's reset callback from trying to send the initial hello message while the channel is no longer in a connected state. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Update spice-glib-sym-file for new symbolChristophe Fergeau2012-10-031-0/+1
|
* usb: Add info message when USB dialog is emptyChristophe Fergeau2012-10-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From rh bug #804187: « The redirection dialog can feel a bit strange when there is no device to redirect. It could be useful to provide a help message indicating that there is no device to redirect yet, and that the user can insert a USB device to redirect, and some related guidance. » This commit adds a "No USB devices detected" infobar in the USB dialog below the 'Select USB devices to redirect" label. Content could probably be improved, but this is a step in the right direction ;) This can be tested with diff --git a/gtk/usb-device-widget.c b/gtk/usb-device-widget.c index b1bf090..660ea03 100644 --- a/gtk/usb-device-widget.c +++ b/gtk/usb-device-widget.c @@ -220,6 +220,11 @@ static GObject *spice_usb_device_widget_constructor( G_CALLBACK(device_error_cb), self); devices = spice_usb_device_manager_get_devices(priv->manager); + if (devices) { + g_ptr_array_unref(devices); + devices = NULL; + } + if (!devices) goto end;
* Deal with libusbredirparser.pc rename to libusbredirparser-0.5.pcHans de Goede2012-09-251-4/+11
| | | | | | | | | | | | | | | | | | | | | The usbredir 0.5 release introduced the new API for 64 bit packet ids, but it kept the libusbredirparser.pc name as is, meaning that older versions of qemu will still have their pkg-config check for usbredirparser fulfilled, and build with the usb-redir device. Due to the API change there will be some compiler warnings, but the build will succeed, however the usb-redir device will be broken on 32 bit machines. To solve this, the usbredir-0.5.2 release renames the libusbredirparser.pc file to libusbredirparser-0.5.pc, so that it will no longer fulfill the pkg-config check of the qemu-1.2 and older releases, stopping the (silent) breakage. spice-gtk does not use the changed parts of the API, but does use libusbredirparser for the usbredirfilter* functions. This patch adapts spice-gtk's configure to accept both the libusbredirparser-0.5 and the libusbredirparser pkg-config names. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* G_GNUC_DEPRECATED_FOR must be defined publiclyMarc-André Lureau2012-09-252-17/+11
| | | | | | It's not enough to define G_GNUC_DEPRECATED_FOR in glib-compat.h, since this header is not public. Instead, let's define our own public SPICE_DEPRECATED_FOR macro, and clean-up double definition.