| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
palette_get() used to return a ref, and palette_release() used to
release that ref.
Since ed877341, the palette is no longer refcount'ed, since its usage is
exclusively local in common/canvas code.
palette_release() shouldn't remove the palette from the cache.
https://bugzilla.redhat.com/show_bug.cgi?id=1011936
|
|
|
|
| |
Signed-off-by: Alon Levy <alevy@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The usbredir channel uses spice_msg_in_raw to get its data, which uses
in->dpos to determine the msg size and that was no longer being set for
non sub-messages.
https://bugs.freedesktop.org/show_bug.cgi?id=69935
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Since 5f67178c, alt-tab is no longer grabbed by the client. The keyboard
hook still needs to handle WM_SYSKEY{DOWN,UP} messages.
https://bugzilla.redhat.com/show_bug.cgi?id=873341
|
| |
|
| |
|
|
|
|
| |
Defaults to GStreamer on Windows, and PulseAudio otherwise atm.
|
|
|
|
|
| |
The default configure sasl auto setting will error out if SASL is
missing. Instead, silentely skip sasl configure if detected missing.
|
|
|
|
|
| |
As pointed out and verified on the ML after 0.21 release by Klaus
Hochlehnert.
|
| |
|
|
|
|
|
|
|
|
| |
This way we avoid a race condition if the parent execve()s a setuid
program (possibly this program).
This is the same as the fix for pkexec which is CVE-2011-1485:
See: https://bugzilla.redhat.com/show_bug.cgi?id=692922
|
|
|
|
|
| |
spice-widget.c:814:50: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
g_return_if_fail(SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)d->win_mouse_speed, 0));
|
|
|
|
|
|
|
| |
As pointed out by Yonit on the ML:
> (1) the palette cache shouldn't be shared among the display channels. I.e.,
> there should be one instance per channel, and not one instance in
> spice-session.
|
| |
|
|
|
|
|
|
| |
Use of coroutines allow to simplify spice_channel_recv_msg(), it doesn't
need to keep current reading state, it can rely on the coroutine stack
for that.
|
| |
|
|
|
|
|
| |
The cache code isn't very quick, it shows up in profilers. Using
GHashTable allows to simplify the code while making it faster.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current coroutine channel_iterate() creates a GSource for the socket
reenters the mainloop waiting for IO condition. This is really heavy
usage of mainloop showing up in system time and user space
profiling (10% of CPU time spent in mainloop overhead). Instead flush
all pending input messages before switching context and reentering main
loop.
This is the kind of results I get with a replay:
before:
2179,440455 task-clock # 0,629 CPUs utilized
3 580 context-switches # 0,002 M/sec
207 cpu-migrations # 0,095 K/sec
48 909 page-faults # 0,022 M/sec
7 362 442 301 cycles # 3,378 GHz
5 256 957 520 stalled-cycles-frontend # 71,40% frontend cycles
idle
<not supported> stalled-cycles-backend
5 460 266 981 instructions # 0,74 insns per cycle
# 0,96 stalled cycles
per insn
982 749 523 branches # 450,918 M/sec
20 745 453 branch-misses # 2,11% of all branches
3,463422087 seconds time elapsed
after:
1741,651383 task-clock # 0,522 CPUs utilized
5 093 context-switches # 0,003 M/sec
137 cpu-migrations # 0,079 K/sec
49 033 page-faults # 0,028 M/sec
5 874 567 974 cycles # 3,373 GHz
4 247 059 288 stalled-cycles-frontend # 72,30% frontend cycles
idle
<not supported> stalled-cycles-backend
4 419 666 346 instructions # 0,75 insns per cycle
# 0,96 stalled cycles
per insn
776 972 366 branches # 446,112 M/sec
17 862 170 branch-misses # 2,30% of all branches
3,337472053 seconds time elapsed
|
|
|
|
|
| |
That doesn't seem to really improve performance so much,
but that' s what we should do probably.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid hard-coding surface 0 as being primary, although in practice it
always is so far. Also a lot of lookups are primary, so add a shortcut
for this special case (~30% apparently), it shows some small lookup
speedup.
before:
real 0m5.008s
user 0m3.253s
sys 0m2.015s
after:
real 0m4.930s
user 0m3.133s
sys 0m2.027s
|
|
|
|
| |
Improve a bit the code by using hashtable ownership.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With a Spice replay (a tool not yet merged, but available in dev
branches), the following commit improves a little bit performance by not
spending so much CPU time in looking up surfaces. I found initially
hotspot with "perf", and get a consistant ~200ms speedup with "time
spicy-stats" after replacing the ring.
before:
real 0m5.147s
user 0m3.506s
sys 0m1.949s
after:
real 0m5.008s
user 0m3.253s
sys 0m2.015s
|
|
|
|
|
| |
Allow to disable selectively channels, mainly used for testing,
ex: SPICE_DISABLE_CHANNELS=display spicy-stats -p 12345
|
|
|
|
|
|
| |
This allows to simplify a little bit derived class (no need to override
handle_msg), and allows the base class more flexibility (for example for
filtering messages, as in the following patch)
|
|
|
|
|
|
| |
This function will allow to set base handlers and specific channel
handlers in a common way, instead of each channel having to override the
base channel virtual handle_msg().
|
|
|
|
|
|
| |
Checking by value make the flag fields useless. Unfortunately, when
adding more flags, the server will have to ensure it can safely send it,
by checking some of new client caps (for some features).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the _FORTIFY_SOURCE has been already defined, we shouldn't redefine
it, or it will raise a build error as below:
In file included from spice-audio.c:36:0:
../config.h:12:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
spice-audio.c:1:0: note: this is the location of the previous definition
Suggested-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
|
|
|
|
| |
This reverts commit f670e0197c37b2f12518f6d216642f67cdf5de84.
|
|
|
|
|
|
|
| |
flip -> unsupported by x11, since XCreatePixmapCursor has no invert
functionality, only a mask, shape, background and foreground colors. Use
this checkerboard hack to get some contrast for cursors in the guest
that relied on invert for the same contrast.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The argument given to g_option_context_new() was apparently copy/pasted from
spicy-screenshot and therefore inaccurate for spicy-stats. Since the actual
description of the program (from _set_summary()) is displayed on the next line
anyway, simply make the context NULL.
|
|
|
|
|
| |
Documentation for spice_main_clipboard_selection_request() refers to deprecated
signal 'main-clipboard' instead of 'main-clipboard-selection'
|
|
|
|
| |
This is probably not exhaustive enough, but better than nothing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gtk+ internal text/utf8 is using LF conversion, on all platforms.
Even though the toolkit may only handle a single line ending type, we
may want to avoid the conversion for Spice use cases, gtk+ could learn a
new native utf8 target type, see also:
https://bugzilla.gnome.org/show_bug.cgi?id=706657
In the meantime, the only thing we need to convert, is to/from crlf
guest (from/to lf). This is what this change is about.
It has been tested successfully with the various guest/client OS
combinations.
|
|
|
|
| |
Convert line endings from/to LF/CRLF.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implementation assumes that the toolkit doesn't do any conversion
on its own. This is actually not the case, gtk+ converts line endings
already on windows. It would be pretty ugly to do conversions back and
forth at different levels. So the channel implementation shouldn't
try to do conversion, and implementation must be done at higher level,
where the actual system clipboard implementation is known (at
gtk-session for instance)
Since this code hasn't been officially released, let's revert it and
implement a better crlf conversion handling in gtk-session in the
following commits.
This reverts commit e45a446a9981ad4adaeff9c885962a8c6140333e.
|
| |
|
|
|
|
|
|
|
|
|
| |
Starting libusbx version 1.0.13 (commit 8cd30bb7066f785ee78cf6c3dccafdbc4b957b50)
windows device enumeration changed and root hubs address number is 1 intead
of 0xff.
This patch uses LIBUSBX_API_VERSION which was introduced after 1.0.13 release
(commit 9d368fc4774344d81ab02840f3a8478301bfb6fa).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when spice_usb_device_manager_remove_dev() is called,
for windows clients a request to uninstall the driver is sent to usbclerk.
This cause problems when 2 instances (A and B) of the client are running:
- Both A and B get notified about a new USB device when it's plugged in
- A is requested to usbredir the USB device.
- A requests usbclerk to install WinUSB driver for that device.
- usbclerk starts installing the driver
- Windows sends to both A and B - device removal events, which may cause
B to call spice_usb_device_manager_remove_dev.
- usbclerk completes installing the driver and reply to A
- B requests usbclerk to remove the WinUSB driver for that device.
To prevent that, spice-gtk now requests usbclerk to remove the driver
only if it was the instance that requested the driver to be installed.
This is done with the help of a new device SPICE_USB_DEVICE_STATE_INSTALLED
state.
rhbz#919166
|
|
|
|
|
| |
For the compat case (glib < 2.28), we were using our own implementation
instead of directly reusing glib code.
|
|
|
|
|
|
|
| |
The destroy function passed to g_slist_free_full should be passed the elements
data pointer, not the element itself.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current el6 systems don't have gobject-introspection packages,
so the GOBJECT_INTROSPECTION_CHECK m4 macro is not available
on such systems. This makes it difficult to run autogen.sh
on these systems.
This commit uses m4_ifdef to check if this macro is available
before trying to use it, and makes sure introspection is
disabled when GOBJECT_INTROSPECTION_CHECK could not be found.
This allows to compile spice-gtk from git on el6 systems
with:
./autogen.sh --with-gtk=2.0 --disable-gtk-doc --disable-vala
--disable-controller --disable-werror
|
| |
|
|
|
|
|
|
|
|
| |
The Python bindings generator failed to bind the USB widget, because of
the object/class declaration. The declaration was circumventing the
deprecated errors when compiling with GTK_DISABLE_DEPRECATED. We used
to need that because of broken gtk+ headers, but it is no longer
necessary since 15bd7ceba1434b5d710bfd16078044f30693467b.
|
|
|
|
|
| |
This fixes the GSpice-WARNING **: no cert loaded, when doing a seamless
migration (when using the "ca" property).
|
|
|
|
|
|
| |
The SpiceSmartcardManager is a singleton, so it does not make
a lot of sense to try to init it multiple times. This commit adds
a GOnce to ensure the manager is only init'ed once.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When initializing a software smartcard, vcard_emul_init() can
report success, error, or indicate that initialization has already
been done. In this last case, we would assume that an error occurred
instead of behaving as if the initialization succeeded.
vcard_emul_init() can end up being called multiple time if the
smartcard channel gets destroyed and recreated during the lifetime
of the application
Fixes rhbz#815639
|