| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
We can simplify the channel state callback and simplify a little
the code by relying on coroutine state instead.
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
| |
Add spice_channel_flush_async() that asynchronously will write all the
pending channel data.
|
| |
|
|
|
|
|
| |
Avoid the obfuscating many -> indirection by using the
SpiceChannelPrivate *c variable.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
On Windows, we need to update the cursor clip. Call ungrab&grab to update it.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Based on RHEV spicec-win only code.
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=867885
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Validate empty host subject from qemu exactly like when no explicit
host subject is specified.
https://bugzilla.redhat.com/show_bug.cgi?id=858228
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=834513
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Fix numlock numerical keypad being broken:
https://bugzilla.redhat.com/show_bug.cgi?id=856538
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This lead to out of bound array access
|
|
|
|
|
| |
This helps tracking some send_keys() issues, such as
https://bugzilla.gnome.org/show_bug.cgi?id=686170
|
|
|
|
|
|
| |
Fix keymaps to correctly handle the quote key.
https://bugzilla.redhat.com/show_bug.cgi?id=856317
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
This is necessary for redirect-on-connect
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|