2017-07-31  Victor Toso  <me@victortoso.com>

	display-gst: Improve h264 elements filtering
	This patch fixes the avdec_h264 element not being present on
	gstvideo_has_codec() which get all decoder elements from GstRegistry
	and filter them on our GstCaps in order to get the ones for given
	codec.

	The issue is around the filtering. The current GstCaps for h264 is not
	consider a subset of avdec_h264's capabilities and that will filter
	this element out of the list.

	The proposed solution for that is to set `subsetonly` parameter from
	gst_element_factory_list_filter() to false.

	While at it, the cap "stream-format=byte-stream" is less useful now
	because it isn't needed to play the stream - see 6fe88871240c53b8

	In my system, our debug shows:
	.. gstvideo_debug_available_decoders: From 228 video decoder elements,
	- 4 can handle caps   image/jpeg: jpegdec, nvdec, avdec_mjpeg, vaapijpegdec
	- 3 can handle caps  video/x-vp8: vaapidecodebin, vp8dec, avdec_vp8
	- 4 can handle caps video/x-h264: vaapidecodebin, avdec_h264, nvdec, vaapih264dec
	- 3 can handle caps  video/x-vp9: vaapidecodebin, vp9dec, avdec_vp9

	IRC log on #gstreamer around this issue:

	toso  Hi, I'm wondering if I'm getting the documentation wrong about
	      the meaning of gst_caps_is_subset()... isn't it "video/x-h264,
	      stream-format=3D(string)byte-stream" a subset of "video/x-h264,
	      alignment=3D(string)au, stream-format=3D(string){ avc, byte-stream }"=
	 ?
	__tim toso, no, because it's missing the alignment field
	__tim which means alignment could be anything
	__tim which means it  might not be au
	toso  that's a bit confusing, no?
	__tim it's not a strict subset :)
	toso  I really thought it would be a subset in this case.. meaning, we
	      don't care about the aligment on _is_subset
	__tim you can do can_intersect() if you don't care
	slomo it's an actual subset if you define the abscence of a field as
	      "the field can have every possible value"
	toso  __tim: problem is that it isn't a subset on calling
	      gst_element_factory_list_filter()
	toso  slomo: yeah, that was my assumption on the meaning of subset
	toso  so, just to confirm, this is the expected behavior and not a
	      bug, right? :)
	slomo yes
	__tim slomo, foo, bar=3D{1,2} is not a subset of  foo, bar=3D1  is it?
	slomo but if something does not work as expect for you, that might be
	      a bug :)
	slomo __tim: correct
	slomo __tim: but foo, bar=3D1 is a subset of foo, bar=3D{1,2}
	__tim yes
	slomo __tim: and foo, bar=3D1 is a subset of foo
	slomo __tim: and foo is not a subset of foo, bar=3D1
	__tim yes. yes.
	__tim andn the case we're talking about is basically  "foo" + "foo,
	      bar=3D1"
	slomo yes, the first is a superset of the second there
	slomo toso: if something does not work for you that might also be a
	      bug of course ;)
	__tim ok, so not a subset.
	__tim then we're on the same page I think :)
	toso  slomo: right, my point was that I would like to list the h264
	      decoders that are available and I was using `video/x-h264,
	      stream-format=3Dbyte-stream` as input for
	      gst_element_factory_list_filter() .. and avdec_h264 is the one
	      not showing because it needs the aligment
	toso  but as I got it wrong, I'll rethink on how to fix it
	slomo toso: pass FALSE as the last argument
	slomo and you can just use 'video/x-h264'
	slomo and with gst_element_factory_list_get_elements() you can make
	      sure to get only a list of video decoders to begin with
	toso  just gst_element_factory_list_get_elements() gives me like 220
	      elements
	toso  using _type_decoder | _type_media_video | _type_media_image
	slomo is that a problem?
	toso  trying to reduce that to actual decoding elements
	slomo they should be all actual video decoders
	slomo and with gst_element_factory_list_filter(list, 'video/x-h264',
	      GST_PAD_SINK, FALSE) you can then filter out all non-h264 ones
	      dv_	is it generally ok if an audio decoder messes with the
	      PTS/durations?
	toso  right, let me try that then
	toso  slomo, __tim many thanks :)

	Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>

2017-07-26  leaboy  <wlbleaboy@126.com>

	usbredir: fix deadlock on error
	The current code deadlocks when a USB error occurs, releasing the
	channel lock before the idle is called fixes this problem.

	More specifically when an error occurs, we queue a call to device_error
	in an idle, and switch to the main context. The device_error() calls
	spice_usbredir_channel_disconnect_device() which needs the channel to be
	unlocked as it calls spice_usbredir_channel_lock().

	Examples:
	- Redirect USB Storage device to the guest and copy some big file. While
	  copy is ongoing, unplug the USB Storage from the client machine;
	- Unplug the usb device from the client machine while the USB Storage
	  device is being identified in the guest.
	- With the auto-redirection option enabled, plug and unplug the USB
	  Storage Device frequently.

	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1353528
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-07-26  Frediano Ziglio  <fziglio@redhat.com>

	gstreamer: Take into account stride information
	Using hardware encoders/decoders is possible that the output
	stride of the image cannot be computed with a fixed formula
	(width * 4). GStreamer in this case should set GstVideoMeta
	information with the correct stride value.
	Consider this value if present.
	This fix a problem using NvEnc encoder and Intel decoder.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-07-25  Pavel Grunt  <pgrunt@redhat.com>

	Fix build without egl
	spice_display_widget_gl_scanout is defined only when building with egl
	 ./.libs/libspice-client-gtk-3.0.so: undefined reference to `spice_display_widget_gl_scanout'

	Fixes 977db3bb3da94def4c0e1d4087037303d250e158

2017-07-21  Pavel Grunt  <pgrunt@redhat.com>

	Add flatpak builder manifest file for spicy
	To give an example for creating flatpaks depending on spice-gtk

	How to build and run the flatpak:
	spicy uses GNOME SDK runtime, version 3.24. The runtime provides tools
	and libraries necessary to build the flatpak
	 $ flatpak remote-add --if-not-exists gnome https://sdk.gnome.org/gnome.flatpakrepo
	 $ flatpak install gnome org.gnome.Sdk//3.24

	To build and run the flatpak of spicy:
	 $ flatpak-builder spicy data/org.spicespace.spicy.json
	 $ flatpak build-export repo spicy
	 $ flatpak --user remote-add --no-gpg-verify --if-not-exists spice-repo repo
	 $ flatpak --user install spice-repo org.spicespace.spicy
	 $ flatpak run org.spicespace.spicy
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	Revert "Ignore modifiers messages if no modifiers changed"
	This reverts commit 73cd553fb0fbd213b64d72f8b4289ed8a17fc6c0.
	 "This avoid keep sending modifiers changes if guest is not
	  synchronising the changes.

	  I consider this as an improving as this avoids client to try again
	  and again to force synchronisation however this does not prevent
	  every unwanted keystroke insertion which possibly can be a real
	  problem on some configurations.

	  For instance if guest do not handle caps lock as the client do
	  if client uses another modifiers (as num lock) this can force
	  inserting virtual caps keypress."

	It may be an optimization, but it complicates turning off
	the capslock once it is enabled. The bug is reproducible
	in rhel7/fedora guests.

	https://bugs.freedesktop.org/show_bug.cgi?id=101344
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-07-21  Uri Lublin  <uril@redhat.com>

	gst: new_sample: remove redundant sample? condition
	Move the declaration and assignment of 'buffer' into
	the if (sample) block, where sample is not NULL.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-07-18  Pavel Grunt  <pgrunt@redhat.com>

	gst-audio: Do not update mmtime without real audio channel
	The fake channel has been introduced to get the audio volume by starting
	the gstreamer's audio pipeline and querring its volume info (see commit
	aa8d044417bbf60685f59163b874ecb4f157c3c9).

	Hovewer starting the pipeline updates the mmtime as a side effect. This
	may cause a (big) delay in displaying a video stream.

	Because the fake channel is only needed to get the volume info, make
	sure to not update the mm-time with it.

	Reported-by: Christophe de Dinechin <dinechin@redhat.com>
	Acked-by: Christophe de Dinechin <dinechin@redhat.com>

2017-07-18  Christophe de Dinechin  <dinechin@redhat.com>

	spice-gtk: Use time comparisons that still work after wraparound
	The mm timer is a millisecond timer that wraps around after ~49 days.
	All comparisons that look like a<b will fail once this happens.
	Instead, use signed ((int)(a-b)<0), which may fail if there is more than
	25 days between a and b (should not be happening under normal conditions),
	but is robust to the timer wrapping around.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-07-17  Christophe Fergeau  <cfergeau@redhat.com>

	cursor: Add sanity checks for hotspot x/y values
	The cursor hotspot values have to be inside the cursor bounding box,
	otherwise on X11 this may cause a crash of the application using
	spice-gtk.

	This is the client-side part of
	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864998

	build-sys: Lower gettext requirement
	spice-gtk currently requires gettext 0.19 which is a fairly recent
	release (not available in el7.3 and older, nor in ubuntu 14.04 LTS).
	They both have a gettext newer than 0.18.2, so we can require that.

	Requiring 0.18 or 0.18.1 is throwing automake errors because of our use
	of -Werror, so we side-step this by requiring 0.18.2.

2017-07-17  Pavel Grunt  <pgrunt@redhat.com>

	Do not update .po files with ./autogen.sh && make
	It is enough to update them just before the release (`make dist`)

	Reported-by: Victor Toso <victortoso@redhat.com>

2017-07-17  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Update keycodemapdb submodule
	This brings in 2 bug fixes, one of these is important on RHEL7 to
	workaround an argparser bug with the python2 version it ships.

2017-07-14  Pavel Grunt  <pgrunt@redhat.com>

	gst: Fix build for GStreamer < 1.5.1
	GST_DEBUG_GRAPH_SHOW_FULL_PARAMS is available since that

2017-07-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display-gst: fix format error
	../../src/channel-display-gst.c: In function 'handle_pipeline_message':
	../../src/channel-display-gst.c:289:75: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'gint64 {aka long long int}' [-Werror=format=]
	         gchar *filename = g_strdup_printf("spice-gtk-gst-pipeline-debug-%ld-%s",
	                                                                         ~~^
	                                                                         %I64d
	                                           get_stream_id_by_stream(decoder->base.stream->channel,
	                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	                                                                   decoder->base.stream),
	                                                                   ~~~~~~~~~~~~~~~~~~~~~

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-07-13  Victor Toso  <me@victortoso.com>

	file-xfer: Inform client of errors on init of xfer
	With SpiceFileTransferTask we suggest that Spice clients watch
	(signal) SpiceMainChannel::new-file-transfer so they can follow the
	transfer's progress till the moment it is finished.

	The signal SpiceFileTransferTask::finished informs if an error happens
	to the application.

	This patch solves the problem of SpiceFileTransferTask::finished not
	being emitted when the agent is not connected nor when file-transfer
	is disabled in the host.

	We should first emit SpiceMainChannel::new-file-transfer followed up
	by SpiceFileTransferTask::finished, which is done by the function
	spice_file_transfer_task_completed().

	As channel-main chains up the "finish" signal by removing the
	SpiceFileTransferTask from its GHashTable, we have to change from
	GHashTableIter to a simple GList of keys.

	Related: https://bugzilla.redhat.com/show_bug.cgi?id=1373830
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-07-13  Yuri Benditovich  <yuri.benditovich@daynix.com>

	win-usb-dev: fix device arrival event logic
	https://bugzilla.redhat.com/show_bug.cgi?id=1425961
	If attached new device when one device with the same vid
	and pid already present, the notification is ignored and
	attached device is not redirected (if auto share set) and
	not displayed in USB devices widget.

	This commit reverts older commit f9631cd6f8, which was
	intended to solve problem when bus:addr is sometimes changed when
	using WinUSB. The same commit creates the limitation for automatic
	redirection of second device with the same pid:vid.
	Now the preferred backend for Spice-GTK on Windows is UsbDk.
	In case users of newer WinUSB will still need backward compatible
	behavior, consider backend-aware comparison procedure.

	A device is now identified again by its bus.addr instead of vid:pid.

	Message-Id: <1499232106-16448-1-git-send-email-yuri.benditovich@daynix.com>
	Acked-by: Uri Lublin <uril@redhat.com>
	[ Marc-André - Added commit comment from Uri's review. ]

2017-07-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release notes for v0.34

	build-sys: update po files
	As a result of make update-po (needed for make clean distcheck).

	build-sys: modernize gettext
	intltool and glib-gettext are somehow related, and upstream gettext
	should now support everything needed for GNOME projects.

	intltool support never really worked, and we removed some of its
	commented usage a while ago when dropping spicy desktop/mime.

	build-sys: use git.mk GITIGNORE_*

2017-07-11  Victor Toso  <me@victortoso.com>

	display-gst: Debug video pipeline on stream-start message
	On GST_MESSAGE_STREAM_START our stream is about to start and it seems
	a good moment to debug GStreamer pipeline if requested.

	That we can do with GST_DEBUG_BIN_TO_DOT_FILE() which iterates
	recursively in the whole pipeline and generates a dot file with all
	the information, the filename is:
	  spice-gtk-gst-pipeline-debug-$stream_id-$video_codec.dot

	One can generate png image out of this dot file with the command:
	  dot -Tpng -oimage.png spice-gtk-gst-pipeline-debug.dot

	Note that GST_DEBUG_BIN_TO_DOT_FILE() will only work if Gstreamer was
	configured with --gst-enable-gst-debug and the environment variable
	GST_DEBUG_DUMP_DOT_DIR was properly set.

	Full example:

	1) GST_DEBUG_DUMP_DOT_DIR=/tmp remote-viewer ...
	2) dot -Tpng -oimage.png spice-gtk-gst-pipeline-debug.dot

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	channel-display: keep one struct array for video-codecs data
	On channel-display.c, for each SpiceVideoCodecType we need:
	 - Its enum type;
	 - The associated capability;
	 - A name;

	On channel-display-gst.c, for each SpiceVideoCodecType we need:
	 - Associated decoding elements for the pipeline;
	 - Associated GstCaps, also for the video pipeline;

	Follow up patch will need the associated name for given
	SpiceVideoCodecType.

	Moving gst_opts[] array to channel-display-priv.h to be reused. This
	should also make slightly simpler when supporting a new video codec in
	the future.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-07-11  Pavel Grunt  <pgrunt@redhat.com>

	usb-manager: Fix docstring annotation
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-07-10  Victor Toso  <me@victortoso.com>

	display-gst: Use Playbin for GStreamer 1.9.0 onwards
	The Playbin can provide the full pipeline which reduces the
	overall maintenance in the code as we don't need to track which
	decoder can work with our stream type.

	We need to maintain the GstCaps per SPICE_VIDEO_CODEC_TYPE in order to
	tell Playbin the type of data we expect. This much should be covered
	by spice-protocol and very likely we will need to extend it in the
	future to allow more settings that might not possible to verify at
	runtime.

	This patch keeps previous code for compatibility reasons.

	Note that we have to wait Playbin to emit "source-setup" in order to
	configure GstAppSrc with the capabilities of input stream. If in the
	unlikely event of frames arriving while GstAppSrc is not setup, we
	will drop those frames.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	display-gst: check GstRegistry for decoding elements
	With this patch, we can find all the elements in the registry that are
	video decoders which can handle the predefined GstCaps.

	Main benefits are:
	- We don't rely on a predefined list of GstElements. We don't need to
	  update them;
	- debugging: It does help to know what the registry has at runtime;

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	display-gst: move "caps=" from struct to pipeline
	This way we have a map of the necessary GstCaps to a given
	SPICE_VIDEO_CODEC_TYPE.

	This patch is also a preparatory patch to:

	- Identify which GstElements in GstRegistry can handle this GstCaps

	- Use Playbin as wrapper to all elements beside GstAppSrc and
	  GstAppSink. In this case, we should rely on GstCaps to reduce
	  typefind errors as we should know what kind of data is expected

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	display-gst: include capabilities for h264
	As the comment states, incomplete GstCaps for h264 could trigger
	errors in h264parse element, such as:

	  gst_h264_parse_set_caps: video/x-h264 caps without
	  codec_data or stream-format

	This would make h264parse to ignore the capabilities that were set.

	As spice-server is encoding as byte-stream it should be fine to set
	this value here too.

	Any other errors to h264 format should either be reported to
	GStreamer or fixed by improving the spice-protocol.

	The follow up patch will identify elements in GstRegistry based on
	GstCaps so this is a necessary change to have.

	This is also a preparatory patch to use Playbin element to create the
	pipeline. Without this, Playbin or typefind will fail to recognize the
	stream as H264.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	display-gst: remove SPICE_GSTVIDEO_AUTO check
	The intention behind SPICE_GSTVIDEO_AUTO environment variable was to
	easily test the decoding elements given by GStreamer while using the
	decodebin element in our pipeline.

	The usage of decodebin was disabled by default as it could trigger
	different issues such as the usage of unstable vaapi elements [0].

	[0] See: https://bugs.freedesktop.org/show_bug.cgi?id=90884

	A follow-up patch will use playbin to create the pipeline. Playbin is
	very similar to decodebin but it'll provide the whole pipeline which
	should bring less maintenance to spice-gtk.

	Further notes:
	- Vaapi elements are more stable now and it should not be a problem to
	  use it.
	- At this moment, there is no automatic enforcement from spice-gtk to
	  make usage of any video-codecs besides mjpeg. Application would need
	  to send preferred-video-codec-type message to trigger video decoding
	  with GStreamer.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	display-gst: check codec type before creating decoder
	Inserting this check in channel-display-gst.c as the GStreamer decoder
	is the only one handling all the different video formats supported by
	spice-protocol.

	If a unsupported/bad codec type value was sent, spice-gtk will fail to
	create the decoder and any messages related to this stream-id will be
	ignored.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-06-30  Pavel Grunt  <pgrunt@redhat.com>

	spice-channel: Factor out code for storing caps
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-06-29  Pavel Grunt  <pgrunt@redhat.com>

	spice-channel: Store the caps correctly
	The commit babe5630d5d3242b1d186cccdd5b4d51debe78e9 forgot to update
	position of the caps pointer making remote caps to not be stored.

	That cause strange behavior in remote-viewer - it always opened window
	for each remote display.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-06-26  Pavel Grunt  <pgrunt@redhat.com>

	usb-device-widget: Fix parent class type
	The widget is defined as GTK_TYPE_BOX, use GtkBox instead of GtkVBox.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-06-22  Jakub Janků  <janku.jakub.jj@gmail.com>

	main: Handle file-xfer detailed errors
	Log appropriate error messages when we receive
	VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED,
	VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED,
	VD_AGENT_FILE_XFER_STATUS_DISABLED.
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-06-20  Christophe de Dinechin  <dinechin@redhat.com>

	Remove warning about unused variable when building on macOS
	On macOS, neither of the two cases implemented in set_mouse_accel applies.
	We get the following eror message:

	  CC       spice-widget.lo
	spice-widget.c:944:26: error: unused variable 'd' [-Werror,-Wunused-variable]
	    SpiceDisplayPrivate *d = display->priv;

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	Avoid clang warnings on casts with stricter alignment requirements
	For example, something like this:
	    uint8_t  *p8;
	    uint32_t *p32 = (uint32_t *) p8;

	generates a warning like this:
	  spice-channel.c:1350:10: error: cast from 'uint8_t *' (aka 'unsigned char *') to
	      'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to
	      4 [-Werror,-Wcast-align]

	The warning indicates that we end up with a pointer to data that
	should be 4-byte aligned, but its value may be misaligned. On x86,
	this does not make much of a difference, except a relatively minor
	performance penalty. However, on platforms such as older ARM, misaligned
	accesses are emulated by the kernel, and support for them is optional.
	So we may end up with a fault.

	The intent of the fix here is to make it easy to identify and rework
	places where actual mis-alignment occurs. Wherever casts raise the warning,
	they are replaced with a macro:

	- SPICE_ALIGNED_CAST(type, value) casts value to type, and indicates that
	  we believe the resulting pointer is aligned. If it is not, a runtime
	  warning will be issued if you configure with --enable-alignment-warnings.

	- SPICE_UNALIGNED_CAST(type, value) casts value to type, and indicates that
	  we believe the resulting pointer is not always aligned. A debug message
	  is issued if you configure with --enable-alignment-warnings.

	Any code using SPICE_UNALIGNED_CAST may need to be revisited in order
	to improve performance, e.g. by using memcpy. A few easy fixes have been
	made in his patch.

	Add check for macOS and macOS specific define to allow ucontext

	Remove trailing space

2017-06-20  Pavel Grunt  <pgrunt@redhat.com>

	Unrealize egl display only if it has context
	Avoids a critical to be logged when closing remote-viewer:
	 "gl_make_current: assertion 'd->egl.context_ready' failed"

	Allow to build without X11 gdk backend

2017-06-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	option: deprecate a few esoteric options from --spice group
	I propose to deprecate the options that have very unclear results, or
	that are unimplemented by drivers. They were added for historical
	reasons, mostly to match with spicec options, but aren't
	user-friendly. Some of them could be moved in spicy options or a new
	debug/tune option group. For now, mark them as deprecated so they can
	be removed in a future release.

	Imho, --spice-preferred-compression is a good candidate too, although
	users may be more familiar with this option, at least the 'off' case
	may have a clear impact.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-06-15  Snir Sheriber  <ssheribe@redhat.com>

	Grab keyboard based on focus in windows client
	Currently the client grabs keyboard based on session focus, on windows
	environment gtk sends grab_broken if wm_killfocus is received (when
	focus is changed) while the application has the grab. It means that
	when grab is based on the session, clicking inside focusless window
	will cause wm_killfocus to be sent towards the focused window, this
	will generate grab_broken event which follows by no grab at all.

	This patch expands the solution presented in 143ebfd to work also on
	windows client without causing grab_broken event.
	This is implemented a bit differently from linux, if on mouse entrance
	session already has focus, focus will be set to the current window,
	this will generate focus events that will release and take grab again
	without grab_broken event.

	Resolves: rhbz#1429611
	Related: rhbz#1275231

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-06-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	util: replace SPICE_BYTESWAP16 with GUINT16_SWAP_LE_BE
	SPICE_BYTESWAP* macros where introduced at a time when spice didn't
	depend on glib (that feels quite long ago). Those macros seem to be
	copied & adapted from glib.

	In any case, that's the only direct user in spice-gtk, we can use the
	glib version instead, so one day SPICE_BYTESWAP* could eventually be
	removed.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	build-sys: replace SPICE_DEPRECATED with G_DEPRECATED
	The generic G_DEPRECATED* macros got introduced in 2.32, and spice-gtk
	depends on 2.36. We can drop our own.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	build-sys: remove -DSPICE_DISABLE_ABORT
	spice-gtk doesn't use spice_abort().

	SPICE_DISABLE_ABORT was mostly used to change default abort behaviour
	on criticals in spice-common, but since it works fine without this
	flag since 2012 (commit 05a203af120016), we can safely remove that
	unused define from spice-gtk.

	Acked-by: Victor Toso <victortoso@redhat.com>

	widget: switch 'display' type to DisplayChannel*
	This avoids the long casts. The Channel* type is less commonly used.

	Acked-by: Victor Toso <victortoso@redhat.com>

	widget: call gl-draw when skipping draw
	It's a bad idea to hold the GL scanout for a long time, especially in
	error cases. (fwiw, qemu has 1s tolerance before complaining, and the
	guest is most likely going to hang meanwhile, stuck on the GPU)

	Acked-by: Victor Toso <victortoso@redhat.com>

	widget: skip spice_egl_resize_display() if context is not ready
	And call spice_egl_resize_display() when initializing the context.

	The display must not call spice_egl_resize_display() if the egl/gl
	context isn't ready. set_egl_enabled() is called whenever we get gl
	drawing command from spice server. But the egl/gl context may not be
	ready at that time. That function must still be run to switch the
	display to GL, but has to delay any GL call to after the GL context is
	realized.  Add spice_egl_resize_display() there, to do the remaining
	egl setup.

	This fixes the "Couldn't find current GL or GLX context" error for me
	on X11. I thought first it was somehow related to commit a395ac59447de
	"spice-widget: init egl only after first gl_scanout", but reverting it
	didn't solve the problem, there are other timing changes, probably at
	gtk level.

	Acked-by: Victor Toso <victortoso@redhat.com>

	egl: add a precondition on gl_make_current()
	To ease with debugging GL issues.

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-06-07  Frediano Ziglio  <fziglio@redhat.com>

	fix check for 16 bit cursor mask
	The size was computed using a 32 bit image while the cursor was
	just 16 bit. This caused the usage of some invalid bit mask (the
	bit mask is used to understand where the cursor is transparent).
	This was clearly visible as the mouse cursor was usually mostly
	black with some apparently random transparent pixels.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-05-31  Jakub Janků  <janku.jakub.jj@gmail.com>

	main: Handle lack of free space for file transfer
	Agent can send FileXferStatusMessage with result
	VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE together with info about
	amount of available free space when the file to transfer is too large
	and the client announces support of this result by sending
	VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-05-31  Frediano Ziglio  <fziglio@redhat.com>

	Use cursor->data instead of row data
	data and cursor->data contains the same data (see the memcpy
	above) but data is not aligned to uint32_t and require also
	additional casts. Using cursor->data avoid these issues.

	Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>

	Remove link_msg from _SpiceChannelPrivate
	The field is used only to initialize a buffer allocated
	inside spice_channel_send_link

	Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>

2017-05-31  Christophe de Dinechin  <dinechin@redhat.com>

	Avoid warning about snprintf on non-Linux platforms
	Without #include <stdio.h>, calls to snprintf in the file
	cause a warning. The file <unistd.h> is left aside on purpose,
	since src/usbutil.c may be compiled on Windows where this
	file does not exist.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-05-29  Pavel Grunt  <pgrunt@redhat.com>

	widget: Return early on cursor set without shape
	A cursor pixbuf is required in other functions to work properly
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-05-26  Pavel Grunt  <pgrunt@redhat.com>

	widget: Set cursor during construction
	In a multimonitor environment can easily happen that a cursor is set
	before some of the SpiceDisplays are created. IOW the first created
	SpiceDisplay has the cursor but others don't.

	To avoid the issue set the initial cursor using the "cursor" property
	of the SpiceCursorChannel.

	Resolves:
	https://bugzilla.redhat.com/show_bug.cgi?id=1411380
	Acked-by: Victor Toso <victortoso@redhat.com>

	Deprecate "cursor-set" signal
	Use cursor notify instead

	Related:
	https://bugzilla.redhat.com/show_bug.cgi?id=1411380

	Acked-by: Victor Toso <victortoso@redhat.com>

	cursor: Add cursor shape property
	It provides information about the remote cursor similar to the signal
	"cursor-set". The benefit over the signal is that the property can be
	queried at any time.

	Users of the "cursor-set" signal should migrate to "notify::cursor".

	Related:
	https://bugzilla.redhat.com/show_bug.cgi?id=1411380

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-05-25  Victor Toso  <me@victortoso.com>

	gtk-session: move variables to internal scope
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	gtk-session: move atom's debug
	We already iterate in all n_atoms and get its name with
	gdk_atom_name(), let's move the debug there too;

	While at it, move the generic SPICE_DEBUG of the function to the top.
	It should help us identify when the function was triggered but not
	used due the early returns.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	gtk-session: do an early check of clipboard grab
	As we will not be doing anything in case clipboard is already grabbed

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	gtk-session: use clear variable for array's size
	By using 'num_types' variables, we have a clear variable with a clear
	purpose: It will track the number of VD_AGENT_CLIPBOARD types we are
	storing in types[] array.

	This new variable helps:
	- removing one 'for' loop which was counting the number stored types;
	- doing fewer iterations in one 'for' loop

	A few extra comments were included to clarify what the logic should be
	doing and a extra debug was included to point out situations where the
	desktop has sent us valid clipboard data but none will be sent the
	guest.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-05-23  Victor Toso  <me@victortoso.com>

	spicy: add gstreamer options to command line
	So we can see all available options with spicy --help-gst and set them
	as command line argument.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-05-16  Christophe Fergeau  <cfergeau@redhat.com>

	glz: Remove unused DECODE_TO_SAME array
	This also removes the generation of unneeded _decode methods once this
	array is removed (this causes some warnings otherwise).

	DECODE_TO_SAME was used in the old client, but was never used when this
	code was moved over to spice-gtk.

2017-05-16  Pavel Grunt  <pgrunt@redhat.com>

	doc: Rename argument to match docstring
	Otherwise it appears in undocumented symbols.

	Fixup to f076dd11ce4c83b09350e372307c23c486905d34
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-05-15  Pavel Grunt  <pgrunt@redhat.com>

	doc: Display properties of spice-gtk classes
	It is done by putting their symbols in appropriate sections

	doc: Describe spice_usb_device_manager_disconnect_device_async

	doc: Describe spice_gl_scanout_free

	doc: Remove invalid parameter of property
	Probably copy'n'pasted from the signal description

	doc: Set correct label
	Otherwise it does not appear in the generated documentation

2017-05-12  Pavel Grunt  <pgrunt@redhat.com>

	configure: Fix typo in epoxy checking
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-05-09  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Separate the network code from the display_stream management
	This makes it easier to reuse display_streams for other types of
	video streams should the need arise.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	streaming: Remove the video decoder's dependency on SpiceMsgIn messages
	This improves the separation between networking and the video decoding
	components.
	It also makes it easier to reuse the latter should the client one day
	receive video streams through other messages.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	streaming: Rename SpiceFrame to SpiceGstFrame in the GStreamer decoder
	This emphasizes that this structure is specific to the GStreamer
	decoder.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	streaming: Move SpiceMsgIn parsing to display_handle_stream_create()
	This regroups all the parsing in one place and makes the rest of the
	display_stream code independent from the network messaging details.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	streaming: Document the GStreamer decoding process
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2017-05-09  Christophe de Dinechin  <dinechin@redhat.com>

	build: Check for epoxy/egl.h availability
	This header is not present on OSX. This added check allows to make the
	EGL code conditionally compiled depending on egl.h availability rather
	than only disabling it for win32 builds.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-05-02  Christophe de Dinechin  <dinechin@redhat.com>

	Fix unsatisfied symbol from export list if USE_USBREDIR is not set
	Without this fix, we get the following error message on macOS:

	Undefined symbols for architecture x86_64:
	  "_spice_usb_device_get_libusb_device", referenced from:
	     -exported_symbol[s_list] command line option

	The function is defined under `#ifdef USE_USBREDIR`, but is always exported
	in spice-glib-sym-file.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-04-26  snir sheriber  <ssheribe@redhat.com>

	Remove redundant space from error message
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-04-20  Yuri Benditovich  <yuri.benditovich@daynix.com>

	usb-device-manager: Do not hide devices on client if USB redirection disabled
	https://bugzilla.redhat.com/show_bug.cgi?id=1431137
	When auto sharing of USB devices is enabled in remote-viewer's configuration
	file, Windows spice client hides connected USB devices on client machine even
	if USB redirection is disabled by --spice-disable-usbredir.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-04-18  Victor Toso  <me@victortoso.com>

	file-xfer: Fix bad filename encoding
	Manual for G_FILE_ATTRIBUTE_STANDARD_NAME states:
	 > The name is the on-disk filename which may not be in any known
	 > encoding, and can thus not be generally displayed as is.

	Considering a file named "ěščřžýáíé", if we use
	G_FILE_ATTRIBUTE_STANDARD_NAME to get the file name, we will have the
	following 72 bytes long string:
	"\xc4\x9b\xc5\xa1\xc4\x8d\xc5\x99\xc5\xbe\xc3\xbd\xc3\xa1\xc3\xad\xc3\xa9"

	This is a regression introduced at 4647ac9a2a72c98b6841180ccf5f8d

	Possible solutions are:
	1) Using G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute;
	2) Using g_file_info_get_attribute_byte_string() function;
	3) Using the g_file_get_basename() which was used before 4647ac9a2a72c9

	Using option 2 based on better long term solution.
	This give us the correct 18 bytes long utf-8 string to "ěščřžýáíé"

	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1440206
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-04-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add default .gitpublish profile
	Can be quite handy for git-publish users like me.
	(https://github.com/stefanha/git-publish)

	Acked-by: Victor Toso <victortoso@redhat.com>

	build-sys: update git.mk
	Reviewed-by: Victor Toso <victortoso@redhat.com>

	build-sys: update spice-common submodule
	- log: Follow spice style guidelines for #include in log.h
	- log: Add missing stdio.h include
	- build-sys: don't dist spice-protocol.html

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-03-28  Victor Toso  <me@victortoso.com>

	audio: debug audio codec when audio stream starts
	We already debug a few parameters but the audio codec is missing.

	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1436249
	Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>

2017-03-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Revert "build-sys: update git.mk"
	This reverts commit 243357cbc18db92b2b301c4c89ee9431fd12e0b1.

	Revert "build-sys: remove intltool"
	This reverts commit c13b3eb0c4773edbe2d26a8f9732f305eeb342ce.

	build-sys: remove intltool
	It never really worked, and we removed some of its commented usage a
	while ago when dropping spicy desktop/mime.

	build-sys: update git.mk

2017-03-27  snir sheriber  <ssheribe@redhat.com>

	authentication: Handle failed spice authentication
	Changing the name of the failures handling function (spice
	and sasl authentication failures are now treated separately)
	and display more suitable spice authentication failure error
	message.

	Resolves: rhbz#1365736

	authentication: Handle failed SASL authentication separately
	Move SASL authentication failures handling to a separate
	function.

	Multiple error messages asking for username\password were
	removed because they are not necessarily the reason for the
	failure (avoiding similar issue as in rhbz#1365736).
	Letting the user know about required username\password
	should be achieved by setting specific Gerror's error code
	and enabling\disabling the username\password fields
	accordingly by the application.

2017-03-27  Pavel Grunt  <pgrunt@redhat.com>

	widget: Always call gtk_widget_show_all
	Since spice-gtk 0.32 SpiceDisplay widget internally has changed
	from the GtkDrawingArea to a GtkContainer.

	Per gtk_widget_show documentation:
	 "Remember that you have to show the containers containing a widget,
	  in addition to the widget itself, before it will appear onscreen."

	Let's always call gtk_widget_show_all, not just for gtk+ >= 3.16
	otherwise you may get a blackscreen with spice-gtk compiled against
	an old gtk+ version.

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=100251

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-03-27  Victor Toso  <me@victortoso.com>

	channel-webdav: include comment about message handling
	Channel-webdav does not handle any other message besides
	SPICE_MSG_SPICEVMC_DATA it wants to let SpiceVmcInputStream handle it
	and the same to deal when sending data to the server with
	SPICE_MSGC_SPICEVMC_DATA using SpiceVmcOutputStream.

	The other Spice messages are dealt in its parent class channel-port
	and handled in channel-webdav handling port-event signal.

	This patch also renames webdav_handle_msg -> webdav_handle_data_msg
	for the reason described above.

	Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

2017-03-24  Pavel Grunt  <pgrunt@redhat.com>

	Use macro for more precise widget debugs
	DISPLAY_DEBUG provides information about channel and monitor ids.
	In case of multimonitor it helps to identify the owner of the debug
	message.
	Acked-by: Victor Toso <victortoso@redhat.com>

	widget: Extend mouse mode debug
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-03-23  Pavel Grunt  <pgrunt@redhat.com>

	widget: Use deprecated function to ungrab device
	Avoid broken grab (alt+tab not working), regression since
	 ef7a6fa1798c8e53c0b77330b398a78181cf90e5

	Currently it is not possible to ungrab just keyboard/mouse
	using GdkSeat functions:
	 https://bugzilla.gnome.org/show_bug.cgi?id=780133
	Use deprecated gdk_device_ungrab to do it

	Acked-by: Snir Sheriber <ssheribe@redhat.com>

2017-03-13  Victor Toso  <me@victortoso.com>

	Revert "channel-display: new stream-video-codec-type property"
	This reverts commit 00f56647a97a95342f235ef6d107ac8216aa9e49.

	As this take no consideration to multiple streams.

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	Revert "spicy: improve status label with stream information"
	This reverts commit 9a7ae78aa94f4eada3fa85e9fd7dfac681aadd6d.

	As we are going to revert 00f56647a97a95 "channel-display: new
	stream-video-codec-type property"

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	spicy: improve status label with stream information
	By using stream-video-codec-type property, we can display which
	video-codec is being used.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	spicy: keep status of mouse/agent on server mode
	So we can still check the agent status even in server mode.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	channel-display: new stream-video-codec-type property
	This is a per channel-display property that stores and notifies the
	video-codec type being used if a stream is being used or 0 if there is
	no ongoing stream.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-03-13  Pavel Grunt  <pgrunt@redhat.com>

	README: Update link to virt-viewer
	Acked-by: Snir Sheriber <ssheribe@redhat.com>

2017-03-13  snir sheriber  <ssheribe@redhat.com>

	Adding test to gitlab ci
	Disable some capabilities and try make

	Add .gitlab-ci.yml

2017-03-10  Victor Toso  <me@victortoso.com>

	gstaudio: Remove fixed TODOs about setting record volume
	* directsoundsrc doesn't support IDirectSoundBuffer_SetVolume

	This was fixed by 1b564bfb8b0db in gst-plugins-bad, see:
	https://bugzilla.gnome.org/show_bug.cgi?id=744383

	* pulsesrc doesn't support volume property, it's all coming!

	This was fixed by 1f4bb687940f87a0 in gst-plugins-good, see:
	https://bugzilla.gnome.org/show_bug.cgi?id=595055

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-03-10  Pavel Grunt  <pgrunt@redhat.com>

	main: Handle disabled file transfer
	File transfer can be disabled by the server or agent, it is
	signalized by the VD_AGENT_CAP_FILE_XFER_DISABLED set.

	Do not try to transfer files when the capability is set.

	Related: rhbz#1373725

	Acked-by: Victor Toso <victortoso@redhat.com>

	build-sys: Use AM_PATH_PYTHON to find PYTHON interpreter
	It is more suitable for the task than AC_PATH_PROGS
	Also it prevents us from forcing a version of Python

	https://www.gnu.org/software/automake/manual/html_node/Python.html

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	m4: Drop unused AM_CHECK_PYTHON_HEADERS
	Unused since we dropped python bindings
	0917002c48a0a5deb615d120a0e5997eefc89fd4
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	Update submodules
	Allow to compile without warnings with the new OpenSSL
	Add missing import in the keymap generator

	spice-common:
	Frediano Ziglio (1):
	      region: Avoid possible memory corruption

	Jonathon Jongsma (1):
	      Document REGION_TEST_* bitmasks

	Sebastian Andrzej Siewior (1):
	      ssl: Use ASN1_STRING_get0_data instead of ASN1_STRING_data

	keycodemapdb:
	Daniel P. Berrange (1):
	      Add ability to generate Perl POD docs for key map names & values

	Pavel Grunt (1):
	      keymap-gen: Import sys
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	dist: Keep generated keymaps
	spice-gtk does not have to require python

	Regression since 271222e2217bf82644d87649b43b920240430f8

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-03-10  Christophe Fergeau  <cfergeau@redhat.com>

	doc: Mention python in the git build requirements

	doc: Remove perl(Text::CSV) references
	It's no longer used since commit e271222e "Switch over to using
	keycodemapdb submodule"

2017-03-06  Victor Toso  <me@victortoso.com>

	spicy: use gboolean for GtkSettings properties
	As gboolean is 4 bytes long while bool is 1 byte, valgrind will complain
	about it.

	Invalid write of size 4
	   at 0xAE9F4FB: value_lcopy_boolean (gvaluetypes.c:78)
	   by 0xAE7CFD3: g_object_get_valist (gobject.c:2236)
	   by 0xAE7D40B: g_object_get (gobject.c:2324)
	   by 0x40758F: keyboard_grab_cb (spicy.c:566)
	   by 0xAE753E4: g_closure_invoke (gclosure.c:804)
	   by 0xAE87431: signal_emit_unlocked_R (gsignal.c:3635)
	   by 0xAE9005E: g_signal_emit_valist (gsignal.c:3391)
	   by 0xAE9043E: g_signal_emit (gsignal.c:3447)
	   by 0x4E4A6FB: try_keyboard_grab (spice-widget.c:889)
	   by 0x4E4CAB1: focus_in_event (spice-widget.c:1834)
	   by 0x9325E70: _gtk_marshal_BOOLEAN__BOXEDv (gtkmarshalers.c:131)
	   by 0xAE75561: _g_closure_invoke_va (gclosure.c:867)

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-03-06  Daniel P. Berrange  <berrange@redhat.com>

	Switch over to using keycodemapdb submodule
	Consume the keymaps.csv file from a git submodule instead of having
	a private copy. This makes it easier to ensure all users of the keymap
	(libvirt, gtk-vnc, spice-gtk, and eventually QEMU) to have a consistent
	set of data.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-03-06  Pavel Grunt  <pgrunt@redhat.com>

	spicy: Add dialog for precise resizing
	It helps when testing whether the guest resizes to requested resolution

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-03-02  Victor Toso  <me@victortoso.com>

	spice_channel_read_wire: move variables to internal scope
	And avoid single line if plus comment

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	spice_channel_read_wire: prefer while(TRUE) instead of goto
	Although this is likely to be a single loop iteration based on the
	implementation of g_coroutine_socket_wait(), using goto to reiterate
	in the code should be avoided based on spice style recommendation.

	This also make it easier to add follow up changes that can increase
	the loop iterations.

	This patch changes:
	 * The reread label with a while(TRUE);
	 * The goto keyword with continue;

	All other changes are only related to new indentation.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	spice-channel: move out non blocking logic of _flush_wire()
	This patch introduces spice_channel_flush_wire_nonblocking() helper
	without changing any logic.

	Related: https://bugs.freedesktop.org/show_bug.cgi?id=96598
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	spice-channel: move out non blocking logic of _read_wire()
	This patch introduces spice_channel_read_wire_nonblocking() helper
	without changing any logic.

	Related: https://bugs.freedesktop.org/show_bug.cgi?id=96598
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-03-02  Pavel Grunt  <pgrunt@redhat.com>

	spice-display: Check validity of cursor before unref
	Since 62f9144d6c5ac06cd76b76176644622c43c08541 the mouse cursor
	is created when the widget is realized. The unref must be prevented.

	The issue can happen when connecting using remote-viewer to
	a multimonitor VM.

2017-03-01  Victor Toso  <me@victortoso.com>

	display-mjpeg: free queue
	24 bytes in 1 blocks are definitely lost in loss record 4,300 of 14,518
	   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
	   by 0xB12C5B8: g_malloc (gmem.c:94)
	   by 0xB144B12: g_slice_alloc (gslice.c:1025)
	   by 0xB14513D: g_slice_alloc0 (gslice.c:1051)
	   by 0x50EE096: create_mjpeg_decoder (channel-display-mjpeg.c:310)
	   by 0x50B5ACC: display_handle_stream_create (channel-display.c:1230)
	   by 0x50AAEE3: spice_channel_handle_msg (spice-channel.c:3014)
	   by 0x50A7AE4: spice_channel_recv_msg (spice-channel.c:2024)
	   by 0x50A829D: spice_channel_iterate_read (spice-channel.c:2262)
	   by 0x50A84B0: spice_channel_iterate (spice-channel.c:2300)
	   by 0x50A926B: spice_channel_coroutine (spice-channel.c:2588)
	   by 0x50F0D10: coroutine_trampoline (coroutine_ucontext.c:63)

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-02-27  Victor Toso  <me@victortoso.com>

	gtk-session: initialize array without memset
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	gtk-session: check if retrieving clipboard data failed
	In case of failure, the GdkAtom *atoms will be set to NULL.
	Including this check to an early return.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	gtk-session: always reply to agent's clipboard request
	This fixes a regression from 7b0de6217670e0f668aff2949f

	We need to reply back to the agent all clipboard requests even in case
	of failure otherwise it will have a pending request. The following
	error message can be seen afterwards, in the linux agent, when client
	sends down some clipboard data:

	 > clipboard: selection requests pending on clipboard ownership
	 > change, clearing

	An easy way to reproduce this is:
	1-) In client, copy image from lo-draw (selection or ctrl+c)
	2-) In guest, paste it to GEdit (mouse3 our ctrl+v)
	3-) Move to the client
	4-) Move back to the guest
	5-) see error on vdagent logs

	The reason for failure is that client's clipboard contains different
	data type (image) then what was requested from guest's editor (text)

	While at it, include extra debug message as it might be hard to
	identify why clipboard did not work.

	Resolves: rhbz#1409854
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-02-27  Francois Gouget  <fgouget@codeweavers.com>

	spicy: Spicy uses GTK+ and must link with it
	This avoids having the linker complain that gtk_toggle_action_get_type()
	or some other GTK+ API is undefined.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	spicy-stats: spicy-stats uses libgobject so link with it
	This avoids having the linker complain that g_signal_connect_data() or
	some other GObject API is undefined.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-02-22  Victor Toso  <me@victortoso.com>

	gtk-session: Use GWeakRef
	The custom WeakRef structure was introduced in 9baba9fd89 (2012) to
	fix rhbz#743773. Since glib 2.32, GWeakRef was introduced and it
	behaves similarly to our WeakRef.

	Moving to GWeakRef to remove some code which exists in glib.

	Note that I'm keeping two utility functions:
	- get_weak_ref(gpointer object): which returns a newly allocated
	  GWeakRef, initialized with @object;
	- free_weak_ref(gpointer pdata): which frees the GWeakRef and returns
	  the original object or NULL. It also takes care of an extra
	  reference to the object.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-02-21  Pavel Grunt  <pgrunt@redhat.com>

	gtk: Avoid deprecated gdk_pointer_grab
	gdk_pointer_grab() was deprecated in 3.0 for gdk_device_grab()
	but that was also deprecated for gdk_seat_grab() in 3.20

	Acked-by: Victor Toso <victortoso@redhat.com>
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	gtk: Avoid deprecated gdk_keyboard_grab
	gdk_keyboard_grab() was deprecated in 3.0 for gdk_device_grab()
	but that was also deprecated for gdk_seat_grab() in 3.20

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	gtk: Use gdk_device_warp
	gdk_display_warp_pointer has been deprecated since Gtk 3.0

	In Wayland gdk_device_warp is noop making server mouse mode
	unusable, see: https://bugzilla.redhat.com/show_bug.cgi?id=1285378

	Acked-by: Victor Toso <victortoso@redhat.com>

	gtk: Use gdk_window_get_device_position
	gdk_window_get_pointer has been deprecated since Gtk 3.0

	Introduce helper functions for getting the display's pointing
	device and modifiers to keep the update_mouse_mode simple

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	gtk: Use gdk_cursor_new_from_name
	gdk_cursor_new has been deprecated since Gtk 3.16

	A difference is that the helper function for creating the cursor
	returns early if the widget is not realized.

	Also allow to hide the cursor under Wayland

	Acked-by: Victor Toso <victortoso@redhat.com>

2017-02-20  Pavel Grunt  <pgrunt@redhat.com>

	gtk-session: Set value directly
	Related Coverity warning:
	 spice-gtk-0.33.53-7cb7-dirty/src/spice-gtk-session.c:920:9: note:
	 Value stored to 'new_len' during its initialization is never read
	 #    int new_len = *len;
	 #        ^~~~~~~   ~~~~
	 #  918|   {
	 #  919|       char *conv = NULL;
	 #  920|->     int new_len = *len;
	 #  921|
	 #  922|       if (spice_main_agent_test_capability(self->priv->main,
	 VD_AGENT_CAP_GUEST_LINEEND_CRLF)) {

	There is no need for the "new_len" variable

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-02-17  Christophe Fergeau  <cfergeau@redhat.com>

	channel: Move local variables to inner block
	Less things to keep track of when taking a quick look at the code flow
	of the spice_channel_load_ca() method.

2017-02-14  Pavel Grunt  <pgrunt@redhat.com>

	keymaps.csv: Add missing columns
	Allow easier processing by scripts and csv editors

	With

	  git diff HEAD^ --word-diff --word-diff-regex='[^[:space:]]'

	you can easily see that there's no difference beside the added
	columns at the end and with a

	  perl -pe 's.[^,\n]..sg' src/keymaps.csv | uniq

	you can see all rows have the same amount of columns

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-02-08  Jonathon Jongsma  <jjongsma@redhat.com>

	Spicy: cancel file transfer when dialog is closed
	Clicking the 'X' to close the file transfer dialog did not actually
	cancel the ongoing file transfer, and resulted in a bunch of critical
	warnings on the terminal. Make the delete-event explicitly cancel all
	ongoing file transfers.

2017-02-08  Victor Toso  <me@victortoso.com>

	file-xfer: avoid g_hash_table_iter_* when changing the GHashTable
	Using g_hash_table_iter_init() and g_hash_table_iter_next() here is
	bad as spice_file_transfer_task_completed() will emit "finished"
	signal from SpiceFileTransferTask resulting in the original GHashTable
	to be changed in file_transfer_operation_task_finished()

	Debug will show:
	  GSpice-DEBUG: spice-file-transfer-task.c:303 File bigfile2 xfer
	  failed: Agent connection closed

	  WARNING **: Agent connection closed

	  GLib-CRITICAL **: g_hash_table_iter_next: assertion 'ri->version ==
	  ri->hash_table->version' failed

	Reported-by: Pavel Grunt <pgrunt@redhat.com>
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	spicy: implement preferred video codec type
	Similar to preferred video compression, a radio button showing mjpeg,
	vp8, vp9 and h264 in case server has the proper [0] capability

	[0] SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	channel-display: implement preferred video codec msgc
	* SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE

	This message was introduced in protocol 0.12.13 to establish client
	side preference on video codec to be used in streams.

	At this moment, we only introduce a new API [0] to select *the*
	preferred video codec for client; In a later time, it should be
	possible to use this message upon connection in order to to give
	higher priority for video codecs with better performance and with
	hardware decoding capabilities.

	[0] spice_display_change_preferred_video_codec_type()

	Note that host preference for encoding is expected to be considered
	first then the client's preference.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-02-06  Pavel Grunt  <pgrunt@redhat.com>

	streaming: Unify codec checking
	Avoid copy-pasting to add a new codec

	Acked-by: Victor Toso <victortoso@redhat.com>

	build-sys: Add VP9 check
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-01-31  Frediano Ziglio  <fziglio@redhat.com>

	Add support for VP9
	Acked-by: Victor Toso <victortoso@redhat.com>

2017-01-31  Victor Toso  <me@victortoso.com>

	Update spice-common
	Frediano Ziglio (1):
	      protocol: Add support for VP9 video codec

	Victor Toso (1):
	      protocol: add preferred video codec message

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2017-01-31  Marc-André Lureau  <marcandre.lureau@redhat.com>

	usb: remove disconnect_device() deprecation warning
	Use a static function instead of the deprecated public function.

	The usage of the function seems to be fine for sync case, since the
	device was already removed, but I added a TODO just in case someone
	looks at this code.

	Acked-by: Victor Toso <victortoso@redhat.com>

	Give a hint about spice_usb_device_manager_disconnect_device() deprecation
	Acked-by: Victor Toso <victortoso@redhat.com>

	audio: fix deprecation warning
	Use a private function to avoid the spice_audio_new() deprecation
	warning.

	Acked-by: Victor Toso <victortoso@redhat.com>

	Revert "audio: Remove spice_audio_new() from the public header"
	This reverts commit c6d9fa1c4af03d9875bf503ce6eabc9e7b52acc3.

	There is no rush to remove a deprecated API from public headers. It's
	better to do that when the whole library breaks API/ABI altogether.

	Acked-by: Victor Toso <victortoso@redhat.com>

	pygtk: remove bindings leftover
	PyGtk 2.0 got removed in 0917002c48a0a5deb615d120a0e5997eefc89fd4,
	remove some remaining files.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-01-24  Pavel Grunt  <pgrunt@redhat.com>

	doc: Remove SpiceGtkBox
	Removed from code in a7565265532f6abec0fd3c6d843683b58eee070a

2017-01-23  Pavel Grunt  <pgrunt@redhat.com>

	keymap: Add missing keys for XF86 and X11
	Broadway backend keymap (vncdisplaykeymap_x112xtkbd.c) was missing
	the "shift" variants of many keys, like:
	 !,@,#,$,%,^,&,*,(,),...
	making its usage very limited. This change allow us to use it at least
	with the EN_US keyboard layout.

	Keys were taken from `xmodmap -pk`.

	To reproduce the issue:
	 brodwayd
	 GDK_BACKEND=broadway spicy
	 firefox 127.0.0.1:8080

	Also add F11/F12/102nd key to XF86 making them available in:
	 vncdisplaykeymap_xorgxwin2xtkbd.c
	 vncdisplaykeymap_xorgkbd2xtkbd.c

	Resolves:
	https://bugs.freedesktop.org/show_bug.cgi?id=99407
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-01-23  Victor Toso  <me@victortoso.com>

	Move spicy tools to its own folder
	So we can have the tools and the libraries in different folders.

	In the src/Makefile.am I've only removed the lines related to the
	tools but not all lines were copied into tools/Makefile.am as we
	don't really need them. Other lines were adjusted to have the paths
	correctly;

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-01-19  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Fix a race condition in the GStreamer frame display queue
	When a frame is late we schedule its display right away with
	g_timeout_add(0, ...).  This scheduling is done in one of the GStreamer
	thread, and the display_frame() callback will be called from the main
	thread. This can result in display_frame() being called before
	g_timeout_add() returns. This would cause the timer_id being reset
	before schedule_frame() had set it so that it would then never be reset.
	So from that point schedule_frame() would always think a frame was being
	displayed and thus would not schedule any more frames resulting in a
	video freeze.

	display_frame() now takes the queues mutex before resetting timer_id
	eliminating the race.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2017-01-11  Sebastian Andrzej Siewior  <sebastian@breakpoint.cc>

	ssl: Use accessors rather than direct struct access
	In OpenSSL 1.1.0, the struct fields are private so we can no longer
	directly access them.

	The accessors are not available in previous OpenSSL releases, so we need
	to add compat helpers.

	ssl: Rework our custom BIO type
	This commit changes to an actual new BIO method rather than reusing an
	existing BIO method, and overriding only the fields that we need.
	The approach before this commit would be causing issues with OpenSSL
	1.1.0 as some of the fields we access have become opaque.

	ssl: Stop creating our own X509_LOOKUP_METHOD
	OpenSSL 1.1.0 does not seem to provide API to do that anymore.

	There is no need to create a custom lookup to begin with. This method
	here has no callbacks implemented and is doing nothing. The way I
	understand it, it is used to retrieve a `lookup' object which provides a
	certificate store.  The SSL ctx provides also such a store.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2017-01-09  Frediano Ziglio  <fziglio@redhat.com>

	streaming: Allows protocol to have more codecs
	The source file contains a list of fixed codecs for streaming.
	This list is tested to include all codecs from spice-protocol.
	If spice-protocol is extended to add more codecs this file starts
	failing to compile due to missing codecs.
	This patch allow to compile supporting less codecs than the
	ones listed in spice-protocol.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-12-22  Victor Toso  <me@victortoso.com>

	win-usb: remove usbclerk
	As we have UsbDk integration now which is well maintained upstream.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-12-19  Victor Toso  <me@victortoso.com>

	Ignore warnings about unavailable function around webdav
	We do an extra check in configure to enable webdav and build everything
	with a PHODAV variable check.

	The warnings below are false positive and can be ignored while we don't
	bump the requirements.

	giopipe.c:481:5: warning: ‘g_simple_io_stream_new’ is deprecated: Not
	available before 2.44 [-Wdeprecated-declarations]

	giopipe.c:482:5: warning: ‘g_simple_io_stream_new’ is deprecated: Not
	available before 2.44 [-Wdeprecated-declarations]

	channel-webdav.c:317:5: warning: ‘g_output_stream_write_all_finish’ is
	deprecated: Not available before 2.44 [-Wdeprecated-declarations]

	channel-webdav.c:339:9: warning: ‘g_output_stream_write_all_async’ is
	deprecated: Not available before 2.44 [-Wdeprecated-declarations]

	channel-webdav.c:375:5: warning: ‘g_inet_socket_address_new_from_string’
	is deprecated: Not available before 2.40 [-Wdeprecated-declarations]

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-12-09  Pavel Grunt  <pgrunt@redhat.com>

	Adjust to spice_marshaller_add_ref rename
	It was renamed in the spice-common submodule

	Submodule update contains following changes:

	Francois Gouget (1):
	      codegen: Fix compatibility with Python 2.6

	Frediano Ziglio (9):
	      Start adding protocol file documentation
	      Start writing some documentation on protocol
	      Extended protocol documentation
	      More work on attribute protocol documentation
	      Fix BNF notation in documentation
	      Add protocol documentation for "channel" and "protocol"
	      Define a new SPICE_VERIFY macro
	      Detect LZ4_compress_fast_continue function
	      marshaller: Remove deprecated replacement functions

	Jonathon Jongsma (1):
	      Marshaller: rename _add_ref() to _add_by_ref()

	Pavel Grunt (5):
	      codegen: Do not generate extra null check
	      silence -Wunused-parameter
	      spice-deps: Fix accidently deleted comment
	      spice-deps: Make LZ4 check depending on function
	      spice-deps: Set python version based on modules availability

	Victor Toso (6):
	      build-sys: requires liblz4 129 or newer
	      Fix gitignore with new docs folder
	      canvas-base: use helper to get surface
	      canvas-base: group ifdef and defined together
	      canvas-base: remove user data from CanvasBase
	      sw-canvas: remove unused defines

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-12-08  Christophe Fergeau  <cfergeau@redhat.com>

	spicy: Disable deprecation warnings
	It still uses GtkUIManager and GtkAction

	Acked-by: Francois Gouget <fgouget@codeweavers.com>

2016-12-08  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Enable deprecation warnings instead of ignoring them entirely
	For Spice-gtk most deprecation issues come from changes outside Spice
	(GLib) and thus should not be treated as errors to not break
	compilation for users who have newer third-party libraries.
	However they must be visible otherwise Spice developers will not be
	aware of them and thus will not fix them before breakage happens.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	gtk: Temporarily ignore the keyboard/mouse grabbing deprecation warnings
	Note that the *_IGNORE_DEPRECATIONS macros are treated as separate
	statements by the compiler so they need to be put in a proper code block
	where appropriate.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-12-02  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Stop streaming if frames cannot be decoded
	Report the stream as invalid if the frames cannot be decoded. This will
	force the server to send regular screen updates instead.

	Acked-by: Victor Toso <victortoso@redhat.com>

	streaming: Report invalid streams to the server
	The error is sent using the existing client stream report message where
	the dropped frame count is maxed out while the received frame count is
	zero. Servers that recognize it can then switch to sending regular
	screen updates for that area so the client is not stuck with a frozen
	area on the screen.
	This can be useful in case the client is unable to decode the stream for
	some reason like a bug in the GStreamer plugins, the decoder not liking
	odd video dimensions, etc.

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-12-01  Victor Toso  <me@victortoso.com>

	channel-usbredir: Fix crash on channel-up
	SpiceSession does not initialize its SpiceUsbDeviceManager object on
	startup that could lead to a race condition where channel-usbredir is
	requested to flush data while it is uninitialized.

	In a few places, spice_usb_device_manager_get() is called as in
	usb-device-widget.c and spice-gtk-session.c but not used in
	spicy-stats, making the tool to crash on startup if it encounters an
	usbredir channel.

	 #0 in usbredirhost_write_guest_data (host=0x0) at usbredir/usbredirhost/usbredirhost.c:876
	 #1 in spice_usbredir_channel_up (c=0x643830) at channel-usbredir.c:821
	 #2 in spice_channel_up (channel=0x643830) at spice-channel.c:1238
	 #3 in spice_channel_recv_auth (channel=0x643830) at spice-channel.c:1225
	 #4 in spice_channel_coroutine (data=0x643830) at spice-channel.c:2580
	 #5 in coroutine_trampoline (cc=0x642ec0) at coroutine_ucontext.c:63
	 #6 in continuation_trampoline (i0=6565568, i1=0) at continuation.c:55

	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1399838

	Reported-by: Michael Cullen <michael@cullen-online.com>
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	channel-main: demote log level from warning to debug
	The volume-async happens when agent announce its capabilities. It is
	common that we don't have a playback stream being played at this time
	and it is even harder for a record stream.

	If the audio back-end does not cache the last volume used or if this
	is the first time the application is launched, this message will be
	seen.

	Failing to get playback or record volume async on startup is very
	common making this warning too worrisome for users.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-11-16  Victor Toso  <me@victortoso.com>

	Revert "win-usb-dev: report error to g_udev_client_new()"
	This reverts commit eba83a7056d4213b60466f692a03e515115b0826.

	This is breaking build in linux as it relies on the actual GUdevClient
	API. Let's simply revert and find a different way to get the error.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-11-15  Victor Toso  <me@victortoso.com>

	win-usb-dev: improve warning message
	With the actual reason for failure. This might help to identify why
	code might be crashing or failing.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	win-usb-dev: let _finalize() do libusb_exit()
	This fixes a hang in mingw-spice-gtk when the GUdevClient fails to
	initialize due to problems in the UsbDk installation.

	Before this patch, libusb_exit() was being called twice:
	- At g_udev_client_initable_init(), after failure with priv->ctx as
	  argument
	- At g_udev_client_finalize() as g_udev_client_initable_init() failure
	  implies the object failed to initialize and it is terminated. Here
	  it was being called with NULL as priv->ctx was set to NULL in
	  g_udev_client_initable_init()

	Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=98686
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	usb-device-manager: handle failures from g_udev_client_new()
	As we must handle when GUdevClient creation can fail otherwise code
	might crash.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	channel-usbredir: handle failure from SpiceUsbDeviceManager
	As spice_usb_device_manager_get() can be NULL
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	win-usb-dev: report error to g_udev_client_new()
	Otherwise application will not be able to know the reason for failure.
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	win-usb-dev: make usage of early return
	No need for if else here.
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-11-14  Victor Toso  <me@victortoso.com>

	file-xfer: do not send unnecessary 0 bytes messages
	This fixes the situation when VDAgent receives 0 byte message
	regarding a file-transfer operation that was terminated in the
	previous message.

	This makes the VDAgent to send a STATUS_ERROR after STATUS_SUCCESS to
	client.

	Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=97227

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-11-14  Frediano Ziglio  <fziglio@redhat.com>

	usb: Allow to compile if LZ4 is disabled
	spice_usbredir_channel_get_spice_usb_device is used only if LZ4
	is enabled so avoid to define if not used as this cause a
	compile error.

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-11-14  Pavel Grunt  <pgrunt@redhat.com>

	vncdisplaykeymap: Include missing headers
	Causing build failures on win32
	 .libs/vncdisplaykeymap.o: In function `vnc_display_keymap_gdk2xtkbd_table':
	  /builddir/build/BUILD/spice-gtk-0.33.19-efbfd/build_win32/src/../../src/vncdisplaykeymap.c:198: undefined reference to `GDK_IS_WIN32_WINDOW'
	 collect2: error: ld returned 1 exit status

	Regression from 9ff67a108bb76e50a2c85a5054e6521088df1800
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	Adjust include header to new location of macros
	minor & major macros were moved to sysmacros.h

	usbutil.c: In function ‘spice_usbutil_get_sysfs_attribute’:
	usbutil.c:110:14: warning: ‘__major_from_sys_types’ is deprecated:
	  In the GNU C Library, `major' is defined by <sys/sysmacros.h>.
	  For historical compatibility, it is currently defined by
	  <sys/types.h> as well, but we plan to remove this soon.
	  To use `major', include <sys/sysmacros.h> directly.
	  If you did not intend to use a system-defined macro `major',
	  you should #undef it after including <sys/types.h>.
	  [-Wdeprecated-declarations]
	              major(stat_buf.st_rdev), minor(stat_buf.st_rdev), attribute);

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-11-10  Christophe Fergeau  <cfergeau@redhat.com>

	gtk-session: Fix typo in comment

2016-10-31  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Use spice-protocol's deprecation macros
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	build-sys: Remove SPICE_NO_DEPRECATED
	The new policy is that deprecation warnings should not be disabled
	globally or even per-file with SPICE_NO_DEPRECATED. Instead they should
	either be fixed, or ignored locally with
	G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	audio: Remove spice_audio_new() from the public header
	It has been deprecated for long enough.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	gdk: Ignore clipboard_get()'s deprecation warnings
	Its implementation is modeled after gtk_dialog_run() which still uses
	these deprecated thread functions.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	vncdisplaykeymap: Remove obsolete GTK+ 2 compatibility macros
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	gtk: Ignore GLib's too-new warnings where we explicitly check its version
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	gtk: Remove an obsolete comment
	The GTK+ compatibility code has been gathered in a single file long ago
	and support for GTK+ 2 has been dropped anyway.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-10-21  Francois Gouget  <fgouget@codeweavers.com>

	spicy: GtkTable is deprecated so use GtkGrid instead
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	spicy: Avoid gtk_hbutton_box_new(); it is deprecated
	Spice-Gtk requires GTK+ > 3.12 which has gtk_button_box_new().

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	spicy: Avoid gtk_vbox_new(); it is deprecated
	Spice-Gtk requires GTK+ > 3.12 which has gtk_box_new().

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-10-20  Victor Toso  <me@victortoso.com>

	channel-display-gst: use a static array for gst options
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	channel-display-gst: style changes in create_pipeline
	Move declaration of variable to top and break big g_strdup_printf
	line.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-10-19  Pavel Grunt  <pgrunt@redhat.com>

	test-session: Fix comparison
	The test was not executed because G_N_ELEMENTS is 0 for the pointer

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-10-17  Pavel Grunt  <pgrunt@redhat.com>

	test-session: Add IPv6 tests

	test-session: Test invalid URIs

	test-session: Also test hostname, username and password

	test-session: Test alternative way for setting port
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-10-17  Victor Toso  <me@victortoso.com>

	clipboard: Fix crash by handling error
	As manual states below, text could be NULL for different reasons and
	we should handle that. I've included a debug message to help
	identifying possible regressions from wayland's clipboard.

	This crash is a regression from 7b0de6217670e0f668aff2949f

	 "The text parameter to callback will contain the resulting text if
	 the request succeeded, or NULL if it failed. This could happen for
	 various reasons, in particular if the clipboard was empty or if the
	 contents of the clipboard could not be converted into text form."

	Resolves: rhbz#1384676

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-10-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	spicy: fix reset of terminal when quit
	Only restore the terminal if it was actually saved.

	Acked-by: Victor Toso <victortoso@redhat.com>

	usb: fix libusb_get_active_config_descriptor()
	I wrongly replaced "assert(!get_active_config())" with
	"if (!get_active_config())" in the previous commit.

2016-10-07  Snir Sheriber  <ssheribe@redhat.com>

	Avoid compression of isochronous devices
	Device is considered isochronous if one of its endpoints is
	defined as isochronous transfer, in that case data transfer
	over the usbredir channel will not be compressed
	(it is assumed that there is a strong correlation between
	isochronous devices and devices which their data is usually
	compressed)

	E.g.
	Camera/mic device will usually be recognised as isochronous
	while storage devices won't

	Message-Id: <1475766822-26809-2-git-send-email-ssheribe@redhat.com>

2016-10-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update NEWS for 0.33 release
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	build-sys: bump spice-glib version
	New symbols in spice-glib, bump before release.

	spicy: only watch stdin if testing org.spice.spicy port
	This fixes starting spicy with a shell in the background with &, spicy
	would hang in tcsetattr().

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-10-05  Victor Toso  <me@victortoso.com>

	tests: fix -Wall -Wextra compiler warnings
	With -Wall a few -Wunused-variable and -Wunused-but-set-variable;
	With -Wextra lots of -Wunused-parameter and a few -Wsign-compare.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-10-03  Victor Toso  <me@victortoso.com>

	tests: set binaries to have 'test' name prefix
	To follow test-spice-uri and test-file-transfer standard.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-09-14  Pavel Grunt  <pgrunt@redhat.com>

	widget: Inform about transfer failure
	Call spice_main_file_copy_finish to get result of the transfer

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-09-09  Pavel Grunt  <pgrunt@redhat.com>

	Remove trailing semicolon

2016-09-07  Frediano Ziglio  <fziglio@redhat.com>

	Ignore modifiers messages if no modifiers changed
	This avoid keep sending modifiers changes if guest is not
	synchronising the changes.

	I consider this as an improving as this avoids client to try again
	and again to force synchronisation however this does not prevent
	every unwanted keystroke insertion which possibly can be a real
	problem on some configurations.

	For instance if guest do not handle caps lock as the client do
	if client uses another modifiers (as num lock) this can force
	inserting virtual caps keypress.

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-09-07  Christophe Fergeau  <cfergeau@redhat.com>

	spicy: fix 'tabled' typo
	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-09-02  Pavel Grunt  <pgrunt@redhat.com>

	clipboard: Return early if check_clipboard_size_limits() fails
	b0a2ff4 "clipboard: Add fixup_clipboard_text helper"
	mistakenly removed some early returns when text conversion fails for
	some reason. This commit readds it.

	util: Remove unused GError parameter
	The parameter is removed from functions:
	 get_line
	 spice_convert_newlines
	 spice_unix2dos
	 spice_dos2unix

	It was introduced in 75f1ea3ee9c4dbd6c5f27896caee07792bbdbba4
	but never used

	Acked-by: Marc-André Lureau <mlureau@redhat.com>
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-09-01  Jonathon Jongsma  <jjongsma@redhat.com>

	Translate file transfer error messages
	If we are to ever display error messages to a user in a UI, they need to
	be translated.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-09-01  Pavel Grunt  <pgrunt@redhat.com>

	file-transfer: Add guards to public functions
	Acked-by: Victor Toso <victortoso@redhat.com>

	file-transfer: Add documentation for public functions
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-09-01  Christophe Fergeau  <cfergeau@redhat.com>

	clipboard: Use gtk_clipboard_request_text for text data
	Currently, when the agent asks us for VD_AGENT_CLIPBOARD_UTF8_TEXT data,
	spice-gtk looks up for the first X11 target which would provide it with
	UTF8_TEXT data, and uses that for the clipboard request. This means we
	will use UTF8_STRING as the target for gtk_clipboard_request_contents().

	However, some applications who can copy and paste text do not
	necessarily support the UTF8_STRING target. This is the case for Motif
	applications which support the STRING target however. It turns out gtk+
	also provides a gtk_clipboard_request_text() method which will try
	several targets (UTF8_TEXT, COMPOUND_TEXT, TEXT), and will ensure the
	returned string is UTF-8, so we can use that when the agent asks us for
	some text data.

	This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1348624

	clipboard: Add fixup_clipboard_text helper
	This makes clipboard_received_cb a bit shorter, and will be useful
	in the next commit.

2016-08-31  Jonathon Jongsma  <jjongsma@redhat.com>

	Add ability to get sizes from SpiceFileTransferTask
	If a client is handling multiple SpiceFileTransferTasks at one time,
	it's not currently possible to provide a single overall progress to the
	user. The only information that the client can get is the percentage
	progress. This patch adds two new properties:
	 - total-bytes: the size of the file transfer task in bytes
	 - transferred-bytes: the number of bytes already transferred

	This allows a client UI to calculate the combined progress for all
	ongoing transfer tasks and present it to the user. Two convenience
	functions were added to retrieve these values:
	 - spice_file_transfer_task_get_total_bytes()
	 - spice_file_transfer_task_get_transferred_bytes()

2016-08-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: remove PKG_PREREQ
	I added it to make sure AC_SUBST happened, but apparently AC_SUBST
	happens with very old pkg-config versions too, no need to check
	pkg-config pkg.m4 version.

2016-08-26  Christophe Fergeau  <cfergeau@redhat.com>

	mouse: Fix pointer grabbing in server mode
	Trying to click on spice-gtk window while in server mode should result
	in a pointer grab. This is currently failing, with the cursor wrapping
	to the top left corner of the window instead without being grabbed.

	This is caused by our use of gtk_event_box_set_above_child(),
	when clicking on the SpiceWidget, the grab is implicitly taken by
	the window which is above the event box (which is an internal
	GtkEventBox input-only GdkWindow). Then when we call gdk_pointer_grab()
	on the GtkEventBox::window, we get a grab-broken event indicating the
	grab was transferred from the internal input-only window to
	GtkEventBox::window (see gtk+ bug
	https://bugzilla.gnome.org/show_bug.cgi?id=769635#c2 for a detailed
	explanation).

	This commit ignores grab-broken events when the GdkWindow who got the
	grab corresponds to the one we called gdk_pointer_grab() on.
	An alternative would be to call gdk_pointer_grab() on the GdkWindow
	which received the button-press-event, but the call chain between
	button_event() and the eventual gdk_pointer_grab() call, so it would be
	not so elegant to pass the correct GdkWindow all the way.

2016-08-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: set keypress-delay to 0 on unix socket
	There is no strong need for keypress-delay on local connection (not
	verified: unless the system is heavily loaded, in which case the VM will
	probably be stuck too and may or not repeat the key when running).

	The benefit of removing keypress-delay is that games or interfaces that
	require "realtime" responses, such as FPS, are slightly better without
	the 100ms input delay.

	Acked-by: Victor Toso <victortoso@redhat.com>

	widget: make set_keypress_delay a function
	So the widget can call it without going through g_object_set().

	Acked-by: Victor Toso <victortoso@redhat.com>

	channel: add read-only socket property
	Channel users (such as spice widget) may want to know some connection
	details. Instead of exposing various connection properties, we may as
	well just have a GSocket property, with a strong warning on usage.

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-08-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: simplify checking for x11
	We no longer need the gtk+-quartz/win32 check, however we can simplify
	the x11 check if building gtk+-x11

	Acked-by: Victor Toso <victortoso@redhat.com>

	build-sys: require recent pkg-config
	So we can drop the AC_SUBST for _CFLAGS & _LIBS variable (since 0.24
	but there is no clean way to check that before PKG_PREREQ in 0.29,
	released last year)

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-08-22  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Fix the VideoDecoder queue_frame() documentation
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-08-19  Ian Stakenvicius  <axs@gentoo.org>

	Add missing libX11 reference to build system
	GTK on its own is not enough to ensure libX11 is properly linked with
	libspice-client-gtk.  This patch adds X11_LIBS to SPICE_GTK_LIBADD_COMMON
	(and X11_CFLAGS to a relevant section as well) in src/Makefile.am, and
	performs an approriate pkg-config based check to determine the correct
	values in configure.ac when not building for win32 or quartz.

	For more info see http://bugs.gentoo.org/585118

2016-08-19  Frediano Ziglio  <fziglio@redhat.com>

	Add Italian .po file.
	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	Initialise gettext library properly
	This will allow internationalisation to work correctly.

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-08-16  Pavel Grunt  <pgrunt@redhat.com>

	Do not require epoxy for Windows
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	widget: Fix rendering issues with CSD on Windows
	Replace GDK_WINDOW_HWND by gdk_win32_window_get_impl_hwnd() which gets
	the HWND directly, without any side effects.

	Related:
	https://bugzilla.redhat.com/show_bug.cgi?id=1352216

	Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>

2016-08-12  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Create the pipeline at the same time as the GStreamer decoder
	This lets create_gstreamer_decoder() fail if it cannot create the
	pipeline it needs, allowing the caller to try fallbacks.
	This also means the pipeline has the same lifetime as the decoder which
	makes it possible to remove a check in queue_frame().

	Acked-by: Victor Toso <victortoso@redhat.com>

	streaming: Don't crash if the stream creation fails
	Note that this implies closing the stream before receiving any frame.

	Acked-by: Victor Toso <victortoso@redhat.com>

	streaming: Don't crash if no frame was received before closing the stream
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-08-12  Jonathon Jongsma  <jjongsma@redhat.com>

	Improve file transfer error messages
	In preparation for potentially displaying error messages to a user in a
	UI, I thought I'd improve the messages slightly.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	Fix docs for SpiceFileTransferTask::progress
	This property actually represents a fractional value from 0 to 1.0, not
	a percentage between 0 and 100.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-08-11  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Check the stream id in display_update_stream_report() too
	It's safer and more consistent than assuming the caller has done the
	check already.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-08-10  Pavel Grunt  <pgrunt@redhat.com>

	vmcstream: Do not disconnect cancellable in coroutine
	It is disconnected when spice_vmc_input_stream_read_all_finish()
	is called.

	Silence many warnings appearing with webdav:
	 GLib-GObject-WARNING **: gsignal.c:2635: instance '0x7fe658015c40' has no handler with id '13555'

	Acked-by: Victor Toso <victortoso@redhat.com>

	channel-webdav: Remove extra SpiceWebdavChannel parameter
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-08-10  Victor Toso  <victortoso@redhat.com>

	file-transfer: improve GHashTable with value_destroy_func
	By using g_hash_table_new_full() we can unref its value which is the
	SpiceFileTransferTask. This makes the code a little bit simpler as
	nowhere we use the xfer-task after removing it from hash table.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	file-transfer: increase reference for channel-main
	SpiceMainChannel uses the SpiceFileTransferTask reference given in the
	hash table provided by spice_file_transfer_task_create_tasks(). That
	means SpiceFileTransferTask is not holding a reference for itself but
	it relies on it due the async calls it provides.

	This patch increases the reference of each SpiceFileTransferTask for
	the hash table which will be unref'ed by channel-main in
	file_transfer_operation_task_finished(); the original reference is
	kept to SpiceFileTransferTask to be freed after the finish signal is
	emitted on spice_file_transfer_task_close_stream_cb().

	This patch fixes some critical warnings as we have two g_object_unref
	but only one reference.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	channel-main: make debug helpful in case of failures
	Debug should come before the g_return_if_fail() otherwise we lose
	important debug data.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	channel-main: improve code to use FileTransferOperation
	Since commit b26818d0e00666 we are grouping all transferred files per
	operation (drag and drop); That leaded to some design flaws in the
	code. The changes suggested in this patch are (in execution order):

	* On spice_file_transfer_task_read_async()
	- Passing FileTransferOperation data so in the callback and in further
	  function calls, we don't need to look for this;

	Note that FileTransferOperation is not freed while any of its
	SpiceFileTransferTask exists and by design they are never finished
	while on pending state, so file_xfer_read_async_cb() should have a
	valid FileTransferOperation pointer.

	* On file_xfer_read_async_cb()
	- Removed unnecessary variables;

	* On file_xfer_flush_async()
	- Using SpiceFileTransferTask as parameter which can retrieve the
	  SpiceMainChannel and the GCancellable;
	- Using SpiceFileTransferTask as source_object for GTask with
	  FileTransferOperation as user_data which is helpful for its
	  callback;

	* On file_xfer_flush_finish() and file_xfer_data_flushed_cb()
	- Using SpiceFileTransferTask as parameter and source_object check for
	  GTask

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-transfer: Move initializations to _task_new()
	This was a request introduced at f6b3b697093a16de to be done after
	moving the SpiceFileTransferTask code to its own file.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-08-05  Christophe Fergeau  <cfergeau@redhat.com>

	wocky: Pass GTask around instead of ConnectAsyncData
	Now that the ConnectAsyncData we need is set as GTask data, we can pass
	around the GTask rather than the ConnectAsyncData instance, and remove
	the GTask pointer from it. We can get the ConnectAsyncData from the
	GTask when needed using g_task_get_task_data().

	wocky: Set ConnectAsyncData instance as GTask data
	Currently, the ConnectAsyncData instance is leaked if for example
	we trigger one codepath calling g_task_return_error(). If we
	associate it with the GTask with g_task_set_task_data(),
	this kind of leak will be avoided.

	wocky: Simplify wocky_http_proxy_connect_finish()
	Rather than returning the whole ConnectAsyncData struct with
	g_task_return_pointer(), we can return only the GIOStream object as this
	is what we are interested in.

	This has the side-effect of fixing a ConnectAsyncData leak as after
	calling g_task_propagate_pointer() the old code had ownership of the
	ConnectAsyncData instance but was never freeing it.

	The leak is:
	==20010== 4,348 (56 direct, 4,292 indirect) bytes in 1 blocks are definitely lost in loss record 20,762 of 20,999
	==20010==    at 0x4C2DA60: calloc (vg_replace_malloc.c:711)
	==20010==    by 0xD0F6EB0: g_malloc0 (gmem.c:124)
	==20010==    by 0x75C0978: wocky_http_proxy_connect_async (wocky-http-proxy.c:359)
	==20010==    by 0xCB4E22C: g_socket_client_connected_callback (gsocketclient.c:1548)
	==20010==    by 0xCB57342: g_task_return_now (gtask.c:1107)
	==20010==    by 0xCB579E5: g_task_return (gtask.c:1165)
	==20010==    by 0xCB4FB1C: g_socket_connection_connect_callback (gsocketconnection.c:236)
	==20010==    by 0xCB47160: socket_source_dispatch (gsocket.c:3543)
	==20010==    by 0xD0F1702: g_main_dispatch (gmain.c:3154)
	==20010==    by 0xD0F1702: g_main_context_dispatch (gmain.c:3769)
	==20010==    by 0xD0F1AAF: g_main_context_iterate.isra.29 (gmain.c:3840)
	==20010==    by 0xD0F1B5B: g_main_context_iteration (gmain.c:3901)
	==20010==    by 0xCB7D58C: g_application_run (gapplication.c:2381)
	==20010==    by 0x41571C: main (remote-viewer-main.c:42)

2016-08-03  Christophe Fergeau  <cfergeau@redhat.com>

	spicy: Fix spice_file_transfer_task_get_filename leak
	It was wrongly annotated as (transfer none)

	An alternative would be to store what is returned by
	g_file_get_basename() in SpiceFileTransferTask and return that, this
	would allow to make spice_file_transfer_task_get_filename() (transfer
	none) without leaking memory.

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-08-03  Victor Toso  <victortoso@redhat.com>

	channel-main: avoid race around file-transfer flush
	This patch avoids a race condition. The race happens when we mark the
	xfer-task as completed by receiving VD_AGENT_FILE_XFER_STATUS_SUCCESS
	message while the flush callback was not yet called.

	The flush callback is file_xfer_data_flushed_cb() and it might not be
	called immediately after data is flushed.

	The race can be verified while transferring several small files at
	once. I can see it often with more then 50 files in one transfer
	operation.

	This fix implies that SpiceMainChannel should check in its async
	callbacks if given SpiceFileTransferTask is completed.

	This patch introduces spice_file_transfer_task_is_completed (internal)
	to help check if spice_file_transfer_task_completed() was called or
	not.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-08-03  Christophe Fergeau  <cfergeau@redhat.com>

	file-transfer: avoid potential leaks
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-08-03  Victor Toso  <victortoso@redhat.com>

	file-transfer: Fix SpiceFileTransferTask::error leak
	The self->error is the error set for the file-transfer and it will be
	propagated with the "finish" signal. As this is transfer none pointer,
	we should not lose its reference on g_task_return_error and we should
	clear it out afterwards.

	40 (16 direct, 24 indirect) bytes in 1 blocks are definitely lost in
	loss record 7,489 of 14,298
	 at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
	 by 0xB5090E8: g_malloc (gmem.c:94)
	 by 0xB51F8A2: g_slice_alloc (gslice.c:1025)
	 by 0xB4EFCC5: g_error_new_literal (gerror.c:471)
	 by 0xB4EFFAD: g_set_error_literal (gerror.c:619)
	 by 0xAF13397: g_cancellable_set_error_if_cancelled (gcancellable.c:314)
	 by 0xAF630C8: g_task_propagate_error (gtask.c:1519)
	 by 0xAF63CD8: g_task_propagate_int (gtask.c:1652)
	 by 0x50863F5: spice_file_transfer_task_read_finish (spice-file-transfer-task.c:477)
	 by 0x5093239: file_xfer_read_async_cb (channel-main.c:1811)
	 by 0xAF62F38: g_task_return_now (gtask.c:1121)
	 by 0xAF63775: g_task_return (gtask.c:1179)

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-08-03  Christophe Fergeau  <cfergeau@redhat.com>

	file-transfer: Fix SpiceFileTransferTask::file_stream leak
	g_file_read_finish() is (transfer full) so we must release the ref
	we got in _dispose() as it's not done anywhere else in the code.

	Acked-by: Victor Toso <victortoso@redhat.com>

	file-transfer: Fix GTask leaks
	The file transfer code calls g_*_async() methods with a GTask as the
	user_data argument. It needs to own a reference to the GTask for the
	duration of the async call to keep the GTask alive, however it was never
	releasing it when it no longer needs it (that is, after calling
	g_task_return_*).

	Some of the leaks fixed by this patch are:

	* GTask leak after flush
	11,232 bytes in 54 blocks are definitely lost in
	loss record 14,018 of 14,071
	 at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
	 by 0xC14A0E8: g_malloc (gmem.c:94)
	 by 0xC1608A2: g_slice_alloc (gslice.c:1025)
	 by 0xC160ECD: g_slice_alloc0 (gslice.c:1051)
	 by 0xBEDBD11: g_type_create_instance (gtype.c:1857)
	 by 0xBEBD7DA: g_object_new_internal (gobject.c:1781)
	 by 0xBEBF11C: g_object_newv (gobject.c:1928)
	 by 0xBEBF89B: g_object_new (gobject.c:1621)
	 by 0xBBA4424: g_task_new (gtask.c:693)
	 by 0x6F8C3C0: file_xfer_flush_async (channel-main.c:899)
	 by 0x6F8C3C0: file_xfer_read_async_cb (channel-main.c:1826)
	 by 0xBBA3F38: g_task_return_now (gtask.c:1121)
	 by 0xBBA4775: g_task_return (gtask.c:1179)

	* GTask leak from spice_main_file_copy_async()
	208 bytes in 1 blocks are definitely lost in
	loss record 13,708 of 15,093
	 at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
	 by 0xC14A0E8: g_malloc (gmem.c:94)
	 by 0xC1608A2: g_slice_alloc (gslice.c:1025)
	 by 0xC160ECD: g_slice_alloc0 (gslice.c:1051)
	 by 0xBEDBD11: g_type_create_instance (gtype.c:1857)
	 by 0xBEBD7DA: g_object_new_internal (gobject.c:1781)
	 by 0xBEBF11C: g_object_newv (gobject.c:1928)
	 by 0xBEBF89B: g_object_new (gobject.c:1621)
	 by 0xBBA4424: g_task_new (gtask.c:693)
	 by 0x6F8EF55: spice_main_file_copy_async (channel-main.c:3084)

	Acked-by: Victor Toso <victortoso@redhat.com>

	test-file-transfer: Don't leak GError
	Acked-by: Victor Toso <victortoso@redhat.com>

	test-file-transfer: Don't leak GFileInfo
	The GFileInfo returned by spice_file_transfer_task_init_task_finish()
	must be unref'ed when no longer needed.

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-07-29  Victor Toso  <victortoso@redhat.com>

	file-transfer: remove unused function for debug
	This is here due bad rebase. It was removed and replaced by patch
	f6072e678ea5 but not removed from 1af22e9652ddcbdd426cd "file-xfer:
	move to spice-file-transfer-task.c", so the function is there, unused.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-07-29  Pavel Grunt  <pgrunt@redhat.com>

	session: Fix IPv6 by using g_network_address_parse
	It supports quoting the address with []

	Regression since ea37f06eaa11b6307c797895aeb85d87d142625a

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1361478

2016-07-29  Christophe Fergeau  <cfergeau@redhat.com>

	vmc: Fix leak in spice_vmc_output_stream_write_finish()
	We own a reference on the GAsyncResult returned by
	g_task_propage_pointer() so we have to g_object_unref() it when we no
	longer need it.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-07-29  Fabiano Fidêncio  <fidencio@redhat.com>

	vmcstream: set the right result for the task
	This bogus code was introduced when switching to GTask API. Seems that
	while writing those patches I just overlooked this part and set the wrong
	result for the task. As part of the problems introduced (and now fixed)
	you can notice that no output stream was being sent to the guest.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-07-28  Pavel Grunt  <pgrunt@redhat.com>

	webdav: Do not reuse cancellable
	Create it on SPICE_PORT_EVENT_OPENED

	From g_cancellable_reset documentation:
	 Note that it is generally not a good idea to reuse an existing
	 cancellable for more operations after it has been cancelled once,
	 as this function might tempt you to do. The recommended practice is
	 to drop the reference to a cancellable after cancelling it, and let it
	 die with the outstanding async operations. You should create a fresh
	 cancellable for further async operations

	In our case reusing the cancellable leads to a crash:
	 #0  0x00007ffff1662940 in g_task_return_error () at /lib64/libgio-2.0.so.0
	 #1  0x00007ffff1662b60 in g_task_return_new_error () at /lib64/libgio-2.0.so.0
	 #2  0x00007ffff57916e0 in read_cancelled (cancellable=<optimized out>, user_data=<optimized out>) at vmcstream.c:182
	 #3  0x00007ffff1391555 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
	 #4  0x00007ffff13a4062 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
	 #5  0x00007ffff13acf5f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
	 #6  0x00007ffff13ad33f in g_signal_emit () at /lib64/libgobject-2.0.so.0
	 #7  0x00007ffff16100d8 in g_cancellable_cancel () at /lib64/libgio-2.0.so.0
	 #8  0x00007ffff5775c01 in port_event (self=0xc7af60, event=1) at channel-webdav.c:512
	 #9  0x00007ffff1391555 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
	 #10 0x00007ffff13a445d in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
	 #11 0x00007ffff13acf5f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
	 #12 0x00007ffff577479a in emit_main_context (opaque=0x7fffa5fff8d0) at gio-coroutine.c:200
	 #13 0x00007ffff10b7847 in g_idle_dispatch () at /lib64/libglib-2.0.so.0
	 #14 0x00007ffff10bade2 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
	 #15 0x00007ffff10bb160 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
	 #16 0x00007ffff10bb20c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
	 #17 0x00007ffff1677d2d in g_application_run () at /lib64/libgio-2.0.so.0
	 #18 0x000000000041031a in main (argc=2, argv=0x7fffffffd928) at remote-viewer-main.c:42

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=97113

2016-07-28  Lukas Venhoda  <lvenhoda@redhat.com>

	spice-widget: init egl only after first gl_scanout
	When using GtkDrawingArea and EGL was not used, it was still initialized.
	This produced warning messages on systems where EGL is not supported.

	Move spice_egl_init from drawing_area_realize to gl_scanout.

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=95254

2016-07-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	misc: code style
	Brace on new line for functions, 4 spaces indent, seperate end block

	usbredir: fix leaks introduced by lz4 patch
	While reviewing lz4 patch, I found that there are potential leaks. This
	is untested, fyi. It would be nice if someone could confirm with running
	ASAN for example.

	Reviewed-by: Snir Sheriber <ssheribe@redhat.com>

2016-07-27  Frediano Ziglio  <fziglio@redhat.com>

	Handle pause key correctly
	Windows does not like Pause key sent with same scancodes as Break.
	Although is the same physical key the two functions send two completely
	different set of codes. On key press a E1 1D 45 sequence is generated
	while on key release a E1 9D C5 is generated. Also some hardware
	keyboards send press+release at the same time on key press (nothing on
	release).
	Tested with Linux and Windows clients.
	Tested with Linux, Windows and DOS guests.
	On Windows guest VK_PAUSE was not arriving correctly.

	An additional send_pause function was added to avoid to change the
	normal flow too much. This as the keymap table (generated from
	src/keymaps.csv) can hold only one scancode while this key generate two
	scancodes (ie E1-1D and 45) for each event.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-07-26  Frediano Ziglio  <fziglio@redhat.com>

	Support more extension codes
	Not only E0 prefix but also E1 and E2.
	They are used in some special cases, one is the pause key.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-07-14  Jonathon Jongsma  <jjongsma@redhat.com>

	SpiceWidget: limit scope of 'area' variable
	'area' was being set within the 'else' branch, but was not actually
	used. So just move the declaration of 'area' within the if statement
	where it is actually used. This potentially avoids "set-but-not-used"
	warnings when GDK_WINDOWING_X11 is not defined.

2016-07-14  Eduardo Lima (Etrunko)  <etrunko@redhat.com>

	configure: Add ${top_builddir}/spice-common to COMMON_CFLAGS
	This fixes the build when done out of the tree, because of recent commit
	in spice-common with auto-generated files.

2016-07-13  Eduardo Lima (Etrunko)  <etrunko@redhat.com>

	Use correct variable to print if LZ4 support is to be built.

2016-07-11  Snir Sheriber  <ssheribe@redhat.com>

	Usbredir: enable lz4 compression
	Compressed message type is CompressedData which contains compression
	type (1 byte) followed by the uncompressed data size (4 bytes-exists
	only if data was compressed) followed by the compressed data

	If SPICE_SPICEVMC_CAP_DATA_COMPRESS_LZ4 capability is available &&
	data_size > COMPRESS_THRESHOLD && !AF_LOCAL data will be sent
	compressed otherwise data will be sent uncompressed (as well if
	compression has failed)

	Update required spice-protocol to 0.12.12

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-07-11  Victor Toso  <victortoso@redhat.com>

	Update spice-common submodule

2016-07-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	util: fix off-by-one array access
	Thanks to ASAN, I found this off-by-one memory access in the unix2dos
	code:

	/util/unix2dos: =================================================================
	==23589==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000dd2f at pc 0x00000040428e bp 0x7ffd6fc31b90 sp 0x7ffd6fc31b80
	READ of size 1 at 0x60200000dd2f thread T0
	    #0 0x40428d in spice_convert_newlines /home/elmarco/src/spice/spice-gtk/src/spice-util.c:355
	    #1 0x40443a in spice_unix2dos /home/elmarco/src/spice/spice-gtk/src/spice-util.c:382
	    #2 0x401eae in test_unix2dos /home/elmarco/src/spice/spice-gtk/tests/util.c:69
	    #3 0x7fb8bcd81983  (/lib64/libglib-2.0.so.0+0x6e983)
	    #4 0x7fb8bcd81b4e  (/lib64/libglib-2.0.so.0+0x6eb4e)
	    #5 0x7fb8bcd81d5d in g_test_run_suite (/lib64/libglib-2.0.so.0+0x6ed5d)
	    #6 0x7fb8bcd81d80 in g_test_run (/lib64/libglib-2.0.so.0+0x6ed80)
	    #7 0x402cce in main /home/elmarco/src/spice/spice-gtk/tests/util.c:207
	    #8 0x7fb8bc755730 in __libc_start_main (/lib64/libc.so.6+0x20730)
	    #9 0x401818 in _start (/home/elmarco/src/spice/spice-gtk/tests/util+0x401818)

	0x60200000dd2f is located 1 bytes to the left of 4-byte region [0x60200000dd30,0x60200000dd34)
	allocated by thread T0 here:
	    #0 0x7fb8c10421d0 in realloc (/lib64/libasan.so.3+0xc71d0)
	    #1 0x7fb8bcd61f1f in g_realloc (/lib64/libglib-2.0.so.0+0x4ef1f)

	SUMMARY: AddressSanitizer: heap-buffer-overflow /home/elmarco/src/spice/spice-gtk/src/spice-util.c:355 in spice_convert_newlines

	doc: fix unused warning
	Fix gtk-doc warning by ignoring the new private header.

	./spice-gtk-unused.txt:1: warning: 12 unused declarations.They should be
	added to spice-gtk-sections.txt in the appropriate place.

	While at it, fix grabsequence header incorrect file name.

2016-07-07  Victor Toso  <victortoso@redhat.com>

	tests: file-transfer agent cancel
	Agent only can only send error or cancel from a transfer operation
	after it was initialized. From SpiceFileTransferTask point of view,
	error and cancellation is an GError with different code so testing
	only cancel seems enough.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	tests: file-transfer cancel on read async
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	tests: file-transfer cancel on task init
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	tests: file-transfer include simple tests
	This only includes a simple test for file-transfer with a small
	summary of the possible situations of the test.

	As the test is specifically for SpiceFileTransferTask, we don't create
	a SpiceMainChannel.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: move to spice-file-transfer-task.c
	This patch moves:
	* GObject boilerplate
	* External API related to SpiceFileTransferTask
	* Internal API needed by channel-main
	* Helpers that belong to this object

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	main: use xfer_task instead of task or self
	Another patch to rename variable and keep consistency across
	channel-main. Let's avoid task which is common for GTask and self for
	non SpiceMainChannel objects

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: move debug to SpiceFileTransferTask
	This debug information is simple way to check that the file-transfer
	is not stalled. Now that we are using the read-async functions, we can
	move this debug info there and avoid accessing object internals in
	channel-main.c

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: Keep namespace of private function
	Rename:
	* file_xfer_close_cb -> spice_file_transfer_task_close_stream_cb

	As this will be private to SpiceFileTransferTask

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: call user callback once per operation
	SpiceFileTransferTask has a callback to be called when operation
	ended. Til this patch, we were setting the user callback which means
	that in multiple file-transfers, we were calling the user callback
	several times.

	Following the same logic pointed from 113093dd00a1cf10f6d3c3589b7 this
	is a SpiceMainChannel operation and it should only call the user
	callback when this operation is over (FileTransferOperation now).

	Highlights:
	* Now using GTask to set user callback and callback_data
	* Handling error on FileTransferOperation:
	- It is considered an error if no file was successfully transferred due
	  cancellations or any other kind of error;
	- If any file failed due any error, we will consider the operation a
	  failure even if other files succeed.

	Note also that SpiceFileTransferTask now does not have a callback and
	callback_data. The xfer_tasks has ended after its "finish" signal is
	emitted.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: call progress_callback per FileTransferOperation
	Before this patch, the progress_callback is being called from
	SpiceFileTransferTask each time that some data is flushed to the agent
	of this given xfer-task. The progress value is computed by iterating
	on all available xfer-tasks.

	This patch intend to fix/change:

	* The progress_callback should be called only with information related
	  to the FileTransferOperation of given xfer-task; This was also
	  suggested by 113093dd00a1cf10f6d3c3589b7589a184cec081;

	* In case a SpiceFileTransferTask is cancelled or has an error, we
	  remove the remaining bytes (not sent) of this file from the
	  transfer_size;

	* The progress_callback should not be done from SpiceFileTransferTask
	  context by (proposed) design. As the transfer operation starts in
	  spice_main_file_copy_async(), FileTransferOperation should handle
	  these calls.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: inform agent of errors only when task finished
	No need to inform of a problem under
	spice_file_transfer_task_completed() as the task will be finalized and
	we can send the error to the agent there.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: a FileTransferOperation per transfer call
	Each call to spice_main_file_copy_async will now create a
	FileTransferOperation which groups all SpiceFileTransferTasks of the
	copy operation in a GHashTable.

	To ease the review process, this first patch introduces the structure
	and organize the logic around the four following helpers:

	* spice_main_channel_reset_all_xfer_operations
	* spice_main_channel_find_xfer_task_by_task_id
	* file_transfer_operation_free
	* file_transfer_operation_task_finished

	The _task_finished function is the new callback for "finished" signal
	from SpiceFileTransferTask.

	The file_xfer_tasks GHashTable is now mapped as:
	 (key) SpiceFileTransferTask ID -> (value) FileTransferOperation

	This patch leaves a FIXME regarding progress_callback which will be
	addressed in a later patch in this series.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: create helper function to send progress
	This is an intermediary step for the following patches to make the
	changes more clear and easy to follow.

	In file_xfer_send_progress(), I've renamed the variable self to
	xfer_task as this is not SpiceFileTransferTask function.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: improve helper function to queue agent message
	This patch changes:
	* rename function: file_xfer_queue -> file_xfer_queue_msg_to_agent
	  As it makes more clear what this helper function does;
	* Use buffer provided by spice_file_transfer_task_read_finish()
	  instead of accessing SpiceFileTransferTask's private structure

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	main: do not check for xfer-task errors
	The errors related to SpiceFileTransferTask can be present:
	* before the flush happens, on spice_file_transfer_task_read_async()
	* during the async flush:
	  - cancel from user which is handled by file_xfer_flush_async
	  - cancel/error from agent, handled on main_agent_handle_xfer_status()

	file_xfer_flush_finish() should not check internal errors of
	SpiceFileTransferTask and only be worried about errors regarding the
	flush itself.

	Note that with or without this patch, in case of errors from agent, we
	don't stop the flushing; it is only cancelled from user cancellation.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	main: let channel-main handle file-xfer messages
	By separating SpiceFileTransferTask from channel-main, we could choose
	where to put the handler for messages. With the approach based on
	spice_file_transfer_task_read_async(), we cannot have it under
	spice-file-transfer-task.c due the need of callback and userdata on
	_read_async.

	It is much easier to keep this in channel-main and do not move any
	VDAgent.

	This patch reverts 349a52ca2d6af4b31a4f51c38a3292c04460953c changes
	but it does rename:
	- function file_xfer_handle_status -> main_agent_handle_xfer_status
	- variables task to xfer_task

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	main: to let SpiceFileTransferTask handle errors
	* on VD_AGENT_FILE_XFER_STATUS_CAN_SEND_DATA, if the file-transfer is
	  on pending state, spice_file_transfer_task_read_async() will call the
	  callback with error set.

	* on VD_AGENT_FILE_XFER_STATUS_SUCCESS, if the file-transfer is on
	  pending state, spice_file_transfer_task_completed() will set the
	  error for this task.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: introduce functions to read file async
	Introduced functions (private):
	* void   spice_file_transfer_task_read_async()
	* gssize spice_file_transfer_task_read_finish()

	For a better abstraction of how to read from SpiceFileTransferTask and
	handle its data, following the design of other objects like GFile and
	GInputStream.

	Due to the logic changes involved, some functions were created or
	renamed to better address or match its place and purpose:

	* spice_file_transfer_task_read_stream_cb
	  Callback for the actual read from GInpustStream; This is handling
	  the SpiceFileTransferTask bits only;

	* file_xfer_read_cb -> file_xfer_read_async_cb
	  Renamed to match _read_async() function; This is handling the data
	  from reading the file by flushing it to the agent.

	As the _read_async() uses GTask, the error handling is done on the
	channel-main's callback, after _read_finish() is called.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: introduce functions to init task async
	Introduced functions (private):
	* void       spice_file_transfer_task_init_task_async()
	* GFileInfo *spice_file_transfer_task_init_task_finish()

	The init process of SpiceFileTransferTask does initialize its
	GFileInputStream (for reading the file) and also its GFileInfo
	(necessary to protocol in order to start the file-transfer with agent)

	Due the logic changed involved, some functions were renamed to better
	match its place and purpose:

	* file_xfer_info_async_cb -> file_xfer_init_task_async_cb
	  It is channel-main's callback for each _init_task_async()

	* file_xfer_read_async_cb -> spice_file_transfer_task_read_file_cb
	* file_xfer_info_async_cb -> spice_file_transfer_task_query_info_cb
	  Both should be private to SpiceFileTransferTask now.

	As the _init_task_async() uses GTask, some error handling was moved to
	channel-main's after _init_task_finish() is called.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: introduce _create_tasks()
	We can split from file_xfer_send_start_msg_async() the logic in
	creating the SpiceFileTransferTasks; The rest of the function can be
	handled at spice_main_file_copy_async().

	The new function, spice_file_transfer_task_create_tasks() returns a
	GHashTable to optimize the access to a SpiceFileTransferTask from its
	task-id, which is what we receive from the agent.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: get functions for SpiceFileTransferTask
	In order for channel-main to interact with each SpiceFileTransferTask
	for the file-transfer operation, the following functions are
	introduced:
	* spice_file_transfer_task_get_id
	* spice_file_transfer_task_get_channel
	* spice_file_transfer_task_get_cancellable

	Note that "id" property is public and could be acquired by
	g_object_get but having the helper function is more practical.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	file-xfer: task-id to start with 1
	As this is unsigned, we can let 0 be in case of error

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-06-30  Christophe Fergeau  <cfergeau@redhat.com>

	usb-device-manager: Avoid USB event thread leak
	This is a follow-up of the previous commit ('usb-channel: Really stop
	listening for USB events on disconnection').

	Since the USB event thread has to be stopped when we destroy the
	associated SpiceUsbDeviceManager, spice_usb_device_manager_dispose()
	should force event_thread_run to FALSE even if
	spice_usb_device_manager_stop_event_listening() was not enough. When
	this happens, this means that there is a bug in the internal users of
	spice_usb_device_manager_start_event_listening(), but with this change,
	we'll at least warn about it, and avoid a thread leak/potential future
	crash.

	usb-channel: Really stop listening for USB events on disconnection
	When using USB redirection, it's fairly easy to leak the thread handling
	USB events, which will eventually cause problems in long lived apps.
	In particular, in virt-manager, one can:
	- start a VM
	- connect to it with SPICE
	- open the USB redirection window
	- redirect a device
	- close the SPICE window
	-> the SpiceUsbDeviceManager instance will be destroyed (including the
	USB context it owns), but the associated event thread will keep running.
	Since it's running a loop blocking on libusb_handle_events(priv->context),
	the loop will eventually try to use the USB context we just destroyed
	causing a crash.

	We can get in this situation when redirecting a USB device because we
	will call spice_usb_device_manager_start_event_listening() in
	spice_usbredir_channel_open_device(). The matching
	spice_usb_device_manager_stop_event_listening() call is supposed to
	happen in spice_usbredir_channel_disconnect_device(), however by the
	time it's called in the scenario described above, the session associated
	with the channel will already have been set to NULL in
	spice_session_channel_destroy().

	The session is only needed in order to get the SpiceUsbDeviceManager
	instance we need to call spice_usb_device_manager_stop_event_listening()
	on. This patch stores it in SpiceChannelUsbredir instead, this way we
	don't need SpiceChannel::session to be non-NULL during device
	disconnection.

	This should fix the issues described in
	https://bugzilla.redhat.com/show_bug.cgi?id=1217202
	(virt-manager) and most
	likely https://bugzilla.redhat.com/show_bug.cgi?id=1337007 (gnome-boxes)
	as well.

	usb: Update outdated GSimpleAsyncResult comment
	It's still true after the switch to GTask.

	usbredir: Use atomic for UsbDeviceManager::event_thread_run
	This variable is accessed from 2 different threads (main thread and USB
	event thread), so some care must be taken to read/write it.

2016-06-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	usbredir: mark some functions as internal
	For the sake of making clear those are not exported.

2016-06-30  Christophe Fergeau  <cfergeau@redhat.com>

	usbredir: Fix GTask leak
	spice_usbredir_channel_disconnect_device_async() creates a GTask and
	then calls g_task_run_in_thread(). This method will take the reference
	it needs on the GTask, it does not take ownership of the passed-in
	GTask. This means we need to unref the GTask we created after calling
	g_task_run_in_thread(), otherwise we are going to leak the GTask, as
	well as the channel it's associated with.
	Since it's an USB redir channel, this also causes some USB device
	manager/USB event thread leaks.

2016-06-21  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Update NEWS for 0.32 release

2016-06-21  Pavel Grunt  <pgrunt@redhat.com>

	session: Keep brackets around ipv6 hostname
	According to rfc2732:
	"To use a literal IPv6 address in a URL, the literal address should be
	enclosed in "[" and "]" characters."

	Resolves: rhbz#1331777

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	session: Removed write-only variable
	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-06-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	mailmap: fix my name

2016-06-21  Victor Toso  <victortoso@redhat.com>

	main: channel-main to increase file-transfer reference
	This is a minor fix in the logic as in both situations (with or
	without the patch) the reference count for the SpiceFileTransferTask
	object is the same.

	The change is interesting as SpiceFileTransferTask is created but on
	g_file_read_async() it increases its reference count while
	c->file_xfer_tasks keeps the original one.

	It should be the other way around.
	Acked-by: Marc-André Lureau <marcandre.lureau@gmail.com>

	main: assign variable after check for null
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-06-20  Christophe Fergeau  <cfergeau@redhat.com>

	build: Fix _DEPENDENCIES use
	We want to trigger rebuild of libspice-client-gtk-3.0.la or
	libspice-client-glib-2.0.la whenever the corresponding symbol file
	changes.
	However _DEPENDENCIES is not the right way of handling that as it will
	disable automatic automake dependency generation.
	This was not causing issues mainly because _DEPENDENCIES was mispelt as
	_DEPEDENCIES.

	Quoting automake manual:
	https://www.gnu.org/software/automake/manual/automake.html#index-EXTRA_005fmaude_005fDEPENDENCIES-1
	« The EXTRA_*_DEPENDENCIES variable may be useful for cases where you
	merely want to augment the automake-generated _DEPENDENCIES variable
	rather than replacing it. »

	So this commit switches to use EXTRA_*_DEPENDENCIES rather than
	*_DEPENDENCIES.

2016-06-20  Marc-AndrÃ© Lureau  <marcandre.lureau@redhat.com>

	build-sys: fix win32 build
	Commit 0fafbe3 broke the build on win32, because it accesses
	d->egl.enabled. Add a helper function and fix the build.

	Reported-by: Frediano Ziglio <fziglio@redhat.com>
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	vncdisplaykeymap: fix -Werror=tautological-compare
	vncdisplaykeymap.c: In function 'vnc_display_keymap_gdk2xtkbd_table':
	vncdisplaykeymap.c:223:14: error: self-comparison always evaluates to true [-Werror=tautological-compare]
	  if (GDK_IS_WIN32_WINDOW(window)) {

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-06-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: fix keyboard ungrab after click
	Since the switch to a container widget (gtkstack then gtkeventbox), the
	grab may be lost when clicking on the display. Since events are treated
	at the top level container, set widget "above-child" to trap all of them
	to solve this.

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=96595

	Reported-by: Frediano Ziglio <fziglio@redhat.com>
	Tested-by: Frediano Ziglio <fziglio@redhat.com>
	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-06-20  Marc-André Lureau  <marcandre.lureau@gmail.com>

	widget: use scanout offset when using virgl
	Ignoring the display area offset doesn't work nicely with virgl. Imho,
	this condition is wrong even in QXL case.

2016-06-17  Alexandru Visarion  <viorel.visarion@gmail.com>

	channel-main: Fix spice_main_file_copy_async annotation
	Without (array zero-terminated=1), one null terminated array
	parameter is translated into a single element, so its binding
	isn't usable.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-06-16  Frediano Ziglio  <fziglio@redhat.com>

	widget: Disable IME context on display widget
	This prevent Windows to handle IME on the widget which cause the
	application to not receive keyboard events.

	To test this issue set keyboard layout to Japanese and Microsoft
	IME (the default one). Set the input method to full katakana, assure
	your remote-viewer is using this method and start pressing
	alphabetical keys. On the guest (open a terminal, an editor or
	a word processor to make easier) you won't see any character.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-06-15  Christophe Fergeau  <cfergeau@redhat.com>

	main: Don't delay update_display_timer(0) for up to 1 second
	When using remote-viewer --full-screen with a VM/client with multiple
	monitors, a race can be observed during auto-configuration. First, the
	client monitors config is sent to the guest:
	(remote-viewer:19480): GSpice-DEBUG: channel-main.c:1166 main-1:0: sending new monitors config to guest
	(remote-viewer:19480): GSpice-DEBUG: channel-main.c:1183 main-1:0: monitor #0: 1920x1080+0+0 @ 32 bpp
	(remote-viewer:19480): GSpice-DEBUG: channel-main.c:1183 main-1:0: monitor #1: 1920x1080+1920+0 @ 32 bpp

	Then we receive messages from the agent which trigger a call to
	update_display_timer(0)

	This should cause the current monitors state to be sent to the server
	very soon after this call. However, in the racy case, this is delayed
	for nearly a second, and timer_set_display() ends up being called at the
	wrong time, when information about the first display channel have been
	received from the server, but not the second one.

	When this happens, we inform the server that only one monitor is active,
	then the server sends a MonitorsConfig message with 2 monitors (first
	request we sent), and then with just 1 monitor (second request we sent).

	This causes remote-viewer to show one fullscreen black window indicating
	"Connected to server" on one monitor and a working fullscreen window on
	the second monitor.

	update_display_timer(0) schedules a timeout to be run with
	g_timeout_add_seconds(0). However, g_timeout_add_seconds() schedules
	timers with a granularity of a second, so the timeout we scheduled with
	g_timeout_add_seconds() may fire up to 1 second later than when we
	called it, while we really wanted it to fire as soon as possible.
	Special-casing update_display_timer(0) and using g_timeout_add() in that
	case avoid this issue. In theory, the race could probably still happen
	with a very very bad timing, but in practice I don't think it will be
	possible to trigger it after this change.

	https://bugzilla.redhat.com/show_bug.cgi?id=1323092

2016-06-15  Alexander Bokovoy  <abokovoy@redhat.com>

	sasl: fix SASL GSSAPI by allowing NULL username
	SASL GSSAPI module will try to negotiate authentication based on the
	credentials in the default credentials cache. It does not matter if
	SPICE knows username or not as SASL negotiation will pass through the
	discovered name from the GSSAPI module.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-06-13  Frediano Ziglio  <fziglio@redhat.com>

	Remove some warnings compiling for Windows
	GetLastError returns a DWORD which is a "unsigned long" on Windows
	so use "%lu" formatting instead of "%u".

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-06-13  Pavel Grunt  <pgrunt@redhat.com>

	channel-display: Remove deprecated init functions
	They are called at the construct time since spice-common commit:
	5b6be16b37370bb774aa3c2a7d5c41791fdc3a1e

	tests-uri: Define g_assert_nonnull
	It is available since Glib 2.40

	Require gtk+ 3.12
	Allow to use gtk_stack_get_child_by_name

2016-06-13  Frediano Ziglio  <fziglio@redhat.com>

	widget: Do not mix function linkage
	This prevents a possible crash on windows 32 bit.
	The linkage of UnhookWindowsHookEx is WINAPI which is __stdcall while
	callback for g_clear_pointer is C. This could cause stack pointer
	corruption depending on compiler flags.
	On __stdcall linkage function change the stack pointer while returning
	from a function removing the parameters. On C linkage function leave
	the stack pointer unchanged. So if the compiler call a __stdcall
	function as a C function it expect the stack pointer to be unchanged
	causing the pointer to be inconsistent by an offset.

2016-06-09  Frediano Ziglio  <fziglio@redhat.com>

	widget: Do not ignore unsupported keys from keyboard
	If Windows layout does not support a given key the resulting virtual code
	is set to 0xFF. To avoid losing this raw key (causing the key not been
	sent to remote machine) detect this condition and handle the key.
	The check for raw scancode is there to understand if we can handle
	correctly the key in following code.
	This problem can happen for instance using a 106 key Japanese keyboard
	while the layout is set in English; in this case keys like CONVERT not
	forwarded correctly.

	Some note on how to reproduce and test this problem.

	Physical way:
	1- get a 106 key Japanese keyboard for your Windows client machine;
	2- setup your client to English keyboard layout;
	3- connect to a Linux machine (no matter the distro or version or
	   keyboard configuration);
	4- open "xinput test-xi2 <device>" command on Linux (device is
	   the "AT" device in this case);
	5- press CONVERT or other keys not present on an English keyboard.

	Virtual way (Windows machine on a VM):
	- set machine remote to VNC;
	- assure Qmeu has lock-key-sync=off option to vnc;
	- connect to Windows machine with a VNC client (I suggest TigerVNC
	  as remote-viewer do some keyboard insertion);
	- do steps 2, 3, 4 above
	- press the CONVERT key. If you don't have you can simulate, either
	  - change VNC client code to insert scancode 0x70 instead of another
	    key and press this key;
	  - disconnect main VNC client and use some tool to inject keys
	    (I use a modifier version of vncdotool).

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-06-06  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Use the frame dimensions reported by the video decoder
	The dimensions sent by the remote end are redundant and should not be
	trusted.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-06-06  Pavel Grunt  <pgrunt@redhat.com>

	widget: Avoid using GDK_GRAB_FAILED defined in Gtk 3.16.
	The returned value from do_pointer_grab() is treated as a boolean - grab
	was successful or not. Change the function to return a boolean value.

	Reported-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	mingw: Fix -Werror format & missing-prototypes
	-Wmissing prototypes were enabled in d5e3a4a5c34fc4408298e824872c4ed511b4bb3c
	format warnings were added in da8ecf1f95382e8c12fd14915f471a3e76e4b178

2016-06-03  Pavel Grunt  <pgrunt@redhat.com>

	spicy: Do not show underscore in label
	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

2016-06-02  Pavel Grunt  <pgrunt@redhat.com>

	spice-uri: Add ipv6 support
	Just basic support -  http://user:password@[host]:port

	Resolves: rhbz#1335239

	spice-uri: Validate uri scheme
	Related: rhbz#1335239

	Acked-by: Victor Toso <victortoso@redhat.com>

	spice-uri: Check if port is in allowed range
	Use g_ascii_strtoll because it helps to detect overflow.

	Related: rhbz#1335239

	Acked-by: Victor Toso <victortoso@redhat.com>

	spice-uri: Do not allow empty port string
	Related: rhbz#1335239

	Acked-by: Victor Toso <victortoso@redhat.com>

	spice-uri: Reset SpiceURI before parsing
	Avoid using old values after parsing a new uri.

	Related: rhbz#1335239

	tests: Add test for SpiceURI
	Related: rhbz#1335239

2016-06-01  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Tweak the GStreamer decoder to avoid a compiler warning
	We check that there is a matching frame in the queue before popping the
	old ones. So we know the inner loop will find a match and thus that
	frame will not be NULL. But figuring that out is too hard for the
	compiler.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>
	Reported-by: Marc-André Lureau <marcandre.lureau@gmail.com>

2016-06-01  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: update manywarnings.m4
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	build-sys: -Wshift-overflow=2
	manywarnings.m4 update will bring new flags that fail with some
	glib/gst headers.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	Fix many -Werror=format warnings
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	build-sys: remove -Wmissing-declarations
	The warning doesn't show up anymore.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-06-01  Victor Toso  <victortoso@redhat.com>

	channel: avoid crash on spice_channel_wakeup due NULL channel
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	tests: fix build with smartcard enabled
	In file included from
	../spice-common/common/client_marshallers.h:29:0,
	from ../src/spice-channel-priv.h:35,
	from ../src/spice-file-transfer-task-priv.h:28,
	from file-transfer.c:3:
	../spice-common/common/messages.h:45:23: fatal error: libcacard.h: No such file or directory
	compilation terminated.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-31  Marc-André Lureau  <marcandre.lureau@gmail.com>

	doc: fix unused declarations
	Fix all the gtk-doc: "unused declarations. They should be added to
	spice-gtk-sections.txt in the appropriate place."

	doc: add some missing block comments

	Fix non gtk-doc comments
	Fixes the following warning:
	../../src/vmcstream.c:124: warning: Symbol name not found at the start of the comment block.
	../../src/win-usb-driver-install.c:347: warning: Symbol name not found at the start of the comment block.

	build-sys: remove some gtk+ 2.0 warnings flags
	As we dropped gtk+ 2.0 anyway.

	build-sys: enable -Wmissing-prototypes
	Turns out it is possible to fix the warnings now.

2016-05-31  Pavel Grunt  <pgrunt@redhat.com>

	Update README
	Remove gtk2 related stuff.
	Recommend dnf for installing dependencies.

	spice-uri: Mark parameter as unused
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-05-28  Marc-André Lureau  <marcandre.lureau@gmail.com>

	main: remove unneeded gtk-doc comments
	They are no longer in the doc, and not really useful anyway

	main: remove SpiceFileTransferTaskPrivate
	The struct is already private

2016-05-27  Victor Toso  <victortoso@redhat.com>

	file-xfer: make handle_status agnostic of channel-main
	This make possible to rename the function to
	spice_file_transfer_task_handle_status as a handler for
	VDAgentFileXferStatusMessage for a specific task.

	This change is related to split SpiceFileTransferTask from
	channel-main.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-05-25  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Constify the video stream's dest and clip parameters
	They are only supposed to be changed when receiving the relevant server
	message.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-25  Pavel Grunt  <pgrunt@redhat.com>

	file-transfer-task: Hide internals of SpiceFileTransferTask
	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	file-trasfer-task: Protect header include
	As stated in the commit d2f33178c40ac51b1c8b1bf796a328631d9869c7 Glib
	applications should only include "spice-client.h".

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-05-25  Marc-André Lureau  <marcandre.lureau@gmail.com>

	egl: fix delayed widget realize
	When the display is not yet realized, spice_display_widget_gl_scanout()
	will fail because the egl context is not ready. The display is never
	marked ready because the egl.image (and egl.scanout) is not set, and
	some clients, such as virt-viewer will not realize the widget until the
	display is ready.

	Deal with gl scanout updates when the widget is not yet realized, and
	mark the display as ready when egl is enabled (when last display draw
	signal is from gl).

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	gtk: remove unneeded check
	spice_cairo_draw_event() can deal with d->canvas.surface == NULL.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	gtk: rename spicex_* functions
	spice-gtk used to have x11/shm backend, now it's only cairo

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	gtk: move canvas related data in its own structure
	Group canvas related data to a sub-structure.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	egl: bind the scanout texture
	glEGLImageTargetTexture2DOES() changes the current bound texture. If
	the last texture bound is the cursor, update_scanout() will modify the
	cursor texture, instead of the display.

	Fix regression from commit 3539ac6212d506128bd38aad032e0363e78cb4f6.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	display: lower to debug gstreamer codec support
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-25  Pavel Grunt  <pgrunt@redhat.com>

	spice-widget: Use correct enum value
	GDK_GRAB_BROKEN is not GdkGrabStatus value, but GdkEventType

2016-05-24  Pavel Grunt  <pgrunt@redhat.com>

	Update spice-common submodule
	Fixes lz decompression crash:
	https://bugzilla.redhat.com/show_bug.cgi?id=1285469

	Christophe Fergeau (5):
	      Remove 2 unused vfuncs from client_marshallers.h
	      tests: Fix glib version check
	      log: Clamp SPICE_DEBUG_LEVEL if it's too high
	      log: Use SPICE_CONSTRUCTOR_FUNC
	      log: Make sure glib threading is initialized

	Eduardo Lima (Etrunko) (2):
	      Fix build in systems with Glib version older than 2.38
	      2/2] Add check for openssl

	Fabiano Fidêncio (7):
	      coverity: avoid use after free
	      coverity: avoid resource leak
	      coverity: avoid dereference after null check
	      coverity: avoid division or modulo by zero
	      coverity: remove unused value
	      coverity: remove structurally dead code
	      Use g_getenv() instead of getenv()

	Frediano Ziglio (6):
	      Cap logging level to the valid bounds
	      tests: exit on SIGABRT
	      define SPICE_CONSTRUCTOR_FUNC and SPICE_DESTRUCTOR_FUNC macros
	      use macro to define constructor function
	      fix 16 bpp LZ image decompression
	      Explicitly specify size of SpiceMsgSmartcardData

	Lin Ma (1):
	      build-sys: Define opengl GL_LIBS and GL_CFLAGS in generated Makefile.in

	Pavel Grunt (3):
	      Define canvas_fix_alignment when is used
	      test-logging: Include stdlib.h for _Exit()
	      Remove GL support

	Update .mailmap

2016-05-23  Marc-André Lureau  <marcandre.lureau@gmail.com>

	egl: set current context, fix multiple display
	On X11, each widget has its own context. Make sure we are using the
	widget associated context when using gl.

	With gtk 3.16, glEGLImageTargetTexture2DOES() can be called during
	update scanout, since we can call gtk_gl_area_make_current(). On < 3.16,
	do it before drawing.

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1337721

	Acked-by: Pavel Grunt <pgrunt@redhat.com>
	Acked-by: Victor Toso <victortoso@redhat.com>

	egl: don't terminate display
	This is global to the display connection: all egl resources will be
	released, including those from other widgets or from the application.

	Fix spice/virgl display being rendered black after another widget
	display is destroyed.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>
	Acked-by: Victor Toso <victortoso@redhat.com>

	egl: don't destroy wayland egl context
	The egl context is from Gtk on Wayland. Destroy it only on X11.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>
	Acked-by: Victor Toso <victortoso@redhat.com>

	egl: only swap buffers on x11
	Gtk does it for us already with GtkGlArea.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	channel: check if channel has a session
	Since 8943d2329, the channel may be disconnected from the session
	before it's destroyed. In this case, session is NULL.

	Fixes some critical with virt-manager when closing a display:

	(virt-manager:20451): GSpice-CRITICAL **: spice_session_is_for_migration: assertion 'SPICE_IS_SESSION(session)' failed

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	util: remove STATIC_MUTEX macros
	They are no longer needed since 0a9ec4ec0.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-05-19  Frediano Ziglio  <fziglio@redhat.com>

	Spice-widget: Use new gdk_event_get_scancode if available
	This new Gdk API allows in Windows to retrieve the raw scancodes sent
	by Windows.
	This allows us to do some translations getting the right value without
	many hacks and supporting all possible layouts.
	Windows convert the scancodes into virtual key codes. The translation is
	1 -> N based on different condition. Also a single virtual key code can
	be originated from different scancodes. This make quite complicated
	(if not impossible) to get the original scancode from the hardware_keycode
	field (which in Windows is the virtual key).
	The additional check for native_scancode after calling this function
	allows to support key injection.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-18  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Use decodebin as a fallback for the GStreamer video decoder
	This means future video codecs may be supported automatically.
	One can also force usage of decodebin by setting $SPICE_GSTVIDEO_AUTO.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	streaming: Probe GStreamer before advertising support for a codec
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	streaming: Allow disabling support for the builtin MJPEG video decoder
	This makes it possible to test the GStreamer video decoder with MJPEG
	streams.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	streaming: Add a GStreamer video decoder for MJPEG, VP8 and h264
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	streaming: Let the video decoder queue, schedule and drop the frames
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-16  Victor Toso  <victortoso@redhat.com>

	file-xfer: fix segfault on agent disconnection
	We are checking self->priv->error but accessing the argument GError *
	which is NULL and leads to a segfault.

	Program received signal SIGSEGV, Segmentation fault.
	spice_file_transfer_task_completed (self=self@entry=0x7fffd0006f00, error=0x0) at channel-main.c:2963
	2963            VDAgentFileXferStatusMessage msg = {
	(gdb) bt
	 #0  spice_file_transfer_task_completed (self=self@entry=0x7fffd0006f00, error=0x0) at channel-main.c:2963
	 #1  in file_xfer_data_flushed_cb (source_object=0x7cc1d0, res=0x953390, user_data=user_data@entry=0x7fffd0006f00) at channel-main.c:1857
	 #2  in g_task_return_now (task=0x953390) at gtask.c:1108
	 #3  in g_task_return (task=0x953390, type=<optimized out>) at gtask.c:1166
	 #4  in flush_foreach_remove (key=<optimized out>, value=<optimized out>, user_data=<optimized out>) at channel-main.c:928
	 #5  in g_hash_table_foreach_remove_or_steal (hash_table=0x70cea0, func=func@entry=0x7ffff5616f10 <flush_foreach_remove>, user_data=user_data@entry=0x0, notify=notify@entry=1) at ghash.c:1492
	 #6  in g_hash_table_foreach_remove (hash_table=<optimized out>, func=func@entry=0x7ffff5616f10 <flush_foreach_remove>, user_data=user_data@entry=0x0) at ghash.c:1538
	 #7  in file_xfer_flushed (success=0, channel=0x7cc1d0) at channel-main.c:936
	 #8  spice_main_channel_reset_agent (channel=0x7cc1d0) at channel-main.c:466
	 #9  set_agent_connected (channel=0x7cc1d0, connected=connected@entry=0) at channel-main.c:1572
	 #10 in spice_main_channel_reset (channel=0x7cc1d0, migrating=0) at channel-main.c:485
	 #11 in spice_channel_coroutine (data=0x7cc1d0) at spice-channel.c:2564
	 #12 in coroutine_trampoline (cc=0x7cb860) at coroutine_ucontext.c:63
	 #13 in continuation_trampoline (i0=<optimized out>, i1=<optimized out>) at continuation.c:55
	 #14 in ?? () from /lib64/libc.so.6
	 #15 in ?? ()
	 #16 in ?? ()
	Backtrace stopped: Cannot access memory at address

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-05-13  Victor Toso  <victortoso@redhat.com>

	file-xfer: fix file path leak
	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-05-13  Pavel Grunt  <pgrunt@redhat.com>

	doc, gir: Clarify availability of skip spice_get_option_group
	Commit c288627110bbec1aba48b0bf91ce7ab4b12f70b3 made the function
	available for other languages through gobject introspections. Mention
	the change in the function description.
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-05-12  Pavel Grunt  <pgrunt@redhat.com>

	spicy: Add option to control syncing modifiers
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	spice-gtk-session: Add sync modifiers property
	It will help in cases where syncing modifiers keys is complicated:
	 * not working leds for modifiers keys
	 * different keyboard layout on the guest side
	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-05-10  Victor Toso  <victortoso@redhat.com>

	spicy: fix leak of transfer hash table
	184 (88 direct, 96 indirect) bytes in 1 blocks are definitely lost in
	loss record 10,025 of 11,515 at 0x4C28BF6: malloc
	(vg_replace_malloc.c:299)
	 by 0x9D33218: g_malloc (gmem.c:94)
	 by 0x9D49D02: g_slice_alloc (gslice.c:1025)
	 by 0x9D1CCBD: g_hash_table_new_full (ghash.c:711)
	 by 0x406196: connection_new (spicy.c:1693)
	 by 0x405BFE: main (spicy.c:1852)

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-05-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	spicy: add toggle mouse mode menu
	This is just for testing, the UI could be different in better clients.

	Acked-by: Victor Toso <victortoso@redhat.com>

	main: do not always request client mouse mode
	Whenever the mouse mode changed on the server, spice-gtk was requesting
	client mode. Instead keep the last requested mode and request it
	whenever it's possible.

	Reviewed-by: Victor Toso <victortoso@redhat.com>

	gtk: add spice_main_request_mouse_mode()
	Send a SpiceMsgcMainMouseModeRequest message to request a mouse mode.

	This allows to switch between client/absolute and server/relative mouse
	modes.

	This is necessary for some applications that require pointer
	re-positioning, which we can't provide through a remote protocol easily
	with client pointer (no such hardware-level message exists afaik).

	Reviewed-by: Victor Toso <victortoso@redhat.com>

2016-05-09  Francois Gouget  <fgouget@codeweavers.com>

	streaming: Rename num_drops_on_receive to arrive_late_count
	The frame may not get dropped once that's left up to video decoders.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	streaming: Optimize handling of the decoded frame buffer
	The MJPEG decoder does not need a zero-filled buffer.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	streaming: Enable adding alternative video decoders
	This replaces the original channel-display-mjpeg API with a VideoDecoder
	base class which can be reimplemented by other decoders.
	Furthermore this moves the MJPEG-specific state information from the
	display_stream struct to a derived class of VideoDecoder.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-04  Visarion-Mingopol Alexandru  <viorel.visarion@gmail.com>

	doc,gir: Don't skip spice_get_option_group()
	There is no reason to not include the spice_get_option_group
	method in the generated bindings, as it can be useful.

	It was removed in the commit 2db9b8dd037e22d2b04e8e2aeecfd685524b7fef,
	for the reason of causing warnings, but no warnings show up now.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-05-04  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk: fix server-mode mouse
	Since switching to gtkstack, server-side mouse mode has some issues with
	grabs. There seems to be some grab gtk+ issue, but it seems to fall
	under the API user responsability to have its own window when dealing
	with pointer grabs. And gtk+ commit 9d0e8401c (Turn stack into no-window
	widget) made things worse.

	Making the widget an eventbox solves the grab issue.

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=94764

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-05-03  Victor Toso  <victortoso@redhat.com>

	spice-channel: fix small leak
	182 bytes in 1 blocks are definitely lost in loss record 9,048 of 9,889
	at 0x4C2A988: calloc (vg_replace_malloc.c:711)
	by 0xB5F4270: g_malloc0 (gmem.c:124)
	by 0x7320678: spice_channel_recv_link_hdr (spice-channel.c:1312)
	by 0x7320678: spice_channel_coroutine (spice-channel.c:2543)
	by 0x7355A4E: coroutine_trampoline (coroutine_ucontext.c:63)
	by 0x7355802: continuation_trampoline (continuation.c:55)

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	spicevmc: don't disconnect on "cancel"
	spicevmc was designed so its _finish functions should always be called;
	With the gtask integration both _finish functions are trying to
	disconnect the GCancellable even in the 'cancel' context which leads to
	a deadlock as explained in the documentation.

	Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=95032
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-05-02  Pavel Grunt  <pgrunt@redhat.com>

	channel: Abort migration in delayed unref
	When channel is unref'ed during migration migrate_channel_event_cb
	is called causing a crash by coroutine yielding to nonexistent channel.

	The delayed_unref happens for the target host channel and will only occur
	when the migration process fails.

	As comment in spice_channel_coroutine says:
	  Co-routine exits now - the SpiceChannel object may no longer exist,
	  so don't do anything else now unless you like SEGVs

	Related: rhbz#1318574
	Acked-by: Victor Toso <victortoso@redhat.com>

	Do not use deprecated GtkStock
	Use labels or named icons

	Deprecated since Gtk 3.10
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-05-02  Fabiano Fidêncio  <fidencio@redhat.com>

	coverity: identical code for different branches
	Acked-by: Victor Toso <victortoso@redhat.com>

	coverity: avoid out of bounds access
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-04-27  Pavel Grunt  <pgrunt@redhat.com>

	channel-main: Use CHANNEL_DEBUG for migration events
	To show which channel got an error or an unhandled event
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-04-22  Javier Celaya  <javier.celaya@flexvdi.com>

	Spice-widget: Allow smaller widget with scaling enabled
	When resize-guest-to-match-window-size is disabled, the size request
	(minimum size) of the spice widget is set to the current guest
	resolution. The client window cannot be made smaller, even with
	scale-display enabled.

	This patch sets a size request of 640x480 when either
	resize-guest-to-match-window-size OR scale-display are enabled, making
	it posible to shrink the window and scale down the display.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-04-18  Takao Fujiwara  <tfujiwar@redhat.com>

	Send Hangul key in KR keyboard
	Korean keyboard assigns Hangul key on the position of Right Alt and
	Left Alt and Hangul keys have the different scancodes but MapVirtualKey()
	returned the same scancode and could not use Hangul key on Linux desktop.

	The fix is to send the right scancode of VK_HANGUL.

	Send key release event for some keys in JP keyboard
	With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can
	be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP
	event in Windows and it caused Linux desktop freeze with unlimited key
	press events.

	The proposed fix is to send the key release event in spice-gtk.

	VK_DBE_ALPHANUMERIC, VK_DBE_HIRAGANA, VK_DBE_ROMAN are applied the
	similar fixes.

	Send Zenkaku_Hankaku key in JP keyboard
	Zenkaku_Hankaku key has the different virtual-key codes between WM_KEYDOWN
	and WM_KEYUP and MapVirtualKey() cannot get the scancode from virtual-key
	code of WM_KEYDOWN (VK_DBE_DBCSCHAR) and spice-gtk didn't send the key
	press events and caused the desktop freeze with unlimited key release
	events.

	The fix is to get the scancode from virtual-key code of WM_KEYUP
	(VK_DBE_SBCSCHAR) and Zenkaku_Hankaku key works fine.

	Alt + Zenkaku_Hankaku key also has the different virtual-key code and
	MapVirtualKey() cannot get the scancode from the virtual-key and
	spice-gtk didn't send the key press events and Alt+Zenkaku_Hankaku
	could not be used.

	The fix is to get the scancode from virtual-key code of Zenkaku_Hankaku key
	(VK_DBE_SBCSCHAR).

	VK_CAPITAL, VK_DBE_ROMAN are also applied the similar fixes.

2016-04-15  Pavel Grunt  <pgrunt@redhat.com>

	channel-main: Move variable to block where is needed

	channel-main: Add helper function for getting audio
	Avoid repeating the same code and having a SpiceSession variable
	defined when is not really needed.
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-04-08  Jonathon Jongsma  <jjongsma@redhat.com>

	Ensure that file transfers get cancelled
	When canceling a file transfer task in spicy, the client would often
	stop sending additional data, but it would not send a "CANCELLED"
	message to the guest. Because of this, the partial file would remain in
	the guest's downloads folder until the spice client disconnected, at
	which point the vdagent would remove the unfinshed file.

	This CANCELLED status message was only being sent if the task was
	canceled during the async file read operation. If you cancel a task,
	it's quite likely that it will happen during other operations
	(e.g. file_xfer_flush_async(), etc). In order to handle these scenarios
	(and make sure that the file gets canceled properly), send the
	FILE_XFER_STATUS message in spice_file_transfer_task_completed().

2016-04-07  Pavel Grunt  <pgrunt@redhat.com>

	Do not call spice_egl_cursor_set when egl is disabled
	Fix memory leaks of cursor:

	240 bytes in 1 blocks are possibly lost in loss record 10,786 of 12,521
	   at 0x4C2FA60: calloc (vg_replace_malloc.c:711)
	   by 0x3700F861: ralloc_size (ralloc.c:113)
	   by 0x36FD2D68: UnknownInlinedFun (list.h:83)
	   by 0x36FD2D68: (anonymous namespace)::builtin_variable_generator::add_const(char const*, int) (builtin_variables.cpp:578)
	   by 0x36FD4775: generate_constants (builtin_variables.cpp:725)
	   by 0x36FD4775: _mesa_glsl_initialize_variables(exec_list*, _mesa_glsl_parse_state*) (builtin_variables.cpp:1303)
	   by 0x36E03D26: create_new_program (ff_fragment_shader.cpp:1225)
	   by 0x36E03D26: _mesa_get_fixed_func_fragment_program (ff_fragment_shader.cpp:1295)
	   by 0x36E9A577: update_program (state.c:157)
	   by 0x36E9A577: _mesa_update_state_locked (state.c:473)
	   by 0x36E9A6A0: _mesa_update_state (state.c:504)
	   by 0x36EB05E4: teximage (teximage.c:2947)
	   by 0x36EB211F: _mesa_TexImage2D (teximage.c:3009)
	   by 0x4E5024F: spice_egl_cursor_set (spice-widget-egl.c:497)
	   by 0x4E4BFD7: cursor_set (spice-widget.c:2346)
	   by 0x50D6245: g_cclosure_user_marshal_VOID__INT_INT_INT_INT_POINTER (spice-marshal.c:245)

	Use g_clear_pointer if possible
	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	Use g_clear_object if possible
	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	Use g_object_unref instead of gdk_cursor_unref
	GdkCursor is GObject and gdk_cursor_unref has been deprecated since 3.0

	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	Use GMutex instead of GStaticMutex
	Since GLib 2.32 GMutex can be statically allocated, so GStaticMutex has
	been deprecated.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	Use GDK_VERSION_MAX_ALLOWED
	In order to avoid using a too new Gtk API.

	Taken from virt-viewer 4c4a43c61db60ac815c0bc66730fa0a9a1571103

	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	Use GLIB_VERSION_MAX_ALLOWED
	In order to avoid using a too new GLib API.

	Taken from virt-viewer 96d120903f0b95d49642e58d4f796b4f62aa8b20

	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

2016-04-01  Pavel Grunt  <pgrunt@redhat.com>

	widget-egl: Define label only if can be used
	The label can be used only with GDK_WINDOWING_WAYLAND

	Silence -Wunused-label

2016-03-30  Pavel Grunt  <pgrunt@redhat.com>

	doc: Add description for spice_display_get_gl_scanout()
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	doc: Ignore spicy-connect
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	spice-file-transfer-task: Fix docstring
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	doc: channel stability should be Stable
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	doc: Remove private structs
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

	usb-device-manager: Fix docstring
	Add description, "Since" and change the parameter name in the docstring
	to match parameter name in the function definition.

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-03-30  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Update symbol files
	The OSX-specific symbol files were not updated after the recent API
	additions/removals, and some removed symbols were still listed in
	map-file.

2016-03-29  Victor Toso  <victortoso@redhat.com>

	egl: fix leak when display is unrealize
	eglTerminate should be called on unrealize. This not yet fix all the
	leaks but reduces it significantly from 318kb to 74kb as definitely lost
	and around 1mb to 8kb as indirectly lost.

	4,096 bytes in 1 blocks are definitely lost in loss record
	9,762 of 9,882
	   at 0x35B19E40: drm_intel_gem_bo_map (intel_bufmgr_gem.c:1454)
	   by 0x35688320: can_write_oacontrol (intel_extensions.c:121)
	   by 0x35688320: intelInitExtensions (intel_extensions.c:279)
	   by 0x35651380: brwCreateContext (brw_context.c:875)
	   by 0x35602720: driCreateContextAttribs (dri_util.c:426)
	   by 0xF0C48B1: dri2_create_context (egl_dri2.c:1072)
	   by 0xF0BE727: eglCreateContext (eglapi.c:638)
	   by 0x5461D27: spice_egl_init (spice-widget-egl.c:256)
	   by 0x545B885: drawing_area_realize (spice-widget.c:581)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)
	   by 0xB443A40: signal_emit_unlocked_R (gsignal.c:3629)
	   by 0xB44C92E: g_signal_emit_valist (gsignal.c:3385)
	   by 0xB44CC51: g_signal_emit (gsignal.c:3441)

	4,856 (32 direct, 4,824 indirect) bytes in 1 blocks are definitely lost
	in loss record 9,779 of 9,882
	   at 0x4C2A988: calloc (vg_replace_malloc.c:711)
	   by 0xF0BEEF7: _eglCreateArray (eglarray.c:71)
	   by 0xF0BF420: _eglLinkConfig (eglconfig.c:90)
	   by 0xF0C4F8D: dri2_add_config (egl_dri2.c:307)
	   by 0xF0C66EE: dri2_x11_add_configs_for_visuals (platform_x11.c:766)
	   by 0xF0C80EC: dri2_initialize_x11_dri3 (platform_x11.c:1319)
	   by 0xF0C80EC: dri2_initialize_x11 (platform_x11.c:1464)
	   by 0xF0C18FE: _eglMatchAndInitialize (egldriver.c:261)
	   by 0xF0C19B8: _eglMatchDriver (egldriver.c:292)
	   by 0xF0BDD31: eglInitialize (eglapi.c:482)
	   by 0x5461A76: spice_egl_init (spice-widget-egl.c:226)
	   by 0x545B885: drawing_area_realize (spice-widget.c:581)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)

	5,921 (472 direct, 5,449 indirect) bytes in 1 blocks are definitely lost
	in loss record 9,794 of 9,882
	   at 0x4C2A988: calloc (vg_replace_malloc.c:711)
	   by 0xF0C7E0E: dri2_initialize_x11_dri3 (platform_x11.c:1267)
	   by 0xF0C7E0E: dri2_initialize_x11 (platform_x11.c:1464)
	   by 0xF0C18FE: _eglMatchAndInitialize (egldriver.c:261)
	   by 0xF0C19B8: _eglMatchDriver (egldriver.c:292)
	   by 0xF0BDD31: eglInitialize (eglapi.c:482)
	   by 0x5461A76: spice_egl_init (spice-widget-egl.c:226)
	   by 0x545B885: drawing_area_realize (spice-widget.c:581)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)
	   by 0xB443A40: signal_emit_unlocked_R (gsignal.c:3629)
	   by 0xB44C92E: g_signal_emit_valist (gsignal.c:3385)
	   by 0xB44CC51: g_signal_emit (gsignal.c:3441)
	   by 0x5D2C9DB: gtk_widget_realize (gtkwidget.c:5454)

	16,384 bytes in 4 blocks are definitely lost in loss record 9,854 of 9,882
	   at 0x35B19E40: drm_intel_gem_bo_map (intel_bufmgr_gem.c:1454)
	   by 0x3568AB30: intel_miptree_map_raw (intel_mipmap_tree.c:2149)
	   by 0x3568CEE6: intel_miptree_map_gtt (intel_mipmap_tree.c:2182)
	   by 0x3568CEE6: intel_miptree_map (intel_mipmap_tree.c:2774)
	   by 0x35692851: intel_map_texture_image (intel_tex.c:227)
	   by 0x35447C3B: store_texsubimage (texstore.c:1069)
	   by 0x35447E9F: _mesa_store_teximage (texstore.c:1125)
	   by 0x3543D9BA: _mesa_get_fallback_texture (texobj.c:1056)
	   by 0x35443E1E: UnknownInlinedFun (texstate.c:562)
	   by 0x35443E1E: update_program_texture_state (texstate.c:587)
	   by 0x35443E1E: UnknownInlinedFun (texstate.c:726)
	   by 0x35443E1E: _mesa_update_texture (texstate.c:757)
	   by 0x35420809: _mesa_update_state_locked (state.c:430)
	   by 0x35420ED0: _mesa_update_state (state.c:504)
	   by 0x3535BF87: _mesa_Clear (clear.c:172)
	   by 0x546214F: spice_egl_update_display (spice-widget-egl.c:514)

	32,768 bytes in 1 blocks are definitely lost in loss record 9,864 of 9,882
	   at 0x35B19E40: drm_intel_gem_bo_map (intel_bufmgr_gem.c:1454)
	   by 0x35683E3C: intel_batchbuffer_reset (intel_batchbuffer.c:68)
	   by 0x35684052: brw_new_batch (intel_batchbuffer.c:164)
	   by 0x35684052: _intel_batchbuffer_flush.part.2 (intel_batchbuffer.c:397)
	   by 0x3568853B: can_write_oacontrol (intel_extensions.c:153)
	   by 0x3568853B: intelInitExtensions (intel_extensions.c:279)
	   by 0x35651380: brwCreateContext (brw_context.c:875)
	   by 0x35602720: driCreateContextAttribs (dri_util.c:426)
	   by 0xF0C48B1: dri2_create_context (egl_dri2.c:1072)
	   by 0xF0BE727: eglCreateContext (eglapi.c:638)
	   by 0x5461D27: spice_egl_init (spice-widget-egl.c:256)
	   by 0x545B885: drawing_area_realize (spice-widget.c:581)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)
	   by 0xB443A40: signal_emit_unlocked_R (gsignal.c:3629)

	32,768 bytes in 1 blocks are definitely lost in loss record 9,865 of 9,882
	   at 0x35B19E40: drm_intel_gem_bo_map (intel_bufmgr_gem.c:1454)
	   by 0x35683E3C: intel_batchbuffer_reset (intel_batchbuffer.c:68)
	   by 0x35684052: brw_new_batch (intel_batchbuffer.c:164)
	   by 0x35684052: _intel_batchbuffer_flush.part.2 (intel_batchbuffer.c:397)
	   by 0x356887F3: can_do_pipelined_register_writes (intel_extensions.c:88)
	   by 0x356887F3: intelInitExtensions (intel_extensions.c:338)
	   by 0x35651380: brwCreateContext (brw_context.c:875)
	   by 0x35602720: driCreateContextAttribs (dri_util.c:426)
	   by 0xF0C48B1: dri2_create_context (egl_dri2.c:1072)
	   by 0xF0BE727: eglCreateContext (eglapi.c:638)
	   by 0x5461D27: spice_egl_init (spice-widget-egl.c:256)
	   by 0x545B885: drawing_area_realize (spice-widget.c:581)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)
	   by 0xB443A40: signal_emit_unlocked_R (gsignal.c:3629)

	98,304 bytes in 3 blocks are definitely lost in loss record 9,872 of 9,882
	   at 0x35B19E40: drm_intel_gem_bo_map (intel_bufmgr_gem.c:1454)
	   by 0x35683E3C: intel_batchbuffer_reset (intel_batchbuffer.c:68)
	   by 0x35684052: brw_new_batch (intel_batchbuffer.c:164)
	   by 0x35684052: _intel_batchbuffer_flush.part.2 (intel_batchbuffer.c:397)
	   by 0x3564F834: intel_glFlush (brw_context.c:259)
	   by 0xF0C3DA0: dri2_make_current (egl_dri2.c:1189)
	   by 0xF0BAB1B: eglMakeCurrent (eglapi.c:703)
	   by 0x546274E: spice_widget_init_egl_win (spice-widget-egl.c:316)
	   by 0x546274E: spice_egl_realize_display (spice-widget-egl.c:333)
	   by 0x545B89F: drawing_area_realize (spice-widget.c:586)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)
	   by 0xB443A40: signal_emit_unlocked_R (gsignal.c:3629)
	   by 0xB44C92E: g_signal_emit_valist (gsignal.c:3385)
	   by 0xB44CC51: g_signal_emit (gsignal.c:3441)

	131,072 bytes in 4 blocks are definitely lost in loss record 9,874 of 9,882
	   at 0x35B19E40: drm_intel_gem_bo_map (intel_bufmgr_gem.c:1454)
	   by 0x35683E3C: intel_batchbuffer_reset (intel_batchbuffer.c:68)
	   by 0x356848E8: intel_batchbuffer_init (intel_batchbuffer.c:45)
	   by 0x35651337: brwCreateContext (brw_context.c:848)
	   by 0x35602720: driCreateContextAttribs (dri_util.c:426)
	   by 0xF0C48B1: dri2_create_context (egl_dri2.c:1072)
	   by 0xF0BE727: eglCreateContext (eglapi.c:638)
	   by 0x5461D27: spice_egl_init (spice-widget-egl.c:256)
	   by 0x545B885: drawing_area_realize (spice-widget.c:581)
	   by 0xB431784: g_closure_invoke (gclosure.c:804)
	   by 0xB443A40: signal_emit_unlocked_R (gsignal.c:3629)
	   by 0xB44C92E: g_signal_emit_valist (gsignal.c:3385)

	1,080,655 (284 direct, 1,080,371 indirect) bytes in 1 blocks are
	definitely lost in loss record 9,881 of 9,882
	   at 0x4C2A988: calloc (vg_replace_malloc.c:711)
	   by 0x355A2221: ralloc_size (ralloc.c:113)
	   by 0x355A227D: rzalloc_size (ralloc.c:134)
	   by 0x355A2BEE: ra_alloc_reg_set (register_allocate.c:196)
	   by 0x356D79AA: brw_alloc_reg_set(brw_compiler*, int) (brw_fs_reg_allocate.cpp:159)
	   by 0x356D817D: brw_fs_alloc_reg_sets (brw_fs_reg_allocate.cpp:305)
	   by 0x356FDACC: brw_compiler_create (brw_shader.cpp:84)
	   by 0x35691995: intelInitScreen2 (intel_screen.c:1495)
	   by 0x35602A5E: driCreateNewScreen2 (dri_util.c:144)
	   by 0xF0C547B: dri2_create_screen (egl_dri2.c:674)
	   by 0xF0C808F: dri2_initialize_x11_dri3 (platform_x11.c:1303)
	   by 0xF0C808F: dri2_initialize_x11 (platform_x11.c:1464)
	   by 0xF0C18FE: _eglMatchAndInitialize (egldriver.c:261)

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-03-29  Pavel Grunt  <pgrunt@redhat.com>

	doc: Remove dropped functions
	Dropped in 70a00b8fcc2ca85d3601f6ac4895f906f9032e77

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	widget: Avoid combining ternary with another operators
	Logical operators like "&&" has higher precedency than "?:".
	Readiness of SpiceDisplay was wrongly determined due to missing
	parentheses around the ternary operator.

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=94738
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-03-29  Marc-André Lureau  <marcandre.lureau@gmail.com>

	usb: fix build, missing ')'

2016-03-24  Jonathon Jongsma  <jjongsma@redhat.com>

	usb device widget: don't try to disconnect on failed connect
	When you try to redirect a usb device to the guest and it fails, we
	uncheck the checkbox for this device. This causes the 'clicked' signal
	to be emitted, which causes us to try to disconnect the device (which is
	not currently connected, since the connect operation failed).

	When we try to disconnect an unconnected device, the device manager
	leaks memory and gets left in an inconsistent state because we allocate
	the task data, call _set_redirecting(self, TRUE) and then return early
	with the following warning printed to the terminal:

	(lt-spicy:4638): GSpice-CRITICAL **: spice_usbredir_channel_disconnect_device_async: assertion 'channel != NULL' failed

	To avoid this, disable signal handlers for the checkbox 'clicked'
	signal while we're changing the checkbox state in response to a
	connection error. In addition, add an additional check to
	spice_usb_device_manager_disconnect_device_async() to ensure that the
	passed device is actually connected.

	SpiceUsbDeviceManager: propagate errors from sub-tasks
	_connect_device_async_cb() just turned TRUE unconditionally even if the
	sub-task had failed. Instead, introduce a
	_spice_usb_device_manager_connect_device_finish() function which passes
	up the result of the subtask.

2016-03-24  Dmitry Fleytman  <dfleytma@redhat.com>

	UsbDeviceManager: Deprecate synchronous disconnection method
	Asynchronous disconnection should be used instead.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-03-24  Kirill Moizik  <kmoizik@redhat.com>

	UsbDeviceWidget: Use asynchronous disconnect API
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	UsbDeviceWidget: Consider asynchronous redirection flows
	Gray out redirection controls while there are
	asynchronous redirection flows in progress.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	UsbDeviceWidget: Show info bar during redirection flows
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	usbredir: Disconnect USB device asynchronously
	Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>

	UsbDeviceManager: Track device disconnection operations in progress
	During device disconnection, unwanted hotplug events may happen.
	We need to ignore those therefore we track disconnection operations
	in progress.

	See also comment to commit
	"Do not process USB hotplug events while redirection is in progress"
	that introduces corresponding filtering out logic.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	UsbDeviceManager: Implement asynchronous disconnect device flow
	This commit introduces functions for asynchronous disconnection flows.
	Following commits will make use of those.

	Thread safety is ensured the same way it was done for connection
	flow in previous commits. Disconnect logic is protected by the same
	locks that protect connect/usbredir/channel management logic.

	UsbDeviceManager: Track device redirection operations in progress
	During device connection, unwanted hotplug events may happen.
	We need to ignore those therefore we track redirection operations
	in progress.

	See also comment to commit
	"Do not process USB hotplug events while redirection is in progress"
	that introduces corresponding filtering out logic.

	usbredir: Spawn a different thread for device redirection flow
	On Windows when using usbdk, opening and closing USB device handle,
	i.e. calling libusb_open()/libusb_unref_device() can block for a few
	seconds (3-5 second more specifically on patch author's HW).

	libusb_open() is called by spice_usbredir_channel_open_device().

	libusb_unref_device() is called implicitly via
	usbredirhost_set_device(..., NULL) from
	spice_usbredir_channel_disconnect_device().

	Both these calls happen on the main thread. If it blocks,
	this causes the UI to freeze.

	This commit makes sure libusb_open() is called from a different
	thread to avoid blocking the mainloop when usbdk is used.

	Following commits also move usbredirhost_set_device(..., NULL) call
	to separate threads.

	Since this commit introduces additional execution contexts running in
	parallel to the main thread there are thread safety concerns to be secured.
	Mainly there are 3 types of objects accessed by newly introduced threads:
	  1. libusb contexts
	  2. usbredir context
	  3. redirection channels

	Fortunately libusb accesses are either thread safe or already
	performed by a separate thread and protected by locks as needed.

	As for channels and usbredir, in order to achieve thread safety
	additional locks were introduced by previous patches
	in preparation to adding asynchronous contexts:

	1. Channel objects data accesses from different threads protected with a
	   new lock (device_connect_mutex);
	2. Handling usbredir messages protected by the same new lock in order to
	   ensure there are no messages processing flows in progress when device gets
	   connected or disconnected.

	usbredir: Protect data accessed by asynchronous redirection flows
	This commit adds locking to ensure thread safety required
	after start/stop redirection flows moved to separate threads.
	This is done in preparation to following commits that
	will introduce actual multithreaded access to corresponding
	routines.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	GUdevClient: Do not process USB hotplug events while redirection is in progress
	USB redirection flow on Windows includes a number of reset requests issued
	to the port that hosts the device deing redirected.

	Each port reset emulates device removal and reinsertion and produces
	corresponding hotplug events and a number of device list updates on
	different levels of USB stack and USB redirection engine.

	As a result, queriyng USB device list performed by spice-gtk's hotplug
	event handler may return inconsistent results if performed in parallel
	to redirection flow.

	This patch suppresses handling of USB hotplug events during redirection
	and injects a simulated hotplug event after redirection completion
	in order to properly process real device list changes in case they
	happened during the redirection flow.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	win-usb-dev: Track device redirection operations in progress
	This commit introduces redirecting property of GUdevClient

	This property indicates when a redirection operation
	is in progress on a device. It's set back to FALSE
	once the device is fully redirected to the guest.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	usbredir: Introduce mutex for device (dis)connection
	This commit introduces channel mutex to allow usage of
	channel objects in mutithreaded environments.

	This mutex will be used by future commits to protect
	thread unsafe usbredir functions and data structures.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-03-24  Dmitry Fleytman  <dmitry@daynix.com>

	win-usb-dev: Fix device (un)plug notification handler
	This patch fixes device list change notification handing
	logic for cases when more than one device being plugged
	or unplugged simultaneously.

	The simplest way to reproduce the problematic scenario
	is (un)plugging of a usb HUB with a few devices inserted.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	usb-dev-manager: Fix cbinfo leak in case of abnormal return
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	win-usbredir: Use UsbDk backend when available
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	win-usbredir: Do not use UsbClerk for non-WinUsb backends
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	win-usbredir: Move installer interaction logic to separate functions
	This is a refactoring done in preparation for the next commits.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	usbdk: Load hide rules for auto-redirected devices
	Hide rules order UsbDk to avoid showing specific USB
	devices to Windows PnP manager.

	Spice-gtk loads hide rules for devices that should be
	automatically redirected on connection to prevent Windows
	from showing "New Hardware Found" wizard window for USB
	devices that do not have driver on the local system.

	win-usbredir: Only match USB devices by VID:PID when WinUsb used
	In other cases match devices by BUS:ADDR.

	This commit introduces use_usbclerk flag which is set TRUE
	unconditionally for Windows builds for now. Next patches
	will introduce UsbDk backend integrartion which will set
	this flag in accordance to UsbDk presence on the system.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-03-24  Christophe Fergeau  <cfergeau@redhat.com>

	Add SpiceUsbDeviceManager parameter to device comparison functions
	This additional parameter is currently unused, but this is in
	preparation for the next commits.
	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-03-24  Dmitry Fleytman  <dmitry@daynix.com>

	win-usbredir: Introduce UsbDk wrapper
	Introduce UsbDk API definitions and binding code.

	UsbDk API DLL is loaded dynamically and wrapped by
	a thin glue code layer. This approach was chosen in
	order to make spice-gtk functional without UsbDk
	installed.

	Next patches will introduce dynamic backend selection
	logic, i.e. spice-gtk will try to use UsbDk by
	default and fallback to the old WinUsb/usbclerk
	scheme in case UsbDk is not available.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-03-24  Marc-André Lureau  <marcandre.lureau@gmail.com>

	widget: modify update-area to not require primary surface
	If egl display is enabled, use GL scanout geometry to check intersection
	with the monitor area. This solves displaying GL display without
	software canvas (currently d->area is empty and gl drawing fails)

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	main: don't update display timer for unchanged config
	With virgl, set_monitor_ready() may be called each time the scanout is
	updated to set the monitor area. This will call
	spice_main_update_display(), and keep the timer postponed even if the
	monitor configuration didn't change. Treat unchanged configuration as a
	no-op and keep configuration timer unchanged. This fixes monitor
	autoconfig with virgl (when the display is regularly updated).

	It also solves/avoids problems with a guest running on wayland when the
	"resize-guest" property is TRUE.

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1266484

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	widget: update d->ready based on scanout image available
	d->ready is updated based on monitor area & canvas. In case of GL
	rendering, update it based on monitor area & scanout and add check
	before drawing update.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	egl: check and update scanout after egl init
	Once the egl/GL context are initialized, check if there is a scanout to
	associate to display widget. This solves races when scanout update is
	happening before the egl/GL context is ready.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	widget: make gl-scanout and update-monitor-area privately exported
	The following changes will call these functions from spice-widget-egl.c

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	display: return NULL in spice_display_get_gl_scanout()
	If there is no valid scanout, return NULL.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	widget: enable egl before updating scanout
	The GLArea is realized lazily, when it is made visible in
	set_egl_enabled(). The egl context is initialized once the GLArea is
	realized. Enable egl before updating the scanout.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	egl: check context is ready
	Add a new GL status field to check if the GL context is ready. This
	helps debugging races where GL is called before the context is ready.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	widget: remove superflous WIN32 check
	The egl call is already inside a X11 conditional block.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-03-24  Victor Toso  <victortoso@redhat.com>

	channel-main: fix leak on volume-sync
	7 bytes in 1 blocks are definitely lost in loss record 128 of 10,009
	   at 0x4C2A988: calloc (vg_replace_malloc.c:711)
	   by 0xB6C3200: g_malloc0 (gmem.c:124)
	   by 0x740BD5F: audio_playback_volume_info_cb (channel-main.c:1216)
	   by 0xB11D488: g_task_return_now (gtask.c:1107)
	   by 0xB11DCBD: g_task_return (gtask.c:1165)
	   by 0x742D1F5: spice_pulse_complete_all_async_tasks (spice-pulse.c:1034)
	   by 0x8B6B57C: ext_stream_restore_read_cb (ext-stream-restore.c:141)
	   by 0x10BA63C0: run_action (pdispatch.c:284)
	   by 0x10BA6722: pa_pdispatch_run (pdispatch.c:337)
	   by 0x8B6520D: pstream_packet_callback (context.c:338)
	   by 0x10BA8D7E: do_read (pstream.c:879)
	   by 0x10BAB39A: do_pstream_read_write (pstream.c:189)

	7 bytes in 1 blocks are definitely lost in loss record 129 of 10,009
	   at 0x4C2A988: calloc (vg_replace_malloc.c:711)
	   by 0xB6C3200: g_malloc0 (gmem.c:124)
	   by 0x740BFBF: audio_record_volume_info_cb (channel-main.c:1273)
	   by 0xB11D488: g_task_return_now (gtask.c:1107)
	   by 0xB11DCBD: g_task_return (gtask.c:1165)
	   by 0x742D1F5: spice_pulse_complete_all_async_tasks (spice-pulse.c:1034)
	   by 0x8B6B57C: ext_stream_restore_read_cb (ext-stream-restore.c:141)
	   by 0x10BA63C0: run_action (pdispatch.c:284)
	   by 0x10BA6722: pa_pdispatch_run (pdispatch.c:337)
	   by 0x8B6520D: pstream_packet_callback (context.c:338)
	   by 0x10BA8D7E: do_read (pstream.c:879)
	   by 0x10BAB39A: do_pstream_read_write (pstream.c:189)

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2016-03-23  Marc-André Lureau  <marcandre.lureau@gmail.com>

	widget: use allocation instead of window size
	Since spice-gtk 57df040cc, the SpiceDisplay no longer forces its own
	window. Get allocation instead of window size.  This fixes a "top
	border" issue in spicy with gtk+ >= 3.19.8.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	widget: offset draw updates by widget allocation if necessary
	According to gtk_widget_queue_draw_area() documentation:

	"The region here is specified in widget coordinates. Widget coordinates
	are a bit odd; for historical reasons, they are defined as
	widget->window coordinates for widgets that return TRUE for
	gtk_widget_get_has_window(), and are relative to widget->allocation.x ,
	widget->allocation.y otherwise."

	Since spice-gtk 57df040cc, the SpiceDisplay no longer forces its own
	window. During gtk+ 3.19.8, gtk stack also no longer use its own
	window (commit 9d0e8401). In order to make drawing update resilient to
	such changes, add a function applying offset if necessary.

	This solves drawing glitches and perceived slowness with spice-gtk git
	and gtk+ >= 3.19.8.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-03-23  Pavel Grunt  <pgrunt@redhat.com>

	spicy: Remove configure-event callback
	It is a leftover - see "Remove GnomeRR code"
	commit 30986505ba6041c293c38cb4b7f4b618a59f4716

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-03-23  Frediano Ziglio  <fziglio@redhat.com>

	Avoid to access array with negative numbers

2016-03-22  Fabiano Fidêncio  <fidencio@redhat.com>

	vmcstream,gtask: Do idle ourself instead of leaving it to GTask's heuristic
	Seems that GTask heuristic only makes sense in a non-coroutine case.
	After opening a bug[0] on spice-gtk and a few discussions in the mailing
	list, seems that is completely fine for coroutine code to deal with the
	idle explicitly.

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	vmcstream,gtask: Fix crash when trying to use webdav
	Don't try to get the cancellable from a task that is, for sure (ensured
	by us), NULL. See the backtrace:

	 #0  0x00007ffff29cf250 in g_task_get_cancellable () at /lib64/libgio-2.0.so.0
	 #1  0x00007ffff78a9012 in spice_vmc_input_stream_read_all_async (stream=<optimized out>, buffer=0x7070f8, count=8, io_priority=<optimized out>, cancellable=0x7fffcc00a470, callback=0x7ffff788c190 <client_read_cb>, user_data=0x707b30) at vmcstream.c:187
	 #2  0x00007ffff788c0ab in start_demux (self=0x707b30) at channel-webdav.c:498
	 #3  0x00007ffff2700578 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
	 #4  0x00007ffff27135f0 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
	 #5  0x00007ffff271c43c in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
	 #6  0x00007ffff788acca in emit_main_context (opaque=0x7fffbfffe880) at gio-coroutine.c:200
	 #7  0x00007ffff242bab3 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
	 #8  0x00007ffff242be60 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
	 #9  0x00007ffff242c182 in g_main_loop_run () at /lib64/libglib-2.0.so.0
	 #10 0x0000000000405df6 in main (argc=<optimized out>, argv=<optimized out>) at spicy.c:1897

	It was pointed out during the review and, somehow, missed :-\

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-03-22  Jeremy White  <jwhite@codeweavers.com>

	Include gdk/gdkwayland.h anytime GDK_WINDOWING_WAYLAND is defined.
	A specific GTK version check is not appropriate for this particular include.
	This fixes compilation on Debian Jessie.

2016-03-22  Pavel Grunt  <pgrunt@redhat.com>

	Remove extra checks before g_cancellable_disconnect()
	If cancellable is NULL or handler_id is 0 the function does nothing.
	Acked-by: Victor Toso <victortoso@redhat.com>

	usb-device-manager: Remove invalid return annotation
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-03-22  snir sheriber  <ssheribe@redhat.com>

	usbredir_handle_msg: rename data to err_data
	To better reflect what this variable is used for and change the declare
	location such that it will be declared only if it should
	Acked-by: Victor Toso <victortoso@redhat.com>

2016-03-21  Fabiano Fidêncio  <fidencio@redhat.com>

	mingw: Fix build failure due to epoxy/egl.h header
	epoxy/egl.h header is not provided by mingw-epoxy package.
	Let's avoid egl usage when building using mingw then.

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

	channel-usbredir: Fix crash due to a Task returning earlier than expected
	g_task_return_error() has been completing the task immediately, not
	cleaning up/setting up the device state to STATE_DISCONNECTED. It's been
	causing a double free when trying to redirect a device without having
	the ACL permissions for doing it. See the backtrace:

	 #0  0x00007ffff24dc07d in g_type_check_instance_is_fundamentally_a (type_instance=type_instance@entry=0x14779d0, fundamental_type=fundamental_type@entry=80) at gtype.c:4032
	 #1  0x00007ffff24bc447 in g_object_unref (_object=0x14779d0) at gobject.c:3076
	 #2  0x00007ffff7bafc2a in connect_cb (gobject=0x87d9a0 [SpiceUsbDeviceManager], res=0x96f830, user_data=0x143e0e0)
	     at usb-device-widget.c:485
	 #3  0x00007ffff277f5a3 in g_task_return_now (task=0x96f830 [GTask]) at gtask.c:1106
	 #4  0x00007ffff277fc4e in g_task_return (task=0x96f830 [GTask], type=<optimized out>) at gtask.c:1164
	 #5  0x00007ffff786c277 in spice_usb_device_manager_channel_connect_cb (gobject=0x917940 [SpiceUsbredirChannel], channel_res=0x96f900, user_data=0x96f830) at usb-device-manager.c:1094
	 #6  0x00007ffff277f5a3 in g_task_return_now (task=0x96f900 [GTask]) at gtask.c:1106
	 #7  0x00007ffff277fc4e in g_task_return (task=0x96f900 [GTask], type=<optimized out>) at gtask.c:1164
	 #8  0x00007ffff786699c in spice_usbredir_channel_open_acl_cb (gobject=0xa73b00 [SpiceUsbAclHelper], acl_res=0x96f9d0, user_data=0x917940) at channel-usbredir.c:300
	 #9  0x00007ffff277f5a3 in g_task_return_now (task=0x96f9d0 [GTask]) at gtask.c:1106
	 #10 0x00007ffff277fc4e in g_task_return (task=0x96f9d0 [GTask], type=<optimized out>) at gtask.c:1164
	 #11 0x00007ffff27804d0 in g_task_return_new_error (task=0x96f9d0 [GTask], domain=<optimized out>, code=<optimized out>, format=<optimized out>) at gtask.c:1744
	 #12 0x00007ffff786eade in cb_out_watch (channel=0x1488740, cond=G_IO_IN, user_data=0xa73b00) at usb-acl-helper.c:128
	 #13 0x00007ffff21b8e3a in g_main_context_dispatch (context=0x647390) at gmain.c:3154
	 #14 0x00007ffff21b8e3a in g_main_context_dispatch (context=context@entry=0x647390) at gmain.c:3769
	 #15 0x00007ffff21b91d0 in g_main_context_iterate (context=0x647390, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3840
	 #16 0x00007ffff21b94f2 in g_main_loop_run (loop=0x13d1ae0) at gmain.c:4034
	 #17 0x00007ffff3ca5440 in gtk_dialog_run () at /lib64/libgtk-3.so.0
	 #18 0x0000000000406a18 in menu_cb_select_usb_devices (action=0x9d62f0 [GtkAction], data=0x69aef0) at spicy.c:394
	 #22 0x00007ffff24d28ff in <emit signal ??? on instance 0x9d62f0 [GtkAction]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439
	     #19 0x00007ffff24b77a5 in g_closure_invoke (closure=0xa0d0c0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffcf70, invocation_hint=invocation_hint@entry=0x7fffffffcef0) at gclosure.c:801
	     #20 0x00007ffff24c9851 in signal_emit_unlocked_R (node=node@entry=0x63fc10, detail=detail@entry=0, instance=instance@entry=0x9d62f0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcf70) at gsignal.c:3627
	     #21 0x00007ffff24d2530 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd130) at gsignal.c:3383
	 #23 0x00007ffff3bc23b0 in _gtk_action_emit_activate () at /lib64/libgtk-3.so.0
	 #27 0x00007ffff24d28ff in <emit signal ??? on instance 0x9a8730 [GtkImageMenuItem]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439
	     #24 0x00007ffff24b77a5 in g_closure_invoke (closure=closure@entry=0x6607d0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffd3f0, invocation_hint=invocation_hint@entry=0x7fffffffd370) at gclosure.c:801
	     #25 0x00007ffff24c938c in signal_emit_unlocked_R (node=node@entry=0x661050, detail=detail@entry=0, instance=instance@entry=0x9a8730, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd3f0) at gsignal.c:3557
	     #26 0x00007ffff24d2530 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd5b0) at gsignal.c:3383
	 #28 0x00007ffff3e7094e in gtk_widget_activate () at /lib64/libgtk-3.so.0
	 #29 0x00007ffff3d4e4f6 in gtk_menu_shell_activate_item () at /lib64/libgtk-3.so.0
	 #30 0x00007ffff3d4e824 in gtk_menu_shell_button_release () at /lib64/libgtk-3.so.0
	 #31 0x00007ffff3d30fda in _gtk_marshal_BOOLEAN__BOXEDv () at /lib64/libgtk-3.so.0
	 #32 0x00007ffff24b79d4 in _g_closure_invoke_va (closure=closure@entry=0x644d10, return_value=return_value@entry=0x7fffffffd900, instance=instance@entry=0x80faa0, args=args@entry=0x7fffffffd9d0, n_params=<optimized out>, param_types=0x644d40) at gclosure.c:864
	 #33 0x00007ffff24d1dd3 in g_signal_emit_valist (instance=0x80faa0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd9d0) at gsignal.c:3292
	 #34 0x00007ffff24d28ff in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439
	 #35 0x00007ffff3e6e4bc in gtk_widget_event_internal () at /lib64/libgtk-3.so.0
	 #36 0x00007ffff3d2e34e in propagate_event () at /lib64/libgtk-3.so.0
	 #37 0x00007ffff3d300fc in gtk_main_do_event () at /lib64/libgtk-3.so.0
	 #38 0x00007ffff38a8e92 in gdk_event_source_dispatch () at /lib64/libgdk-3.so.0
	 #39 0x00007ffff21b8e3a in g_main_context_dispatch (context=0x647390) at gmain.c:3154
	 #40 0x00007ffff21b8e3a in g_main_context_dispatch (context=context@entry=0x647390) at gmain.c:3769
	 #41 0x00007ffff21b91d0 in g_main_context_iterate (context=0x647390, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3840
	 #42 0x00007ffff21b94f2 in g_main_loop_run (loop=0x6e2730) at gmain.c:4034
	 #43 0x000000000040b2f9 in main (argc=1, argv=0x7fffffffde48) at spicy.c:1920

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-03-18  Pavel Grunt  <pgrunt@redhat.com>

	Adjust to Gtk+ 3.10
	Dependency since f9a1aad85fcc76dd76c454b51fbce5e07c9b145f

	Remove unneeded GTK_CHECK_VERSION guards

	Acked-by: Victor Toso <victortoso@redhat.com>

	Adjust to GLib 2.36
	Dependency since 8693e7d3f7de1ff102082212fa6e35fb1a252ef7

	Remove glib-compat files and most of GLIB_CHECK_VERSION guards

	Acked-by: Victor Toso <victortoso@redhat.com>

	Move strtok_r from glib-compat to spice-uri
	It is not glib specific and it is only used in spice-uri

	Acked-by: Victor Toso <victortoso@redhat.com>

	spice-util: Fix alignment
	Acked-by: Victor Toso <victortoso@redhat.com>

	usb-acl-helper: Remove extra check for NULL
	g_cancellable_cancel() and g_clear_object() can handle it

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-03-17  Pavel Grunt  <pgrunt@redhat.com>

	spicy: s/Automagic/Automatic/
	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	spice-display: Remove auto-clipboard notify
	It was used to notify the (deprecated) auto-clipboard property of
	the SpiceDisplay everytime the SpiceGtkSession emits its auto-clipboard
	notify.

	The commit 70a00b8fcc2ca85d3601f6ac4895f906f9032e77 removed the property
	from SpiceDisplay causing a runtime warning:

	GLib-GObject-WARNING **: g_object_notify: object class 'SpiceDisplay' has no property named 'auto-clipboard'
	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

	display: Lower level of warning for empty monitor config
	It is a valid case when a guest requests to turn off monitors, eg:
	 xrandr --output Virtual-0 --off

	Related:
	https://bugzilla.redhat.com/show_bug.cgi?id=1061942

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-03-15  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: fix 'Only <spice-client.h> can be included directly' warning
	Tests should be allowed to include directly private headers. Set
	__SPICE_CLIENT_H_INSIDE__ where necessary or include spice-client.h
	where possible.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	Lower gtk+ requirement to 3.10
	Make GtkGlArea optional allows to lower gtk+ requirement to
	3.10 (required for GtkStack). However, gl display is unsupported on
	wayland with gtk+ < 3.16.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	build-sys: remove epoxy from pc requires
	libepoxy doesn't need to figure in spice-gtk pkg-config requires, it's a
	private dependency.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-03-14  Fabiano Fidêncio  <fidencio@redhat.com>

	wocky-http-proxy: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	win-usb-driver-install: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	vmcstream: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	usb-device-manager: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	usb-acl-helper: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	spice-pulse: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	spice-gstaudio: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	spice-channel: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	smartcard-manager: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	channel-usbredir: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	channel-port: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	channel-main: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

	channel-base: Use GTask instead of GSimpleAsyncResult
	Instead of using GSimpleAsyncResult, use the new GTask API, which is
	much more straightforward.
	For using the new GTask API, let's bump GIO (part of GLib) dependency
	version to 2.36, which is safe based on major distro support:
	- Debian Jessie: glib-2.42
	- RHEL-7.1: glib-2.40
	- SLES12: glib-2.38
	- Ubuntu LTS 14.04: glib-2.40

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-03-14  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk: add GtkGLArea
	GtkGLArea is the proper modern way to have opengl in an gtk+
	application. Unfortunately, it may use various backends and interfaces
	to initialize it, but dmabuf image sharing requires egl atm.

	This patch keeps using our egl setup on X11, while it uses gtkglarea on
	known gdk backend based on egl, such as the wayland one. This brings
	wayland support for local gl to spice-gtk.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: use GtkStack
	Move the GtkDrawingArea in a GtkStack, so other widgets can be switched
	to for the display: the next patch adds a GtkGLArea for an opengl
	rendering. One can imagine other display widgets to show text etc..

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: require gtk+ 3.16
	3.16 is the minimal version for GtkGLArea widget, used in following
	patches.

	Drop conditional epoxy support, as it is now required by gtk+.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: drop deprecated stuff from spice-gtk
	Breaking ABI is a good time to remove deprecated code.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	Drop GTK+ 2.0
	Not so many systems require gtk+ 2.0 these days, let's move on.

	This drops the old python bindings (non-gir based), and the
	unsteady/experimental gtk2-only XShm support.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: make SpiceGrabSequence private
	Do not leak internals of SpiceGrabSequence in public headers. This makes also
	the class final, which let us extend more easily without fear of breaking ABI.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: make SpiceUsbDeviceWidget private
	Do not leak internals of SpiceUsbDeviceWidget in public headers. This makes also
	the class final, which let us extend more easily without fear of breaking ABI.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: make SpiceGtkSession private
	Do not leak internals of SpiceGtkSession in our headers. This makes also
	the class final, which let us extend more easily without fear of
	breaking ABI.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	gtk: make SpiceDisplay private
	Do not leak internals of SpiceDisplay in our headers. This makes also
	the class final, which let us extend more easily without fear of
	breaking ABI.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

	build-sys: bump spice-gtk current version info
	The following patches need to break the ABI (in particular the parent of the
	SpiceDisplay widget).

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-03-11  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: fix make check when polkit not available
	acl-helper needs polkit (and unix atm) to build.

	doc: add a bunch of Since: 0.31

	Prepare for v0.31 release

	logging: use more idiomatic spice-gtk logging
	spice-gtk uses SPICE_DEBUG for debug lines (for now), and prefer direct
	glib glog/g_warning.

	session: use debug message for optional key value
	This fixes make check failing because of recent spice-common logging
	switch to glib.

2016-03-11  Jonathon Jongsma  <jjongsma@redhat.com>

	Update POTFILES.skip
	spicy.desktop.in no longer exists.

	Add tests for usb-acl-helper

	usb-acl-helper: add env var for specifying acl helper binary
	Setting SPICE_USB_ACL_BINARY allows us to execute a custom mock acl
	helper binary for testing purposes.

	Rename spice_usb_acl_helper_open_acl() to _open_acl_async()
	Follow established practice and make the function's behavior more
	explicit.

	Remove spice_usb_acl_helper_close_acl()
	This function is now only called after the open_acl() task completes,
	and in that scenario it basically does the same thing that the
	SpiceUsbAclHelper destructor does, so it's pointless. Remove it.

	usb-acl-helper: Avoid deadlock when cancelled
	cancelled_cb() (which is triggered when the GCancellable's "cancelled"
	signal is emitted) called spice_usb_acl_helper_close_acl(), which calls
	spice_usb_acl_helper_cleanup(), which in turn calls
	g_cancellable_disconnect(). Calling g_cancellable_disconnect() from
	within a "cancelled" handler results in a dealock, as mentioned in the
	documentation. Instead of closing the acl here, simply cancel the task
	here. The cleanup() call will happen when the SpiceUsbAclHelper object
	is destroyed.

	Introduce spice_usb_acl_helper_cancel()
	This function explicitly cancels a open_acl() task. It is similar to
	close_acl(), but its behavior is more explicit. This function is very
	similar to the existing close_acl() function but it requires that the
	task has not already been completed. Also, although it releases its
	reference on priv->result to avoid circular references, it doesn't call
	cleanup(), preferring instead to wait for the destructor to clean up.
	This makes the close_acl() function essentially pointless and will be
	removed in the following commit.

2016-03-10  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Update spice-common submodule
	Pick codegen build fix

2016-02-23  Francois Gouget  <fgouget@codeweavers.com>

	spice-gtk: Fix the signedness of a couple of mm-time traces
	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-02-23  Ignacio Casal Quinteiro  <icq@gnome.org>

	namedpipelistener: do not leak the error message

2016-02-18  Christophe Fergeau  <cfergeau@redhat.com>

	Simplify spice_usb_device_manager_device_to_libdev()
	The Windows-specific version duplicates some code from
	spice_usb_device_equal_libdev(), this commit
	switches to using that helper instead.

	Simplify spice_usb_device_equal_libdev()
	The Windows-specific version duplicates some code from
	spice_usb_device_manager_libdev_match(), this commit
	switches to using that helper instead.

2016-02-16  Marc-André Lureau  <mlureau@redhat.com>

	gtk: add spice-widget GL scanout support
	Hook to spice-glib events to show the GL scanout.

	The opengl context is created with egl, and is currently
	x11-only (supporting wayland with bare-egl doesn't seem trivial).

	Using GtkGLArea is left for a future series, since SpiceDisplay widget
	is a GtkDrawingArea and can't be replaced without breaking
	ABI. Furthermore, GtkGLArea won't work on non-egl contexts, so this
	approach is necessary on gtk+ < 3.16 or X11 (because gdk/x11 uses glx).

	Acked-by: Victor Toso <victortoso@redhat.com>
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2016-02-13  Marc-André Lureau  <mlureau@redhat.com>

	glib: add local GL scanout support
	Add spice-glib support for gl scanout messages.

	A note about SpiceGlScanout: it is struct with scanout details,
	registered as a boxed type, with associated gl-scanout property. That
	way, it doesn't need a seperate signal for change notification and the
	current scanout can be retrieve with gobject getter. Since boxed
	property are always duplicated by g_object_get(), an additional
	spice_display_get_gl_scanout() method returns the current scanout
	without duplication (that's what spice-gtk display widget will use).

2016-02-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: check for epoxy-egl support
	The following code requires epoxy with egl support. Check for pkg-config
	and egl headers.

	Add spice_channel_unix_read_fd()
	Utility function used in the messages with socket ancillary fd.

2016-02-13  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: bump to spice-protocol 0.12.11
	Needed for GL messages

2016-02-12  Fabiano Fidêncio  <fidencio@redhat.com>

	typo: s/GTask/GSimpleAsyncResult
	Seems that I messed up with cd0c1008316e90bce925e1448ffcabb366e88f8f
	while rebasing my GTask series on top of this patch, causing a build
	breakage due to non-intentional insertion of a GTask replacing a
	GSimpleAsyncResult.

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	Use #ifdef {HAVE,USE}_FOO instead of #if {HAVE,USE}_FOO
	While "#if USE_FOO" checks for the value of the variable USE_FOO,
	"#ifdef" checks whether USE_FOO is defined or not.

	It means, if we had something like: #define USE_FOO 0, we would have:
	 #if USE_FOO
	 /* Any code in here would NOT be compiled */
	 #endif

	 #ifdef USE_FOO
	 /* Any code in here would be compiled */
	 #endif

	No problem was faced on spice-gtk till now because either USE_FOO is not
	defined or defined as 1, but let's try to have it standardized.

	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>

2016-02-03  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk: replace configure-event for size-allocate
	For size-allocate, it's simpler to connect to the signal rather than
	override the default signal handler since there is no automatic chaining
	to parent handler otherwise. Doing this removes the need to have a
	window.

	Acked-by: Victor Toso <victortoso@redhat.com>

2016-01-22  Fabiano Fidêncio  <fidencio@redhat.com>

	usb-device-{manager,widget}: Add counter of free channels
	As the message showed when the last usbredir channel is taken can be a
	bit confusing, let's add a counter of free channels to the widget's
	label.
	In order to add the counter, a new property for SpiceUsbDeviceManager
	was introduced ("free-channels").

	Related: rhbz#1298772

	Remove GSLice usage
	It's being slowly deprecated in glib
	https://bugzilla.gnome.org/show_bug.cgi?id=754687

2016-01-19  Victor Toso  <victortoso@redhat.com>

	gstaudio: set output parameter to NULL on error
	This is not really triggered in the current code but this is usually
	expected in case of errors; Also, the same function on record side
	already does this.

	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>

2016-01-14  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: silence vala deprecated function usage warnings
	This silence usage of deprecated glib declarations from vala generated code.

	Acked-by: Fabiano Fidêncio <fidencio@redhat.com>

2016-01-14  Marc-Andre Lureau  <marcandre.lureau@gmail.com>

	Update spice-common
	This is an update to fix build issues with spice-protocol.git.
	generated_server_demarshallers.c: In function
	‘parse_msgc_display_gl_draw_done’:
	generated_server_demarshallers.c:767:23: error:
	‘SpiceMsgcDisplayGlDrawDone’ undeclared (first use in this function)
	     mem_size = sizeof(SpiceMsgcDisplayGlDrawDone);
	...

	Also needed for upcoming gl-scanout messages.

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2016-01-07  Victor Toso  <victortoso@redhat.com>

	channel-main: remove unused header rect.h
	It was included in be8ff99571478deb5c8d116134f65ed2b788dbd3 but with no
	use.

	Acked-by: Marc-André Lureau <mlureau@redhat.com>

2016-01-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: remove xrandr
	Not needed anymore (probably since gnome-rr was removed in 30986505b)

2015-12-21  snir sheriber  <ssheribe@redhat.com>

	Grab keyboard based on session focus.
	When using multiple monitors moving mouse between monitors releases
	keyboard grab.

	Reproduce bug
	-Open multiple monitors remote-viewer session
	-Click on one of the monitors to get focus & keyboard-grab
	-Move mouse to another monitor and try keyboard command (do not click)
	At this point all keyboard commands are being executed on the client
	machine instead of the remote machine

	I added keyboard_has_focus and mouse_has_pointer variables at the
	session and now these properties are being tested for the session
	instead for the current widget (works also when using alt-tab).

	Resolves: rhbz#1275231

	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2015-12-21  Lukas Venhoda  <lvenhoda@redhat.com>

	ppc: Fix spicy-screenshot colors on BE machines
	Save screenshot in proper endianess
	xRGB on LE machine and BGRx on BE machine
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

	ppc: Fix colors on ppc when using GLZ
	Fixes color order on PowerPC when using GLZ image compression.
	Acked-by: Pavel Grunt <pgrunt@redhat.com>

2015-12-21  Fabiano Fidêncio  <fidencio@redhat.com>

	ppc: Fix message endianess

	ppc: Fix header endianess

2015-12-18  Pavel Grunt  <pgrunt@redhat.com>

	build-sys: Use sasl check from spice-common
	Support only libsasl2 providing libsasl2.pc file

	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2015-12-10  Javier Celaya  <javier.celaya@flexvdi.com>

	Call spice_marshaller_flush on message write
	spice_marshaller_flush must be called before writing a message to
	calculate pointer offsets.

	This is only an issue when ptr submarshallers are used, which currently
	is only used by Tunnel::service_add. Since this is disabled by default,
	this buug is not going to be hit by the current codebase.

2015-12-09  Christophe Fergeau  <cfergeau@redhat.com>

	gst: Fix typo in preprocessor symbol
	When the GStreamer backend is used, HAVE_GSTAUDIO is defined, not
	HAVE_GST_AUDIO.

	smartcard: Fix compilation with older libcacard
	e0c2182937 dropped some #include from channel-smartcard.c and spicy.c as
	they were redundant with the headers already included from
	spice-common/common/messages.h. While this is true for the newer
	libcacard.h header, we need to include more headers to support older
	libcacard, or compilation breaks.

2015-12-09  Francois Gouget  <fgouget@codeweavers.com>

	spice-gtk: Recover from GStreamer audio initialization errors
	gst_init() will terminate the program in case of a failure so it's
	better to use gst_init_check() so we can recover from errors.

2015-12-08  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Warn about missing GStreamer 1.0 audio runtime elements
	Their absence should not be reported as an error since they are not
	needed for the build, but the developer will need them to test the code
	so it's appropriate to warn him.

2015-12-08  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Check for GStreamer 1.0 audio with SPICE_CHECK_GSTREAMER()

2015-12-08  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Allow simultaneous support for Pulse and GStreamer audio
	Rather than GStreamer/PulseAudio backend being mutually exclusive at
	compile-time, this commit allows to enable both at the same time.
	PulseAudio will then be favoured, with a fallback to GStreamer if it's
	not available.
	Note that --with-audio is kept for backward compatibility.

2015-12-08  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Use libcacard.h if possible
	Drop unneeded includes (that are already undirectly included).

	Remove unmaintained spicy.nsis
	Remove gtkrc too, and cleanup EXTRA_DIST ($(desktop_in_files) is unused)

	Update spice-common
	For new libcacard.h usage

	Fix use after free of uri
	"path" points to "uri" memory, move free(uri) later.

	Found thanks to valgrind :)

2015-11-25  Christophe Fergeau  <cfergeau@redhat.com>

	Update spice-common submodule
	The next commit is going to use SPICE_WARNING which was added recently
	to spice-common

	This submodule update changes:

	Christophe Fergeau (5):
	      build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2
	      build-sys: Fix error in SPICE_CHECK_LZ4 description
	      build-sys: Set automake conditional in SPICE_CHECK_SMARTCARD
	      build-sys: Rename SUPPORT_GL to HAVE_GL
	      build-sys: Add missing # to comment

	Francois Gouget (3):
	      build-sys: Add the SPICE_WARNING() and SPICE_PRINT_MESSAGES m4 macros
	      build-sys: Add SPICE_CHECK_GSTREAMER()
	      build-sys: Add SPICE_CHECK_GSTREAMER_ELEMENTS()

	Lukas Venhoda (4):
	      ssl-verify: Only check addr length when using IP addr
	      m4: Require glib version >= 2.22
	      ssl-verify: Changed IPv4 hostname to IPv6
	      canvas_base: Remove redundant switch case block

2015-11-25  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Use SPICE_WARNING() to issue the DBus warning

2015-11-24  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Prefix the configure audio GStreamer variables with GSTAUDIO_
	This lets us avoid naming conflicts when using GStreamer for other
	purposes.

	Acked-by: Victor Toso <victortoso@redhat.com>

2015-11-19  Jay.han  <ezzzehxx@gmail.com>

	file transfer: send cancel message when user cancels a transfer
	When a user cancel's a file transfer, we should send a STATUS_CANCELED
	message rather than an STATUS_ERROR message. The latter triggers a bug
	in the vdagent where the file remains opened by the vdagent in the guest
	and cannot be removed.

2015-11-19  Marek Kasik  <mkasik@redhat.com>

	Be more specific in the case of authentication error
	This patch adds SPICE_CLIENT_ERROR_AUTH_NEEDS_USERNAME error
	for the case when authentication fails because of missing username.
	This can happen when GSSAPI method is used.

	https://bugs.freedesktop.org/show_bug.cgi?id=92994

2015-11-18  Pavel Grunt  <pgrunt@redhat.com>

	spicy: Add support for changing compression

	channel-display: Add spice_display_change_preferred_compression

2015-11-11  Pavel Grunt  <pgrunt@redhat.com>

	Do not export symbol of non-existent function

2015-11-10  Jonathon Jongsma  <jjongsma@redhat.com>

	file xfer: Fix segfault when rebooting
	Recent changes to file transfer introduced a regression where the client
	would crash when rebooting a guest after performing a file transfer.
	This was caused because the SpiceFileTransferTask is freed when it is
	completed, but is not removed from the MainChannel's hash table. When we
	reboot the guest and lose our vdagent connection, we iterate through the
	list of tasks in the hash table and complete them. But since we did not
	remove the already-completed tasks from this hash table, this hash table
	contains already-freed memory.

	To fix the issue, take an extra ref for the async operations (so that
	completing the task won't free an object that is stored in the hash table). In
	addition, connect to the task's "finished" signal and remove it from the hash
	table when it becomes finished.

	Bug reported via email by Jay.han <ezzzehxx@gmail.com>. Valgrind report
	below:

	==6926== Invalid read of size 8
	==6926==    at 0x508177B: spice_file_transfer_task_completed (channel-main.c:2941)
	==6926==    by 0x50846DC: set_agent_connected (channel-main.c:462)
	==6926==    by 0x5073A43: spice_channel_recv_msg (spice-channel.c:1892)
	==6926==    by 0x5073BE3: spice_channel_iterate_read (spice-channel.c:2132)
	==6926==    by 0x5075D25: spice_channel_coroutine (spice-channel.c:2170)
	==6926==    by 0x50A6EFE: coroutine_trampoline (coroutine_ucontext.c:63)
	==6926==    by 0x50A6CC8: continuation_trampoline (continuation.c:55)
	==6926==    by 0x65C2B5F: ??? (in /lib/x86_64-linux-gnu/libc-2.19.so)
	==6926==    by 0x151331C7: ???
	==6926==  Address 0x29971fd8 is 168 bytes inside a block of size 184 free'd
	==6926==    at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
	==6926==    by 0x5E33142: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0)
	==6926==    by 0x50815DA: file_xfer_close_cb (channel-main.c:1826)
	==6926==    by 0x5AEBD5C: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4000.0)
	==6926==    by 0x5B0F41A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4000.0)
	==6926==    by 0x5B0F438: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4000.0)
	==6926==    by 0x609BCE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
	==6926==    by 0x609C047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
	==6926==    by 0x609C309: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
	==6926==    by 0x4058AB: main (spicy.c:1858)

2015-11-10  Francois Gouget  <fgouget@codeweavers.com>

	build-sys: Remove some dead configure.ac DBus code
	Acked-by: Christophe Fergeau <cfergeau@redhat.com>

2015-11-04  Francois Gouget  <fgouget@codeweavers.com>

	spice-gtk: Fix error handling in stream_get_current_frame()
	*data must always be set to NULL on error.

2015-10-30  Victor Toso  <victortoso@redhat.com>

	channel-usbredir: drop isoc packets on low bandwidth
	When channel wants to send much more data then the wire can handle, the
	queue grows fast. This patch does not limit the queue growth but
	introduces an internal API to check if queue size is too big.

	This internal API is used in usbredir_buffered_output_size_callback
	which is called before any isoc pacaket is queued in usbredir. The
	usbredir implements the logic to:
	 - only drop isoc packets
	 - while dropping packtes does still give us video frames from and above
	   10fps streams

	An easy way to test locally is sharing and webcam and with tc:
	    tc qdisc add dev lo root netem delay 100ms
	    tc qdisc change dev lo root netem delay 1000ms
	    tc qdisc del dev lo root netem

	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1264156

2015-10-23  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Remove unused conditional

	Adjust to spice-common spice-deps.m4 changes
	This commit updates spice-common to latest git master.
	Since the argument to the SPICE_CHECK_xxx macros is now unused, it's
	cleaner to remove it.

	Christophe Fergeau (3):
	      Add marshaller test case
	      build-sys: Use ${PKG_CONFIG} rather than pkg-config
	      build-sys: Rework SPICE_CHECK_* m4 macros

	Frediano Ziglio (1):
	      common: Fix typo in comment

	Javier Celaya (1):
	      Fix linearization of several marshallers with one item

2015-10-22  Jonathon Jongsma  <jjongsma@redhat.com>

	Remove noisy debug statement
	This isn't terribly useful for general debugging and makes the log
	pretty noisy when transferring large files.

	Don't print error message on successful file transfer
	In certain circumstances we were printing an error message even though
	the file transfer had completed successfully. It didn't cause any
	problems, but it pointed out an issue in the handling of outgoing agent
	messages.

	The described behavior was generally only encountered when there were multiple
	files being transferred at once, and most often when one or two files were
	significantly smaller than another file being transferred. For example, two
	20kB files and another 3MB file. The failure mechanism is basically as follows:

	For each file transfer, we read a chunk for the file and then we queue a series
	of messages to the guest and wait for them to be flushed before continuing to
	read a new chunk of the file. (Since the maximum agent message size is 2kB, each
	64kB chunk of file being read can generate up to 32 messages at a time). The
	file transfer task remains in "pending" state until the flush operation is
	complete. Since all agent messages go into a single channel-wide queue, waiting
	for the messages to be flushed meant waiting for *all* outgoing messages to be
	flushed, including those that were queued after we called flush_async().

	Since agent messages can only be sent if the client has enough agent tokens, it
	can take a little while for all queued messages to be sent.  This means that
	even if a file transfer task has sent out all of its data to the guest, it can
	be kept in "pending" state for some time if other file transfer tasks or other
	agent messages are added to the queue. In this situation, The guest might
	notice that it has received all of the data for a file transfer task and send a
	XFER_STATUS_SUCCESS message while we're still in "pending" state.

	This patch changes to code so that flush_async() only waits for the
	currently-queued messages to be sent. This means that it is not affected by any
	new messages that get added to the outgoing queue after we've called
	flush_async(). This means that the task will exit "pending" state immediately
	after sending out our last data packet.

	Fixes: rhbz#1265562

	MainChannel: move task free from finalize to dispose
	In order to avoid reference cycles, you're supposed to release
	references in dispose, especially to those objects that can hold
	references to yourself. This probably wasn't causing any leaks, since
	the file transfer tasks generally are not alive when the main channel is
	destroyed, but it's more proper.

2015-10-16  Jonathon Jongsma  <jjongsma@redhat.com>

	FileTransferTask: ensure we emit 'finished' signal
	In the case where a file cannot be opened for reading, we were not
	emitting a 'finished' signal to communicate the error to the client.

	I was intending to further fix this issue by 'rejecting' the drop (in
	SpiceDisplay) when the URI list contains invalid files (e.g.
	directories). This would prevent a 'new-file-transfer' signal from even
	being emitted for these invalid files. But this turns out to be not very
	useful since there's no real feedback given to the user to indicate why
	the drop failed. So it's probably better for client applications to get
	the 'new-file-transfer' and 'finished' signals so that they can present
	the error to the user to explain why the attempted transfer did not
	work.

2015-10-14  Christophe Fergeau  <cfergeau@redhat.com>

	Free display_cache in cache_unref
	Otherwise it will be leaked. There is no cache_ref function, or helper
	increasing a refcount/taking a reference so cache_unref really is a
	cache_free method.

	This fixes:

	==27687== 64 bytes in 4 blocks are definitely lost in loss record 250 of 435
	==27687==    at 0x4C28C50: malloc (vg_replace_malloc.c:299)
	==27687==    by 0xA6AF058: g_malloc (gmem.c:94)
	==27687==    by 0xA6C5982: g_slice_alloc (gslice.c:1007)
	==27687==    by 0x40F112: cache_new (spice-channel-cache.h:54)
	==27687==    by 0x40F112: cache_image_new (spice-channel-cache.h:64)
	==27687==    by 0x40F112: spice_session_init (spice-session.c:294)
	==27687==    by 0xA239B4A: g_type_create_instance (gtype.c:1870)
	==27687==    by 0xA21C31A: g_object_new_internal (gobject.c:1779)
	==27687==    by 0xA21DB10: g_object_newv (gobject.c:1926)
	==27687==    by 0xA21E3FB: g_object_new (gobject.c:1619)
	==27687==    by 0x40FF4D: spice_session_new (spice-session.c:1479)
	==27687==    by 0x40E678: test_session_uri (session.c:35)
	==27687==    by 0xA6CE47A: test_case_run (gtestutils.c:2158)
	==27687==    by 0xA6CE47A: g_test_run_suite_internal (gtestutils.c:2241)
	==27687==    by 0xA6CE642: g_test_run_suite_internal (gtestutils.c:2253)

	Rename display_cache::cache_unref to cache_free
	display_cache is no longer refcounted since commit c9d4773, but this is
	not an issue as even before, the fact that it was refcounted was not
	used as there was no corresponding cache_ref() call (and
	g_hash_table_ref() was not called directly either).
	As the next commit will free memory from cache_unref() rather than just
	releasing a reference, it's better to make it obvious that this method
	is a _free() method rather than an _unref() one.

2015-10-09  Jonathon Jongsma  <jjongsma@redhat.com>

	New file transfer API
	There were several shortcomings to the existing file transfer API,
	particularly in terms of monitoring ongoing file transfers. The major
	issue is that spice_main_file_copy_async() allows you to pass an array
	of files, but the progress callback does not provide a way to
	identify which file the callback is associated with. This makes it
	nearly impossible for an application to monitor file transfers.

	In addition, the SpiceDisplay widget automatically handles drag-and-drop
	actions on the widget, and initiates file transfers without allowing the
	application to specify a progress callback. So there's no way for an app
	to monitor file transfers that are initiated via drag and drop.

	http://lists.freedesktop.org/archives/spice-devel/2015-September/021931.html
	has a more detailed explanation of the issues.

	This change doesn't break the existing API, but adds some new API that
	will allow an application to monitor file transfer progress, even for
	transfers that are initiated within spice-gtk itself.

	- A new public SpiceFileTransferTask object is added.
	- The SpiceMainChannel object gains a "new-file-transfer" signal that is
	  emitted whenever a new file transfer is initiated. The
	  SpiceFileTransferTask object is passed to the signal handler.
	- The application can retain this object and monitor its 'progress'
	  property to be notified when the progress of the file transfer
	  changes. The SpiceFileTransferTask::finished signal indicates when the
	  given file transfer has completed. The application can also cancel the
	  file transfer by calling the _cancel() method.

	The 'spicy' test application has been updated to use this new API and
	display a simple dialog showing the progress of individual files.

	Fix progress monitoring in spice_main_file_copy_async
	spice_main_file_copy_async() allows you to pass a NULL-terminated array
	of files to transfer to the guest. It also allows you to pass a
	progress_callback function to monitor the progress of the transfer, but
	this progress callback is called separately for each file that is
	transferred, and there are no parameters that allow the caller to
	determine which file a given callback corresponds to. This makes it very
	difficult to monitor the progress.

	To make this more usable, I've changed it so that the progress callback
	doesn't simply report the number of bytes read and total size of the
	current file. Instead, we add up the status of all current transfers and
	report that value to the callback.

	Don't wrap included headers in G_BEGIN|END_DECLS
	Only the local declarations should be declared extern "C", otherwise it
	can result in unexpected errors such as this (encountered while re-ordering
	some include statements for a different patch):

	  CC       channel-inputs.lo
	In file included from /usr/include/glib-2.0/glib/gmacros.h:38:0,
	                 from /usr/lib64/glib-2.0/include/glibconfig.h:9,
	                 from /usr/include/glib-2.0/glib/gtypes.h:32,
	                 from /usr/include/glib-2.0/glib/galloca.h:32,
	                 from /usr/include/glib-2.0/glib.h:30,
	                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
	                 from /usr/include/glib-2.0/glib-object.h:23,
	                 from /usr/include/glib-2.0/gio/gioenums.h:28,
	                 from /usr/include/glib-2.0/gio/giotypes.h:28,
	                 from /usr/include/glib-2.0/gio/gio.h:26,
	                 from ../../src/spice-channel.h:27,
	                 from ../../src/channel-inputs.h:25,
	                 from ../../src/channel-inputs.c:20:
	/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stddef.h:147:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
	 typedef __PTRDIFF_TYPE__ ptrdiff_t;
	 ^

	Gtk applications should only include spice-client-gtk.h
	This header is the single include needed for all gtk-related
	functionality, similar to spice-client.h. Generate a compiler warning if
	a different header is included.

	Glib applications should only include spice-client.h
	Generate a compiler warning if an application attempts to include a
	different header.

2015-09-28  Jonathon Jongsma  <jjongsma@redhat.com>

	Fix documentation for spice_main_file_copy_async()
	'sources' should be a NULL-terminated array, but the parameter
	documentation treats it as if it is a single file object.

2015-09-25  Jonathon Jongsma  <jjongsma@redhat.com>

	Update NEWS for 0.30 release

	Move glib-compat.c to POTFILES.skip
	Since these messages are only used for terminal debug output, let's not
	waste time translating them.

2015-09-25  Pavel Grunt  <pgrunt@redhat.com>

	docs: Fix typos

	docs: Add missing symbol description strings

	docs: Description should be above 'Return'

	docs: Add missing parameter/field descriptions

	docs: Move SPICE_TYPE_USB_DEVICE to standard subsection

	docs: Add Version Information section

	docs: Update for missing symbols

	channel-main: Rename parameter to match docs

	channel-record: Use correct nick name for property

2015-09-23  Jonathon Jongsma  <jjongsma@redhat.com>

	Add glib-compat.c to POTFILES.in
	Some translatable strings were added in commit 8c37a340.

2015-09-18  sstuts  <sstutsma@redhat.com>

	Add "monitors config position" capability.
	This will allow Windows guests to determine if the client supports a
	monitors_config message from a multi-monitor guest that is not
	multi-headed, i.e., that has one monitor per driver.

	It keeps commit:8b0cd321d5a4d08ccba5845c5f2206e6f8032c1d
	from breaking if an updated win-qxl driver is paired with an older client.

	This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1248189
	---
	Changed from v1: Removed a local commit that preceded this one.
	---
	Changed from v2: Changed name to "monitors config position"
	---

2015-09-15  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Fix spice-protocol requirements in .pc file
	Commit d0ae58a8 added spice-protocol >= 0.12.10 to the Requires.private
	field in spice-client-glib.pc. However it's already present in the
	Requires field without a version check. Once spice-gtk is built and
	installed, building a program against spice-gtk needs spice-protocol,
	but no specific version of it, so we can drop the duplicate
	Requires.private requirement, and keep the unversioned one in Requires.

2015-09-10  Jonathon Jongsma  <jjongsma@redhat.com>

	Don't send monitors config when Display widget is created
	When a display channel is associated with a particular SpiceDisplay
	widget, it previously set the display to 'enabled' unconditionally.
	There is a couple of problems with this behavior.

	First, simply because a display widget has an associated display
	channel, it doesn't necessarily mean that the display is enabled. On
	linux guests, for instance, a display channel can have up to 4 displays
	for one channel, and perhaps only one of them is enabled. So, we
	shouldn't set the display to 'enabled' until we actually receive a
	monitors configuration message indicating that this display is enabled.

	The second problem is that this was triggering the client to send down a
	new monitors-config message to the server. This message is completely
	unnecessary since it is triggered by a message from the server. We
	should only be sending down new monitor configurations in response to
	changes from the client, not from the server.

	Add spice_main_update_display_enabled()
	This is a new function that allows the caller to decide whether to send
	the new status down to the server or not (analogous to the difference
	between spice_main_set_display() vs spice_man_update_display()).

	This new function is needed to reduce unnecessary MonitorsConfig
	messages from being sent to the server. Because spice-gtk does not
	maintain any display state internally, it depends on the application to
	maintain that state. Some state changes come from the server itself
	(e.g. the guest has changed resolution due to some activity within the
	guest), and some come from the application (e.g. the user has resized
	the window of the client). Changes that come from server updates do not
	need to be sent back down to the server, whereas those that originate
	from the application *do* need to be sent to the server.

2015-09-09  Pavel Grunt  <pgrunt@redhat.com>

	file-xfer: Simplify time handling
	Use g_get_monotonic_time() instead of g_date_time_new_now_local().
	g_get_monotonic_time doesn't suffer discontinuities and it is sufficient
	for our purposes. There is no need for the complexity of GDateTime.

2015-09-08  Victor Toso  <victortoso@redhat.com>

	audio: Do not volume-sync without audio
	In case audio backend is not initialized correctly or there isn't audio
	in the VM, we should not try to volume-sync.

	Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1257210

2015-08-25  Pavel Grunt  <pgrunt@redhat.com>

	file-xfer: Add debug messages about a file transfer progress
	During the file transfer debug messages about the progress are printed
	every 20 seconds for each of the file transfer tasks.

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1140512

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

	glib-compat: Add g_format_size
	g_format_size_for_display is deprecated since glib 2.30. See glib commit
	afd1e3697065c1bd23fe9a1cacf43d8744d0bc9b

	g_format_size will be used in the following commit

	Acked-by: Frediano Ziglio <fziglio@redhat.com>

2015-08-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: update spice_session_connect() doc
	Update the documentation about the return value, and how to watch for
	connection success.

	Releated to:
	https://bugzilla.redhat.com/show_bug.cgi?id=1253848

2015-08-14  Christophe Fergeau  <cfergeau@redhat.com>

	Adjust to new SpiceImageCompress name
	This has been renamed to SpiceImageCompression in order to avoid clashes
	with older spice-server in the SPICE_IMAGE_COMPRESS_ namespace. This
	commit is a straight rename of SpiceImageCompress to
	SpiceImageCompression and SPICE_IMAGE_COMPRESS_ to
	SPICE_IMAGE_COMPRESSION_

	build-sys: Remove spice-protocol submodule
	It's seeing regular releases and is API stable, so we don't need to
	bundle it with spice-gtk

2015-08-05  Christophe Fergeau  <cfergeau@redhat.com>

	usbredir: Add a few debug logs
	Currently, spice-gtk debugging logs contain no traces of the
	values of the auto-redir/redir-on-connect filter, and it does not tell
	you about the vid/pid of the devices being connected/redirected.
	This commit adds the appropriate SPICE_DEBUG/CHANNEL_DEBUG calls so that
	this data is logged.

	channel: Don't warn when no CA is set
	Since v0.22~19 "Use system-wide trust certificate store", when neither
	SpiceSession::ca-file nor SpiceSession::ca are set, the system-wide
	CA store will be used to validate the SPICE certificates.
	However, there is still a g_warn_if_fail() checking that either ca or
	ca-file are set, which causes a runtime warning when trying to use the
	system-wide store. This commit removes it.

2015-08-03  Pavel Grunt  <pgrunt@redhat.com>

	Notify about existence of monitor for all display channels
	Windows guest can have disabled display on the display chanel #0, in
	that case it will not be listed in virt-viewer's "View->Displays" menu

	Resolves:
	https://bugs.freedesktop.org/show_bug.cgi?id=91489

2015-07-28  Sandy Stutsman  <sstutsma@redhat.com>

	Handle single headed monitors that have a non-zero x, y config
	Each monitor on a Windows guest is represented as a separate, single-headed
	device with its own framebuffer.  When there are multiple monitors, all
	monitors but one will have a non-zero xy config position.  But even in
	these cases the whole area (frame-buffer) of each monitor should be
	updated.

	Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1202419

2015-07-28  Jeremy White  <jwhite@codeweavers.com>

	Add the gtk libraries to the gtk-scandoc link line.
	This prevents a compile error on Debian Jessie, when building from git.

	This is fairly subtle, and Debian specific.  It only happens when you use
	autoreconf to generate a new libtool script.  Debian patches that script
	to require an explicit setting to link with all dependent libraries.

	It should be harmless on other distros, and it does save us Debian guys some
	hassle.

2015-07-13  Pavel Grunt  <pgrunt@redhat.com>

	Use g_return_val_if_fail instead of wrong g_return_if_fail
	The commit 4b5e6ec2114e1250c81027ebeac9cfe8d059153f introduced a function
	returning gboolean, g_return_val_if_fail() should be used instead of
	g_return_if_fail().

	Send monitor config if at least one monitor has dimensions
	If a client (virt-manager, spicy) is not setting display dimensions
	and the "resize-guest" property is disabled, spice-gtk sends a wrong
	monitor config message where all the monitors have width = heigh = 0
	when the agent connects. This message can confuse the guest, in that
	case the guest will change the resolution of its monitor.

	Regression since 28312b8d1e287a320851e8828825f2ca138d8b0b

	Resolves:
	https://bugzilla.redhat.com/show_bug.cgi?id=1240721

2015-07-10  Sandy Stutsman  <sstutsma@redhat.com>

	This adds reference counting to cached images.
	Windows guests with multi-monitors will often send down the same image
	via different channels.  If these instances are not counted,  one channel
	can delete an image before all the rest of the channels are finished with
	it. In this case, the client will hang.

	This can happen, for instance, when the Windows guest is updating the
	monitor's wallpaper. There is a driver instance for each monitor, so each
	one is sending down its own copy of the same image with the same id.  As
	one channel may be busier than another, the order that the client executes
	commands may not be the same order as the server issued them.  Here's what
	can happen:

	  On the server side:
	    Monitor 1 sends image A
	    Monitor 1 sends multiple rendering commands for image A
	    Monitor 1 removes image A
	    Monitor 2 sends image A
	    Monitor 2 sends rendering commands for image A
	  On the client side:
	    Monitor 1 adds image A to the cache
	    Monitor 1 starts rendering with image A
	    Monitor 2 adds image A to the cache - has same id, so image is replaced
	    Monitor 1 removes image A - image A is completely removed from cache
	    Monitor 2 render command hangs waiting for image A

	Addresses bug: https://bugzilla.redhat.com/show_bug.cgi?id=1194354

2015-07-06  Christophe Fergeau  <cfergeau@redhat.com>

	Update spice-protocol
	This will fix EL6 builds.

	Christophe Fergeau (1):
	      m4: Add compat AS_VAR_APPEND for older autoconf

	Lukas Venhoda (3):
	      ppc: Fix quic decode endianess
	      ppc: Fix lz magic endianess
	      ppc: Fix quic magic endianess

2015-06-30  Jonathon Jongsma  <jjongsma@redhat.com>

	Make monitors config debug output more clear
	Indicate whether the monitors config debug output is from sending or
	receiving new monitors configuration. You can tell this by looking at
	which channel is involved (main vs display), but making it more explicit
	is helpful for glancing through logs.

2015-06-29  Javier Celaya  <javier.celaya@flexvdi.com>

	Display: Send a preferred compression message on init.
	If the user prefers a specific compression algorithm, report it when
	setting up the display channel.

	Add a preferred-compression program option

	Spice-session: Add preferred-compression property.
	Also, depend on the spice-common commit that introduces the
	SpiceImageCompress enum.

2015-06-26  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Fix build with automake < 1.13
	AC_CONFIG_MACRO_DIRS is not available with older automake versions,
	which causes autogen.sh failures on RHEL6. m4_include() can be used
	instead.

2015-06-25  Pavel Grunt  <pgrunt@redhat.com>

	Send monitor config if guest supports sparse monitors
	It is ok to send monitor configuration even for displays which are not
	disabled or enabled. Because the guest having support for the sparse
	monitor configuration (VD_AGENT_CAP_SPARSE_MONITORS_CONFIG) will not
	resize the monitor which is disabled / undefined.

	Fixes:
	https://bugs.freedesktop.org/show_bug.cgi?id=90914

	channel-main: Use enum to describe display state

2015-06-22  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Use SPICE_CHECK_LZ4
	spice-common now has an m4 macro adding a --enable-lz4 option and
	doing the needed checks, so we can use it in configure.ac rather than
	duplicating it here.

	build-sys: Use SPICE_CHECK_SMARTCARD
	spice-common has an m4 macro adding a --enable-smartcard option and
	doing the needed checks, so we can use it in configure.ac rather than
	duplicating it here.

2015-06-19  Christophe Fergeau  <cfergeau@redhat.com>

	spicy-*: Remove translation support
	These are only meant to be test tools so they don't need to be
	translated.

2015-06-18  Lukas Venhoda  <lvenhoda@redhat.com>

	spicy: Enable recent chooser on windows
	Recent chooser is working correctly in windows.

	spicy: Replace duplicated code with a for loop
	Changed piece of code working with fixed size array into a for loop.

	spicy: Host and port (or tls) are now required
	Connect button is now non-sensitive when host and port (or tls) entry is empty.
	Pressing enter will now also NOT connect, when the entries are empty.

	spicy: Fixed reselecting in recent chooser
	Selecting an entry in the recent connections list, and then modifying
	the host/port/TLS port, and double-clicking on that same entry in the
	list would cause spicy to connect to the edited address rather than
	the one which was picked in the recent chooser.

	After this commit, the selection will be cleared from the recent
	chooser, and double-clicking on an entry after editing it will always
	trigger a 'selection-changed' signal, which will properly set the
	address to connect to.

	spicy: Changed the dialog into a window
	Changed connect dialog from GtkDialog to GtkWindow.

	Added the necessary signals and buttons, to keep then
	behaviour of a dialog (ESC to close, ENTER to submit).

	spicy_connect_dialog now returns TRUE and FALSE instead of 0 and -1.

	spicy: Move connect dialog to its own file
	Connect dialog from spicy is now in its own file.

	Renamed connect_dialog to spicy_connect_dialog.

	Added new file for translation.

2015-06-18  Victor Toso  <victortoso@redhat.com>

	spice-widget: keypress-delay set by env var

2015-06-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Prepare for 0.29 release

	channel: check too long password
	Make sure that the password length is under the maximum lenght. If not
	report it as an authentication failure with an adapted message.

2015-06-15  Pavel Grunt  <pgrunt@redhat.com>

	configure: Try gstreamer audio backend if pulse is not available
	Disable audio if no backend is available and configure is used with
	the option '--with-audio=auto'

2015-06-09  Victor Toso  <victortoso@redhat.com>

	webdav: keep phodav requirements inside USE_PHODAV
	Commit 33d4016228798108250b0ef9173f2c4c719a5065 uses
	g_output_stream_write_all_async/finish which is on gio 2.44 version.
	This breaks the build on older systems even if --disable-webdav is used.

	Using #USE_PHODAV to wrap those functions that will not be called
	without --enable-webdav.

2015-06-09  Fabiano Fidêncio  <fidencio@redhat.com>

	spice-widget: Do not update display when resize-guest is disabled
	Updating the display causes weird behaviors in virt-viewer, like
	re-resizing to a previous monitor config when, after changing the
	display resolution (through System > PReferences > Displays). the agent
	reconnects.
	It is not perfect yet, because when the agent reconnects the guest
	resizes to the previous config and switch to the proper one, but this
	seems more like an agent bug than a spice-gtk one.

2015-06-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: use class private handlers field
	Since spice-gtk requires glib 2.28, we can now fix a small FIXME.

	Since G_TYPE_CLASS_GET_PRIVATE is a bit expensive, it's still worth to
	cache it in klass->priv. However, there is no good place I can think of
	to put this. (channel_class_init() is called only once, and not per
	each subclass)

	Move gtk/ -> src/
	For historical reasons, the code was placed under gtk/ subdirectory.
	If it was always bugging you, bug no more!

	TODO: update
	Remove outdated items:
	- ChannelBaseAudio?,
	- GDI backend wouldn't work well with scaling (moved to fdo bug)

	Fix fdo link

2015-06-08  Pavel Grunt  <pgrunt@redhat.com>

	usb-device-manager: Avoid error when compiling with --disable-usbredir

2015-06-05  Marc-André Lureau  <marcandre.lureau@gmail.com>

	usb: remove useless assignments
	The struct is g_new0() already.

	win-usb: try to connect to usbclerk during init
	Fail early during initialization if the usbclerk service can't be
	reached.

	This changes the current behaviour that would retry to connect to
	usbclerk every time to perform an operation. Now, it will try each time
	the UsbDeviceManager is initialized.

	usb: do not return GError on programmer pre-condition checks
	Use regular g_return precondition checks.

	win-usb: remove useless function

	usb: misc code formatting

	usb: call win_usb_driver_new() during initable_init()
	Throw an error when initialization failed.

	usb: use SPICE_CLIENT_ERROR_ prefix
	To be consistent with GLib idioms, the code should use a common prefix for errors.

	usb: unref the device when it is no longer needed
	The current code unref() the device too early, it must be unref
	after it is no longer needed.

	win-usb: get rid of status code return in async ops

	win-usb: throw an error if reply.status == 0

	usb: use win-usb uninstall_finish()

	win-usb: rename async functions

	win-usb: introduce a spice_win_usb_driver_op_finish
	We want the exported functions to follow the gio async idom. Currently,
	both install() and uninstall() are paired with install_finish(). In the
	following patch we introduce uninstall_async() uninstall_finish() using
	that common internal op_finish() function. Then we correctly pair
	associated async/finish() calls.

	usb: remove useless declaration

2015-06-05  Victor Toso  <victortoso@redhat.com>

	tests: add test to check for zombie GSources
	Using g_pollable_input_stream_create_source to generage several dummy
	GSources in order to check if giopipe sets all of them to be dispatched.

	This test check for zombie GSources during a write_all/read_chunk
	operation.

	tests: add test to concurrent write to pipe
	Concurrent write is not supported and should fail. The GIO error is
	G_IO_ERROR_PENDING

	tests: pipe using _write_all_async function

	tests: remove read8_cb to use generic read_cb
	Both functions are basic the same so let's keep the generic one.

	webdav: write all buffer to client webdav
	Client's webdav can request less data (8192) then the amount sent by
	guest's webdav. Using g_output_stream_write_all_async in order to avoid
	losing data.

	giopipe: don't fail on create_source
	PipeInputStream and PipeOutputStream should not fail when creating
	GPollableStream source as this currently does not work with default
	write_all and read_all functions;

	In order to avoid creating zombie GSource in create_source of both
	PipeInputStream and PipeOutputStream, we track all created GSources and
	set them to be dispatched when data is available to read/write. It is
	worth to mention that concurrent write/read is not possible with current
	giopipe and only the last created GSource will read the data as it is
	dispatched first.

2015-06-03  Pavel Grunt  <pgrunt@redhat.com>

	session: Enable proxy when requested
	Disabling the proxy avoids usage of GProxyResolver to determine
	the necessary proxy protocol and to do the proxy negotiation.

2015-05-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: disable default socket proxy
	GSocketClient uses the system proxy by default, and it may end up using
	the system HTTP proxy with bad results if CONNECT is not
	supported. spice-gtk uses it's own SPICE_PROXY instead, and doesn't rely
	on GSocketClient default proxy but GProxyAddress instead. Disabling the
	default proxy solve a wrong proxy from being used.

	It may be worth to revisit this change if GSocketClient can be told to
	ignore proxies that are not eligible for Spice connections. (HTTP could
	be though, in which case it would be a user configuration issue)

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1040679

2015-05-21  Benjamin Gilbert  <bgilbert@cs.cmu.edu>

	Drop expansions of removed CFLAGS/LIBS variables

2015-05-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	iopipe: fix leak of streams
	g_simple_io_stream_new() do not steal references from us, unref the
	streams to avoid the leaks.

	Leak found by Victor Toso.

	==30787== 2,808 (648 direct, 2,160 indirect) bytes in 9 blocks are definitely lost in loss record 479 of 482
	==30787==    at 0x93AEBFD: g_type_create_instance (gtype.c:1849)
	==30787==    by 0x939128A: g_object_new_internal (gobject.c:1774)
	==30787==    by 0x9392AA0: g_object_newv (gobject.c:1921)
	==30787==    by 0x939338B: g_object_new (gobject.c:1614)
	==30787==    by 0x403B30: make_gio_pipe (giopipe.c:441)
	==30787==    by 0x403C8E: spice_make_pipe (giopipe.c:465)
	==30787==    by 0x4029B5: fixture_set_up (pipe.c:42)
	==30787==    by 0x9844EC8: test_case_run (gtestutils.c:2123)
	==30787==    by 0x9844EC8: g_test_run_suite_internal (gtestutils.c:2185)
	==30787==    by 0x984509A: g_test_run_suite_internal (gtestutils.c:2196)
	==30787==    by 0x98453FA: g_test_run_suite (gtestutils.c:2249)
	==30787==    by 0x9845430: g_test_run (gtestutils.c:1553)
	==30787==    by 0x402012: main (pipe.c:312)

2015-05-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	spicy: remove useless signal handlers
	There is no strong reason to have signal handlers in spicy (a test
	tool). Clean quit can be achieved through the File/Quit menu.

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1197175

2015-05-12  Lukas Venhoda  <lvenhoda@redhat.com>

	spice-gtk: Fixed build when using audio gstreamer
	Commit No. 63bf00275769928850113b4df205df08d6303b45 changed number of
	arguments of function playback_stop(), and didn't change call of this
	function on line 628.

	This would break building when using --with-audio=gstreamer

2015-05-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	webdav: check g_output_stream_write_all() return value
	Check g_output_stream_write_all() return value to silence a coverity
	CHECKED_RETURN warning

	usb: channel-new handler to be after default handlers
	Client usually connect to channel-new to connect their
	handlers, such as open-fd.

	The usbmanager channel-new handler will call channel_connect() on usbredir
	channels, which may call open-fd.

	However, open-fd can be emitted before the client had a chance to
	connect their handlers (from the channel-new callback).

	Connecting after the default handler solves this case.

	Fixes:
	https://bugzilla.gnome.org/show_bug.cgi?id=748665

	session: do not attempt to open_host if session changed
	Since channel can become session-less, let's check they still have the
	expected session when running the open-host idle.

	audio: stop playback on channel destroyed
	Ensure playback is stopped when the channel is destroyed.

	audio: use swapped channel handler for stop
	We are going to reuse playback_stop() in following commit.

	record: do not crash after record is stopped
	If spice_record_send_data() after a reset, last_frame is NULL and memcpy
	will crash.  Check if the recording was started if last_frame != NULL
	instead.

	 Program received signal SIGSEGV, Segmentation fault.
	 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:204
	 204                       vmovdqa %ymm0, (%rdi)
	 (gdb) bt
	 #0  __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:204
	 #1  0x00007ffff44f57b5 in spice_record_send_data (channel=0x1228640, data=0x7fff9ad0f000, bytes=960, time=0) at channel-record.c:349
	 #2  0x00007ffff45162f0 in stream_read_callback (s=0xad8c00, length=960, data=<optimized out>) at spice-pulse.c:485
	 #3  0x00007ffff2ea0c76 in pstream_memblock_callback (p=<optimized out>, channel=<optimized out>, offset=0, seek=PA_SEEK_RELATIVE, chunk=0x7fffffffcf70, userdata=0x11e71c0) at pulse/context.c:411
	 #4  0x00007fffe8da8b4f in do_read (p=p@entry=0x123a050, re=re@entry=0x123a1d0) at pulsecore/pstream.c:906
	 #5  0x00007fffe8daae87 in do_pstream_read_write (p=0x123a050) at pulsecore/pstream.c:193
	 #6  0x00007ffff30e1bea in dispatch_func (source=0x1111e50, callback=<optimized out>, userdata=<optimized out>) at pulse/glib-mainloop.c:584
	 #7  0x00007fffed76b93b in g_main_dispatch (context=0x816ea0) at gmain.c:3122

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1215343

	playback: do not set mm time when session-less
	Channels do not hold a strong reference on the session (because session
	can be recycled after disconnect), do not print a warning if the channel
	is session-less when updating the delay.

	audio: emit stop when the channels are reset
	Ensure a hint is given to the client that the channel is reset.

	Unfortunately, since the handle may be asynchronous due to coroutine,
	the channel functions should be tolerant to a playback/record calls
	functions when the channel is stopped.

	audio: channel-new handler to be after default handlers
	Client usually connect to channel-new to connect their
	handlers, such as open-fd.

	The audio channel-new handler will call channel_connect() on audio
	channels, which may call open-fd.

	However, open-fd can be emitted before the client had a chance to
	connect their handlers (from the channel-new callback).

	Connecting after the default handler solves this case.

	Fixes:
	https://bugzilla.gnome.org/show_bug.cgi?id=747649

2015-04-30  Victor Toso  <victortoso@redhat.com>

	spice-pulse: compatibility with old pulse version
	The commit 37ba949716ebf441110330 breaks compatibility with old versions
	of libpulse as the volume and mute data in pa_source_output_info were
	available only from version 1.0.0 onwards. Using other API function for
	this which does not relay on audio per stream.

	spice-pulse: GSimpleAsyncResult compatibility
	Avoid breaking build with glib older then 2.32 which is when
	g_simple_async_result_set_check_cancellable was introduced.

	glib-compat: add G_SOURCE_REMOVE G_SOURCE_CONTINUE

2015-04-28  Fabiano Fidêncio  <fidencio@redhat.com>

	session: Get the lock modifiers from GdkKeymap
	A cleaner way to get the lock modifiers, without depend on the
	platform/backend used (as X or Wayland), is get them through GdkKeymap
	(and its _get{caps,num,scroll}_lock_state() functions).
	Unfortunately, get_scroll_lock_state() will only be present for Gtk+
	3.18.0 and when it becomes the minimal required version we can easily
	drop the old code.

2015-04-24  Victor Toso  <victortoso@redhat.com>

	agent: sync guest audio with client values
	Functions to sync volume and mute value when necessary. In this patch,
	only one sync is allowed after agent connect.

	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1012868

	audio: spice-gstaudio implements async volume-info
	Gstaudio rely on sink/src elements to get the volume/mute.
	(e.g. pulsesink and pulsesrc, the values are updated by PulseAudio
	itself when requested)

	audio: spice-pulse implement async volume-info
	In case of volume-sync between client and guest, we request volume-info
	from the availables streams and if the stream is not available we rely
	on ext-stream-restore.

	By using ext-stream-restore we can get the last stream data of the
	application that is stored by PulseAudio.

	Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868

	audio: spice-audio with get mute and volume
	Async functions to be implemented by spice-gstaudio and spice-pulse to
	get the updated volume and mute values for playback and record stream.

	Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868

	Update spice-common submodule
	This includes volume synchronization protocol;

2015-04-24  Pavel Grunt  <pgrunt@redhat.com>

	spice-widget: Do not invalidate cursor when display is not ready
	spice_display_get_scaling() gives wrong x, y coordinates and scaling
	when the display is not ready. The wrong values cause runtime
	warnings when disabling a virt-viewer's window:
	Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed

2015-04-16  Christophe Fergeau  <cfergeau@redhat.com>

	Fix GSocketAddress leak in proxy_lookup_ready()
	g_proxy_address_new() returns a new GProxyAddress, so we must unref it
	when no longer needed.

	This fixes:

	==6481== 234 (48 direct, 186 indirect) bytes in 1 blocks are definitely lost in loss record 10,062 of 10,
	==6481==    at 0x31FF230A58: g_type_create_instance (gtype.c:1849)
	==6481==    by 0x31FF21501A: g_object_new_internal (gobject.c:1774)
	==6481==    by 0x31FF216EB4: g_object_new_valist (gobject.c:2033)
	==6481==    by 0x31FF217220: g_object_new (gobject.c:1617)
	==6481==    by 0x3D4386F33A: g_proxy_address_new (gproxyaddress.c:325)
	==6481==    by 0x5717440: proxy_lookup_ready (spice-session.c:2011)
	==6481==    by 0x3D43885082: g_task_return_now (gtask.c:1088)
	==6481==    by 0x3D438850B8: complete_in_idle_cb (gtask.c:1102)
	==6481==    by 0x31FEE4A0B9: g_main_dispatch (gmain.c:3122)
	==6481==    by 0x31FEE4A0B9: g_main_context_dispatch (gmain.c:3737)
	==6481==    by 0x31FEE4A44F: g_main_context_iterate.isra.29 (gmain.c:3808)
	==6481==    by 0x31FEE4A771: g_main_loop_run (gmain.c:4002)
	==6481==    by 0x363AC06CC4: gtk_main (in /usr/lib64/libgtk-3.so.0.1600.1)

2015-04-15  Jonathon Jongsma  <jjongsma@redhat.com>

	Make update-symbol-files work when builddir != srcdir
	rewrite the update-symbol-files rule to use dependencies and automatic
	variables ($^) so that VPATH will allow make to find these files in the
	srcdir as well as the builddir.

2015-04-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: HUP is not an error condition
	On local UNIX sockets, calling close() in the server side will result in
	a HUP condition on client side. Since this is not an error, but a normal
	termination, let's ignore it.

	A clean shutdown would involve a new message to tell the client to first
	close its end, in order to avoid the HUP. That way the client could
	distinguish normal termination from unexpected ones. That's a possible
	future minor enhancement (it seems it would only work with UNIX socket
	though)

	G_IO_IN seemed to be a leftover, it is left here but shouldn't be
	required.

	https://bugs.freedesktop.org/show_bug.cgi?id=90016

	channel: reset c->has_error when connected
	Whenever the channel socket is connected, c->has_error should be reset.
	Until now, only the regular open_host() case was reset, but client
	client provided fd must also reset the error state.

	It should be safe to move it after the "connected" label, since the
	ssl code doesn't need c->has_error.

	https://bugzilla.redhat.com/show_bug.cgi?id=1211063

2015-04-01  Victor Toso  <victortoso@redhat.com>

	audio: keep compatibility with old pulse version
	The commit 9ef68ecd1fd11dea626628 breaks compatibility with old versions
	of libpulse as the source_output functions were available from version
	1.0.0 onwards.

2015-03-27  Pavel Grunt  <pgrunt@redhat.com>

	channel-smartcard: Add missing USE_SMARTCARD checks
	In order to enable build without smartcard support

2015-03-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	smartcard: add reader and cards on channel up
	The smartcard manager reports reader/card events on insertion and
	removal. If a smartcard channel is created after those events, the
	channel state will not be in sync with the current reader/card state.
	Sync the state when the channel is up.

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=1205171

	smartcard: connect object signal handlers with spice helper
	The smartcard manager may outlive the smartcard channels. Make sure the
	channel handlers are disconnected when the channel is free by using
	spice_g_signal_connect_object() helper. This fixes crashes when
	dispatching smartcard events on deleted channels.

	Related bug:
	https://bugzilla.redhat.com/show_bug.cgi?id=1205171

2015-03-23  Victor Toso  <victortoso@redhat.com>

	audio: use stream functions for pulse source
	The functions pa_context_set_source_output_mute/volume are specifically
	to change source stream volume/mute.
	I changed the warnings to be compatible to sink_input ones;

2015-03-23  Christophe Fergeau  <cfergeau@redhat.com>

	session: Tone down warning on TLS-only connections
	315c1a5 "session: Add more debugging logs" causes a g_warning() to be
	shown when attempting a TLS connection without specifying a non-TLS
	port.
	This commit makes the message more explicit, and switches it from being
	a warning to being a debug message.

2015-03-12  Pavel Grunt  <pgrunt@redhat.com>

	channel-usbredir: Do not stop event listening if SpiceSession does not exist
	Avoids Segfault when closing the connection just after the usb device redirection.

2015-03-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: fix out-of-tree build from tarball
	There are generated files in build directory too. Fixes:

	CC       util.o
	In file included from ../../tests/session.c:3:0:
	../../gtk/spice-session.h:24:30: fatal error: spice-glib-enums.h:
	No such file or directory #include "spice-glib-enums.h"

	Prepare v0.28 release

2015-03-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: fix required libsoup version for webdav support

	Revert spice-common change
	Commit 85ed268 shouldn't have change spice-common, my bad

	session: bind path and read-only to webdav server
	Keep the server property in sync with the session properties

	session: add share-dir-ro property
	Add a property to specify if share folder access is read-only.

	webdav: use a pipe to connect to server
	Instead of listening on TCP sockets, and proxying connections there,
	make the webdav server accept new connections from stream. The streams
	are user-space GIOStream pipe, one side is connected to the Spice webdav
	channel muxer/demuxer, the other side is a SoupSocket client.

	This makes the server not exposed any local public access, avoid the
	need for server threads, or proxying the connections through system
	sockets.

	Use libphodav-2 (breaks webdav server temporarily)
	This change breaks webdav server, since libphodav-2 no longer
	set up a TCP service running in a thread. It's up to the client
	to decide how best to accept and handle new connections.

	This commits remove all the hacks related to proxying the incoming
	connections to a TCP socket, and protected with a magic sequence.

	The following commit will use GIOStream pipes to handle each client
	connections.

	Add GIOStream-based pipe
	This code creates a pipe between 2 GIOStream, the input side read from
	the peer output side, and vice-versa.

	In the following patches, this will avoid the socket communication
	to exchange with the embedded webdav server.

	glib-2.0 >= 2.43.90 because GSimpleIOStream dependency.

2015-02-27  Victor Toso  <victortoso@redhat.com>

	tests: add spice-session test
	Checking if URIs are being parsed and generated correctly.

	session: accept argument in URI without value
	The examples below should be considered valid URIs:

	e.g: spice://localhost?port=5900&tls-port=
	e.g: spice://localhost?tls-port=&port=5900

	This patch deals with arguments with empty value;

2015-02-23  Pavel Grunt  <pgrunt@redhat.com>

	vncdisplaykeymap: Use XkbGetMap and XkbGetNames instead of XkbGetKeyboard
	XkbGetKeyboard does not work in XWayland (bfo#89240).

	Fixes https://bugs.freedesktop.org/show_bug.cgi?id=89105

2015-02-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: reset connection_id on switch-host
	The server expects no connection_id during link time, in order to
	realize a full reconnection.

	The alternative would be to assume that the destination server has the
	exact same channels and attempt to recreate and to reconnect them one by
	one. However, if the destination is slightly different (say,
	configuration or order of channels differs), this will likely fail. It's
	best to start with a new session without prior knowledge.

	channel: remove unused ChannelClass::channel_disconnect()
	This virtual method turns out to be unnecessary anymore, and
	was never override. channel_reset() is enough.

	channel: set c->has_error to finish coroutine
	It's unnecessary to call channel_disconnect() to finish the coroutine
	and disconnect. Use c->has_error instead, like the rest of channel error
	code.

	Call channel_reset() directly when finishing coroutine
	channel_disconnect() virtual method isn't overloaded by any
	channel, and can be replaced by the equivalent channel_reset()
	when finishing the coroutine.

	channel: reset migration state when calling channel_reset()
	channel_reset() is called in channel_disconnect(). We can just move that
	state change in channel_reset() in order to get rid of
	channel_disconnect().

	channel: use exisiting reconnection code when switching
	Switching for migration reason is similar to a reconnection during
	initial connection.

	A notable difference is that new code path doesn't schedule a
	delayed_unref callback. This is fine since the channel is still running
	and delayed_unref is mainly used for signaling disconnections and none
	should be emitted when switching.

	channel: reset channel state to unconnected
	After coroutine has exited, reset channel state to unconnected,
	this allows recycling a channel for reconnection, even in "normal"
	disconnect/reconnect cases.

	channel: remove useless precondition
	This precondition isn't useful, since the channel is already
	dereferenced before, and I've never seen an idle callback not passing
	the user_data correctly.

	channel: emit close event when coroutine has finished
	Move signaling of closed channel after the coroutine has exited in
	delayed_unref callback, similarly to error events, so it's easier to
	schedule reconnect since coroutine has terminated.

2015-02-16  Javier Celaya  <javier.celaya@flexvm.es>

	channel-port: Remove dependency cycle
	channel-port.h includes spice-client.h, that includes channel-webdav.h,
	that includes channel-port.h again. It's enough if channel-port.h
	includes spice-channel.h

	Without this change, if one tries to build a source file which only
	includes spice-port.h, the build fails with:

	In file included from /usr/include/spice-client-glib-2.0/spice-client.h:46:0,
	                 from /usr/include/spice-client-glib-2.0/channel-port.h:22,
	                 from ./port.c:1:
	/usr/include/spice-client-glib-2.0/channel-webdav.h:44:5: error: unknown type name 'SpicePortChannel'
	     SpicePortChannel parent;
	     ^
	/usr/include/spice-client-glib-2.0/channel-webdav.h:58:5: error: unknown type name 'SpicePortChannelClass'
	     SpicePortChannelClass parent_class;

2015-02-16  Pavel Grunt  <pgrunt@redhat.com>

	widget: Do not draw cursor if widget is not realized
	Silences the runtime warning in virt-viewer and gnome-boxes (bgo#744432):
	Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed

2015-02-12  Pavel Grunt  <pgrunt@redhat.com>

	widget: Send keys to guest when keyboard grab is released
	Keys should be sent to the guest if the widget has the focus even
	when the keyboard grab is released.

2015-02-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	webdav: fix checking for shared directory property
	Trivial fix for 6163828e8cb15d539c80cc3f0bfb5008be9b2247:
	Channel should be created if the shared-dir property is set.

2015-02-06  Benjamin Gilbert  <bgilbert@cs.cmu.edu>

	Don't build libspice-client-gtk if configured --without-gtk
	libspice-client-glib is useful as a client library on platforms that
	don't support GTK.

2015-02-06  Christophe Fergeau  <cfergeau@redhat.com>

	Update git submodule
	This fixes build with mingw as well as lz4 support:

	3aad79d LZ4: Do not include arpa/inet.h in Windows builds
	9287e53 LZ4: Add support for 24bit pixman surfaces
	d167e2e LZ4: Fix the row alignment when it is not on a 32bit boundary
	f76fc28 LZ4: Decode the image format from the stream
	83c0d64 LZ4: Adjust reading the top_down flag
	6049db4 LZ4: Fix output buffer size
	ac26fd7 Remove redundant #if defined(SW_CANVAS_CACHE) || defined(SW_CANVAS_IMAGE_CACHE)
	062bf67 Remove unused 'invers' arg from canvas_get_*
	619b995 common: fix build with mingw
	862b9b1 build-sys: Move pixman check to m4 macro
	137b1a5 build-sys: Move opengl check to m4 macro
	f9e0a64 build-sys: Move opus check to m4 macro
	dd57d05 build-sys: Move celt check to m4 macro
	fb3fe22 build-sys: Move smartcard check to m4 macro
	df74a17 build-sys: Move posix checks to a separate m4 macro
	2f1ba3b build-sys: Add fallback for AS_VAR_APPEND
	2195369 build-sys: Small cleanup of AM_CPPFLAGS
	ed873a9 build-sys: Remove unused WITH_SMARTCARD conditional
	2da14b6 build-sys: Remove unused win32 check
	5bfa9ca build-sys: Remove unused X check
	268d3e3 Remove unused header file

2015-01-29  Christophe Fergeau  <cfergeau@redhat.com>

	Don't set SpiceSession::cmain twice during migration
	During migration, migrate_connect() ends with:
	spice_session_set_main_channel(mig->session,
	                               migrate_channel_connect(mig, SPICE_CHANNEL_MAIN, 0));

	migrate_channel_connect() calls spice_channel_new() which will create a
	new SpiceMainChannel instance.
	spice_channel_constructed() will be called during this instanciation,
	which will call spice_session_channel_new(), which will set
	SpiceSession::cmain for SpiceMainChannel instances.

	When calling spice_session_set_main_channel(), SpiceSession::cmain will
	thus already be set, which causes a runtime warning as
	spice_session_set_main_channel() has a precondition checking that
	SpiceSession::cmain is not set already.

	This commit removes the call to spice_session_set_main_channel() from
	migrate_connect() as this call is not doing anything more than the call
	to migrate_channel_connect().

	Remove runtime warning when setting a NULL shared-dir
	Now that the webdav channel can cope with a NULL shared dir (by not
	creating the webdav server), we no longer need to reject NULL shared
	directories with a warning.

	This fixes part of https://bugzilla.redhat.com/show_bug.cgi?id=1175721

	webdav: Cope with NULL SpiceSession::shared-dir
	shared-dir default value is
	g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE)
	which can be NULL (for example if ~/.config/user-dirs.dirs does not
	exist).
	This commit makes sure we don't create a PhodavServer when this occurs

	display: Fix 'exisiting' typo in debug log

	display: s/dropin/dropping in debug message

	session: Add more debugging logs
	Initial SPICE connection can sometimes fail without clear indications
	where/how it failed. This commit adds more debug logs/more accurate logs
	in order to help narrow down such issues.

	display: Improve DisplayChannel::num_drops_on_arive name
	'arive' has a typo, and 'num_drops_on_receive' is clearer.

	Use macro to swap data in spice_session_start_migrating()
	spice_session_start_migrating() swaps connection details between 2
	SpiceSession instances. Instead of doing it manually, use a macro to do
	it for us.

2015-01-29  Pavel Grunt  <pgrunt@redhat.com>

	desktop-integration: check owner of bus name
	It avoids calling D-Bus methods when the bus name
	"org.gnome.SessionManager" does not exist.

	Silences:
	GSpice-WARNING **: Error calling 'org.gnome.SessionManager.Inhibit': GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

2015-01-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	spicy: deal with spice+unix:// URI

	session: teach spice_uri_create() about UNIX path

	session: prettify query parameters
	Use & as parameters separators, this is more usual. Remove
	trailing one, no further parameters are useful anyway.

	session: return allocated string from spice_uri_create()
	This allows more flexible string building.

	session: parse spice+unix:// URI

	session: connect to UNIX path

	session: add unix-path property

	channel: reset connection state on error
	Fix regression introduced in 6b475802, to permit reconnection on error,
	the channel state must be < STATE_CONNECTING. Since the error is
	reported after coroutine exits and channel is reset, the state can be
	modified before throwing the error now.

	channel: reset tls state when client calls connect
	The channel TLS state is kept during disconnection and reset, for
	automatic reconnection and migrations reasons. However, when
	spice_channel_connect() is called by client, it should first try
	non-TLS connection.

	channel: delay event report to after coroutine exit
	Move to a common place error reporting, after the coroutine exits.

2015-01-23  Pavel Grunt  <pgrunt@redhat.com>

	spice-widget: Don't return early from focus_in_event when widget is not realized
	Otherwise SpiceDisplay might not get the keyboard grab.
	It also silence GSpice-CRITICAL on focus out event:
	GSpice-CRITICAL **: spice_gtk_session_request_auto_usbredir: assertion 's->auto_usbredir_reqs > 0' failed

2015-01-16  Zeeshan Ali (Khattak)  <zeeshanak@gnome.org>

	session: Improved docs for spice_session_connect()
	Make it clear that users of this function must provide additional
	sockets for individual channels.

2015-01-08  Benjamin Gilbert  <bgilbert@cs.cmu.edu>

	inputs: Correct documentation of scancode arguments
	AT scancodes" implies AT set 2, but the SPICE protocol expects
	AT set 1.  spice-gtk additionally expects a mangled version of
	set 1 scancodes, which are then unmangled by spice_make_scancode()

2015-01-06  Fabiano Fidêncio  <fidencio@redhat.com>

	README: update gstreamer info

	nsis: drop gst-0.10 in favour of gst-1.0
	Based on Victor Toso's patch for virt-viewer:
	https://git.fedorahosted.org/cgit/virt-viewer.git/commit/?id=3bbf1ded1cb01429d600b11035d5fb0d60bfe20b

	audio: drop gst-0.10 in favour of gst-1.0
	As gstreamer-1,0 support was introduced by commit d4d60c97 and
	it works pretty much as gstreamer-0,10 used to work (tests were
	made both on Linux and Windows clients), let's drop the old
	gstreamer-0.10 support in favour of gstreamer-1.0.

2014-12-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	usbredir: prevent crash when calling without host
	Quite annoyingly, usbredir doesn't have public functions arguments
	preconditions, and will weirdly run the flush callback during
	initialization.

	With 201a8c2 change, the channel state is kept as it is when calling
	reset. This will result in the following crash that was avoided before
	thanks to a precondition on the channel to be ready. Adding a further
	precondition check on priv->host != NULL solves the following crash
	during reset():

	Program received signal SIGSEGV, Segmentation fault.
	usbredirhost_write_guest_data (host=0x0) at usbredirhost.c:868
	868                               return
	usbredirparser_do_write(host->parser);
	(gdb) bt
	 #0  0x00007fffb2ed24d0 in usbredirhost_write_guest_data (host=0x0) at
	 #usbredirhost.c:868
	 #1  0x00007fffc81d463b in
	 #usbredir_write_flush_callback (user_data=0x2d95250) at
	 #channel-usbredir.c:469
	 #2  0x00007fffb2ed23f9 in usbredirhost_open_full (usb_ctx=0x2baba70,
	 #usb_dev_handle=0x0, log_func=<optimized out>,
	 #read_guest_data_func=0x7fffc81d482c <usbredir_read_callback>,
	 #write_guest_data_func=0x7fffc81d4952 <usbredir_write_callback>,
	 #flush_writes_func=0x7fffc81d45c3 <usbredir_write_flush_callback>,
	 #alloc_lock_func=0x7fffc81d49f1 <usbredir_alloc_lock>,
	 #lock_func=0x7fffc81d4a41 <usbredir_lock_lock>,
	 #unlock_func=0x7fffc81d4a86 <usbredir_unlock_lock>,
	 #free_lock_func=0x7fffc81d4acb <usbredir_free_lock>,
	 #func_priv=0x2d95250, version=0x7fffc8283dcf "spice-gtk
	 #0.27.7-89db-dirty", verbose=4, flags=1) at usbredirhost.c:748
	 #3  0x00007fffc81d3b22 in
	 #spice_usbredir_channel_set_context (channel=0x2d95250
	 #[SpiceUsbredirChannel], context=0x2baba70) at channel-usbredir.c:212
	 #4  0x00007fffc81d37a9 in spice_usbredir_channel_reset (c=0x2d95250
	 #[SpiceUsbredirChannel], migrating=0)
	 at channel-usbredir.c:125
	 #5  0x00007fffc81b7f8d in spice_channel_reset (channel=0x2d95250
	 [SpiceUsbredirChannel], migrating=0)
	 at spice-channel.c:2688
	 #6  0x00007fffc81b8057 in channel_disconnect (channel=0x2d95250
	 [SpiceUsbredirChannel]) at spice-channel.c:2706
	 #7  0x00007fffc81b7559 in
	 spice_channel_coroutine (data=0x2d95250) at spice-channel.c:2490

2014-12-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: clear channel error after auth error
	When entered authentication details are wrong, spice-gtk will reset
	channel error, which will result in the following warning:

	(remote-viewer:20753): GLib-WARNING **: GError set over the top of a
	previous GError or uninitialized memory.
	This indicates a bug in someone's code. You must ensure an error is NULL
	before it's set.

	Clear channel error after reporting authentication error.

	channel: throw auth error when coroutine ends
	It is common that clients attempt to reconnect during the
	SPICE_CHANNEL_ERROR_AUTH callback.  However, the channel must exit
	the coroutine first before reconnection can happen.

	channel: introduce SPICE_CHANNEL_STATE_RECONNECTING
	Add a new state that permits reconnection, because it's < CONNECTING.
	It also simplifies some code by removing unneeded variables in
	spice_channel_coroutine(): the channel.tls and session.protocol version
	properties are already modified during initial connection steps.

	channel: do not enter channel iterate on early error
	There is no need to enter channel_iterate() if we found an early
	connection steps error.

	channel: factorize failed authentication
	There are a few things that should be common to all wrong authentication
	cases. Let's put them all in the same function.

	session: keep main channel on reconnect
	For legacy reasons, spice-gtk should keep at least one channel in the
	session when reconnecting (clients may decide that the session is
	disconnected when all channels are gone). The most obvious is to
	keep and reuse the main channel.

2014-12-11  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Prepare 0.27 release

2014-12-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	docs: improvements for 0.27 release

2014-12-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: update git.mk

2014-12-03  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Fix build for glib < 2.32
	G_SOURCE_REMOVE was introduced in 2.32

2014-12-02  Javier Celaya  <javier.celaya@flexvm.es>

	Add LZ4 compression algorithm support.
	- Use PKG_CHECK_MODULES to find liblz4.
	- Set LZ4 display channel capability.

2014-12-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	usb: keep USB context alive as long as channels exist
	It was assumed the session would remain alive as long as channel
	existed, so USB context would be valid too. Now that channels
	are removed from session, USB context may be destroyed before
	channels. This produces invalid read/write on USB context.
	Make sure the context is alive as long as USB channels are by
	adding a reference on USB manager.

	==6939== Invalid write of size 4
	==6939==    at 0x394B604482: libusb_set_debug (core.c:1850)
	==6939==    by 0x3953A063D5: usbredirhost_open_full (usbredirhost.c:741)
	==6939==    by 0x4EC7E2F:
	spice_usbredir_channel_set_context (channel-usbredir.c:212)
	==6939==    by 0x4EC7AB6:
	spice_usbredir_channel_reset (channel-usbredir.c:125)
	==6939==    by 0x4EACCDC: spice_channel_reset (spice-channel.c:2621)
	==6939==    by 0x4EACDB4: channel_disconnect (spice-channel.c:2640)
	==6939==    by 0x4EAC28F: spice_channel_coroutine (spice-channel.c:2423)
	==6939==    by 0x4EE8B1C: coroutine_trampoline (coroutine_ucontext.c:63)
	==6939==    by 0x4EE87D6: continuation_trampoline (continuation.c:55)
	==6939==    by 0x3928247FEF: ??? (in /usr/lib64/libc-2.20.so)
	==6939==    by 0x51E36FF: ??? (in
	/usr/local/stow/spice-gtk/lib/libspice-client-glib-2.0.so.8.5.0)
	==6939==    by 0xCF0C18F: ???
	==6939==  Address 0xff15f90 is 0 bytes inside a block of size 536 free'd
	==6939==    at 0x4A07CE9: free (in
	/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
	==6939==    by 0x394B606466: libusb_exit (core.c:2041)
	==6939==    by 0x4ECC590: spice_usb_device_manager_finalize (usb-device-manager.c:371)

	usb: return early if channel is not usb
	Return early if channel is not USB, replace:

	if (SPICE_IS_USBREDIR_CHANNEL(channel)) {
	    /* code */
	}

	with

	if (!SPICE_IS_USBREDIR_CHANNEL(channel))
	    return;

	session: disconnect in idle
	This is a workaround for existing clients such as virt-viewer that do
	not hold a reference to their sessions when calling
	spice_session_disconnect() and crash now that channels are removed from
	session during the call. They expect disconnection events to be deferred
	instead, let's defer actual disconnection to idle time for public
	disconnect API for compatibility reasons (it is still recommended to fix
	client code, for eventual future iterations)

	session: keep a reference on disconnect
	It is idiomatic for client code to clean up its reference on channel
	disconnection. Keeping a reference during disconnect helps solving
	potential crashes if the session is unref'ed during callbacks.

	session: remove sticky disconnecting flag
	This used to help prevent double-unref when channel were considered part
	of the session as long as they lived. Now it shouldn't be required
	anymore

	channel: deprecate spice_channel_destroy()
	This function is somewhat useless, and dangerous since it is calling
	g_object_unref() behind your back (although this is mentioned in the
	doc, I consider this a bad practice).

	display: don't reschedule stream if disconnected from session
	Avoid the following critical when a channel is disconnected with a
	pending stream (the streams are cleared on channel reset, after
	coroutine exit)

	  (process:17188): GSpice-CRITICAL **: spice_session_get_mm_time: assertion 'session != NULL' failed

	  #0  0x00007ffff71c24e5 in spice_session_get_mm_time (session=0x0) at spice-session.c:1999
	  #1  0x00007ffff71d438c in display_stream_schedule (st=0xa33040) at channel-display.c:1014
	  #2  0x00007ffff71d4a09 in display_stream_render (st=0xa33040,
	      st@entry=<error reading variable: value has been optimized out>) at channel-display.c:1165
	  #3  0x0000003e1944a553 in g_timeout_dispatch (source=0xad64e0, callback=<optimized out>, user_data=<optimized out>) at gmain.c:4520
	  #4  0x0000003e19449aeb in g_main_context_dispatch (context=0x6a32b0) at gmain.c:3111
	  #5  0x0000003e19449aeb in g_main_context_dispatch (context=context@entry=0x6a32b0) at gmain.c:3710
	  #6  0x0000003e19449e88 in g_main_context_iterate (context=0x6a32b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
	  #7  0x0000003e1944a1b2 in g_main_loop_run (loop=0x97e200) at gmain.c:3975
	  #8  0x0000003e1c9ebb35 in gtk_main () at gtkmain.c:1207
	  #9  0x0000000000430185 in main (argc=1, argv=0x7fffffffdcb8) at virt-viewer-main.c:119

	session: remove channels on disconnect
	A channel is considered to be part of a session as long as it is
	alive. However, this model is problematic, since library user may hold
	channel references, and thus the channel will remain in the
	session. Calling spice_session_disconnect() several time will end up
	calling spice_channel_destroy(), releasing references that aren't owned
	by the session. This usually causes crashes, in particular with language
	bindings that do not deal well with a library model where objects can't
	be referenced at will.

	session: move SpiceSessionPrivate out of headers
	Make sure none of the SpiceSessionPrivate fields are accessed directly anymore

	gtk: do not require glib session private fields
	Use GObject object association for session helpers.

	GtkSession and DesktopIntegration are in the gtk library SpiceSession is
	in glib one. So far we had the SessionPriv structure shared between the
	two libraries, so they could fit their pointers there. But this is no
	longer possible when moving the private structure in .c. We could add
	more accessors, but they would need to be in public API, and this isn't
	supposed to be accessed by API users.

	usb: move device manager initialization to session
	Use session accessors to initialize the device manager.
	Add missing session parameter check (public API).

	webdav: move initialization to session
	Use session accessors to initialize the webdav server

	Rename display_channels_count/n_display_channels

	session: add and use internal accessors
	Avoid dereferencing session private data directly, and use accessors
	instead.

	session: set session for migration when connecting

	session: rename migration_copy/for_migration

	smartcard: use spice_session_is_for_migration()

	smartcard: do not initialize manager for migration session
	The migration session is temporary and shouldn't interact with system.

	Add spice_session_is_for_migration()

	session: protect internal functions against invalid args
	Make sure calling an internal session function returns with an error
	when called with a NULL pointer. This will help channel code when
	it is removed from session before being destructed.

	audio: move spice_audio_get() to session

	audio: add accessor to check if audio is enabled

2014-12-01  Victor Toso  <victortoso@redhat.com>

	audio: Avoid bad pipelines from gst_parse_launch
	gst_parse_launch may return not NULL even when error is set.
	This can lead to data loss when playing or recording audio.

	audio: new-sample callback must return GST_FLOW_OK

2014-12-01  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: simplify autogen.sh

	build-sys: fix out-of-tree autofoo

2014-11-30  Pavel Grunt  <pgrunt@redhat.com>

	Release keyboard grab using keyboard shortcut
	This commit adds the ability to release the keyboard grab when
	the release keys (ctrl+alt) are pressed and released. It allows
	to use keyboard shortcuts (eg alt+tab, alt+f4) on the client.

	The keyboard is grabbed again when the release keys are pressed
	and released or when the mouse moves.

	https://bugs.freedesktop.org/show_bug.cgi?id=85331

2014-11-27  Fabiano Fidêncio  <fidencio@redhat.com>

	spice-widget: check whether the widget is realized in focus_in_event()
	Returning early on focus_in_event(), when widget is not realized, avoids
	segfault when running on Windows using GTK3.

	Program received signal SIGSEGV, Segmentation fault.
	_gdk_windows_has_impl <window=window@entry=0x0> at gdkwindow.c:584
	<gdb> bt
	 #0  _gdk_window_has_impl (window=window@entry=0x0) at gdkwindow.c:584
	 #1  0x70f02821 in gdk_win32_window_get_handle (window=0x0) at
	     gdkwindow-win32.c:3459
	 #2  0x00c759ef in update_display (display=0x1b18440) at
	     spice-widget.c:1297
	 #3  0x00c77280 in focus_in_event (widget=0x1b18440, focus=0x1b02b68) at
	     spice-widget.c:1462
	 #4  0x665727f5 in ?? () from C:\Program Files\VirtViewer
	     (GTK3)\bin\libgtk-3-0.dll
	 #5  0x00000000 in ?? ()

2014-11-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	migration: delay switch host reconnect
	The following critical happens on switch-host:

	(remote-viewer:4617): GSpice-CRITICAL **: channel_connect: assertion
	'c->sock == NULL' failed

	The critical happens since the main channel reset code calls
	set_agent_connected(), which will yield to main loop, so reconnection
	can't happen after calling spice_channel_disconnect(), and must wait
	until the channel reset completes.

2014-11-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	migration: don't check socket error
	During migration, the original socket is closed before the coroutine
	finishes, so it's not guaranteed that c->sock will still be set when the
	channel is in an error state in spice_channel_iterate().

	coroutine: reference object when signaling
	Before the signal is actually emitted, the channel may be
	released. Let's keep a reference to the object during
	the function time, to prevent the object from being destroyed before
	calling g_signal_emit() or g_object_notify() in main context.

	migration: use spice_session_abort_migration() on error
	Use a more complete method for the job

	migration: remove unnecessary reference

	migration: create the migration session earlier
	The migration session creation may fail. Instead of delaying the session
	creation to the main_connect() callback, do it directly from the message
	handler context, to report failure early to server.

	migration: improve debug log

	migration: remove migration cleanup from dispose
	The spice_session_disconnect() method now calls
	spice_session_abort_migration(), so it is not necessary to do migration
	cleanups in dispose anymore

	migration: set connecting state before fd request
	During migration, the main channel coroutine initiating the process is
	waiting for connection completion of all
	channels. migrate_channel_event_cb() yields back to the main channel
	coroutine once all channels have completed connection, or it will abort
	migration for unexpected channel events, such as SPICE_CHANNEL_CLOSED

	If the migration is cancelled before connection completes, but the
	channels state are still in the SPICE_CHANNEL_STATE_UNCONNECTED state,
	no events will be emitted in channel_disconnect(), and the source
	session main channel will remain frozen waiting for migration completion
	or failure.

	Currently, for client-fd channels, the channel state remains UNCONNECTED
	until the fd is provided. But if cancellation occurs, no channel events
	are emitted and the source session is stuck.

	Before requesting the fd, set the channel state to connecting, so it
	will emit an error if disconnect happens, and it will finish cancelling
	the migration in source session main channel.

	migration: fail with client provided fd
	Currently the fd request is done on the migration session, which is not
	connected with the client session, so the client has no way to provide
	fd for the migration. And the original and migration session ends up
	stuck. Failing early seems the best for now.

	migration: set session migration during connect
	Track the migration session earlier, so that disconnecting before
	migration finished will abort and release it.

	migration: add "connecting" state
	Add a new migration state to track early migration step, when migration
	session is connecting to destination

	migration: abort migrate on disconnect
	If the session has an ongoing migration, but it is disconnected,
	abort it.

	migration: add a few more pre-conditions in migration code
	Those preconditions help to figure out several issues related to
	migration.

	usb: stop processing usb events on error
	If libusb returned an error in the event loop, stop further event
	handling. This avoid spinning in an error loop in error cases.

	audio: use weak references to channel
	The audio channels are currently referenced and released on channel
	close events. However, this event may not happen if the channel never
	was connected. Keeping channels alive also prevent session from
	finishing.

	By not holding the ref, the channel can go to dispose
	when it is no longer needed, and the session can be disposed too.

	Add missing finalize chaining
	Finalize should chain up to the finalize method of the parent class.

	Trivial fix.

	Remove obsolete TODO item
	Tunnel are long obsoleted (did they ever work)
	Remove it from TODO list.

	Pushed unreviewed as trivial

2014-11-19  Fabiano Fidêncio  <fidencio@redhat.com>

	usb-device: Expose libusb device
	As we only can filter USB devices by their Classes and sometimes it is
	not enough (eg: I do not want to have Keyboard and Mouse, but I want to
	have Joysticks, being all of them part of HID Class), let's expose the
	libusb device associated to the SpiceUsbDevice, so the applications can
	have access to whatever information they need, directly from the libusb
	device, to refine their filters.

2014-11-19  Christophe Fergeau  <cfergeau@redhat.com>

	Really fix SndCodec leaks in handle_{playback,record}_start
	The leak fix from commit 6729c341120f was actually not doing anything at
	all as it was setting c->codec to NULL before trying to free it. It was
	also not fixing the exact same leak in the record channel.
	This commit addresses these 2 issues.

	Recheck clipboard size after modifying its data
	SpiceGtkSession::clipboard_received_cb() starts by checking if the
	clipboard is empty, or if the length of its data exceeds
	'max-clipboard-size'.

	Later in that function, the data is modified, and can be shortened
	(removal of trailing '\0' or of '\r' for Windows -> linux copy and
	paste), or enlarged (addition of '\r' for linux -> Windows c&p).

	This commit adds another check that the clipboard length is still valid
	(non-0, and not bigger than 'max-clipboard-size') after making these
	transformations.

	Fix empty clipboard check
	SpiceGtkSession::clipboard_received_cb starts by checking if the
	length of the X selection data is not 0. However, right after this check,
	if gtk_selection_data_get_length() returned -1, it decides it got an
	empty clipboard, sets the selection length to 0, and does not return
	early.
	This commit reworks the len == 0 / len == -1 checks to make sure we
	always return early when we get no data from the clipboard.

2014-11-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Draw server-side pointer when the session has the grab
	If there are several SpiceDisplay widgets, only one will have the grab,
	but the pointer may need to be drawn on another of the displays.  We
	thus need to track the grab status on SpiceSession, not just
	per-display.

	This solves the following bug:
	https://bugs.freedesktop.org/show_bug.cgi?id=38024

	gtk-session: add pointer-grabbed property
	Returns TRUE if the pointer is currently grabbed by this session.

	Add missing G_GNUC_INTERNAL
	Trivial fix

2014-10-31  Christophe Fergeau  <cfergeau@redhat.com>

	Drop glib < 2.28 support
	With el6 now shipping glib 2.28, there is no very good reason to keep
	support for older glib versions alive, especially as it will barely be
	tested.

2014-10-31  Victor Toso  <vtosodec@redhat.com>

	Add GStreamer 1.0 audio support
	Based on Christophe Fergeau's patch.
	To enable audio with GStreamer 1.0: --with-audio=gstreamer1

	There is only a few changes between those versions, worth mentioning:
	- audio capabilities "audio/x-raw,format=..." instead of
	  "audio/x-raw-int,..."
	- appsink signal for new data changed from "new-buffer" to "new-sample"

2014-10-30  Christophe Fergeau  <cfergeau@redhat.com>

	Always use #include "config.h"
	gnulib 'make syntax-check' prohibits use of #ifdef HAVE_CONFIG_H so this
	commit removes it from where it's used. It also makes sure we always use
	the same syntax for including config.h (#include "config.h" VS #include
	<config.h>) as a consistent way of doing that is expected.

	Remove spice-mime.xml/spicy.desktop
	They were never translated from .in files to actual files, and now it's
	clear we don't want to promote spicy as a first-class desktop
	application.

	Fix "can not" typo in comment

	Remove redundant use of const
	const guint16 const * has one extra 'const' which is removed by that
	commit

	Remove trailing whitespace

	Remove blank lines at end of files

	Add missing (C) to Red Hat copyright line
	gnulib's make syntax-check comes with a rule enforcing that Red Hat
	copyright lines contain both "(C)" and "Copyright".

	Add quoting around AC_DEFINE* first argument

	build-sys: Don't use test -a/-o
	They are not portable, it's recommended to use test && test or test ||
	test instead

2014-10-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	mailmap: add Dietmar Maurer

	build-sys: add some missing MAINTAINERCLEANFILES

	build-sys: generate gitignore in tests dir

	build-sys: change default libtool options
	- disable-static: it's quite uncommon to use static build of gtk libraries
	- win32-dll: the shared libs build cleanly for win32 already

2014-10-29  Christophe Fergeau  <cfergeau@redhat.com>

	Regenerate symbol files with make update-symbol-files
	Some symbols were manually added to these files not in the right place
	(non-alphabetical order). This causes spurious diffs when trying to
	compare these files with the ones make update-symbol-files would
	generate.
	This commit syncs these file with the ones which are autogenerated to
	spot more easily differences between the file in git and the
	autogenerated one.

	Tell ctags to ignore G_GNUC_CONST in declarations
	Without that, it will fail to parse:
	GType spice_uri_get_type(void) G_GNUC_CONST;

	Remove spice_gtk_session_sync_keyboard_modifiers from public headers
	It's not meant to be exported as it's not listed in spice-gtk symbol map file.

	Add spice_session_get_proxy_uri to spice-glib-sym-file
	It was only added to map-file.

	Update spice-common submodule
	This picks up some warning fixes.

	Update NEWS

	Don't strip \0 from non-text clipboard data
	Commit a8f2e2d added recomputation of the length of clipboard data to
	strip the trailing \0 in order to avoid a Windows gtk+ bug. However it's
	doing it too for non-text data, which causes issues when copying images
	as they are very likely to contain \0 within their data. They will thus
	be truncated.

	This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1154719

	Reindent block of code in clipboard_received_cb
	This is in preparation for fixing a regression in image copy&paste. This
	commit only introduces a new (unused) block and reindent the
	corresponding code, it can easily be reviewed with git show -w

2014-10-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: make vapigen silent

	build-sys: clean-up generated vapi files

	build-sys: remove unnecessary BUILT_SOURCES rule

	build-sys: add extra dependencies on symbols files
	Whenever the symbols files are modified, rebuild the library.

	build-sys: s/GLIB_VERSION/GLIB_SYMBOLS

2014-10-27  Daniel P. Berrange  <berrange@redhat.com>

	Fix macro for checking spice version numbers
	As it is for now, the micro number is never checked.

2014-10-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: hide cursor when ungrabbed
	Let's avoid confusion of multiple pointers visible on the client
	desktop: hide the guest pointer if the spice client doesn't have the
	grab, display it again when the grab is taken back.

	gtk: keep cursor in the same place on ungrab
	On ungrab, the transition from remote (server-side) cursor to host
	cursor makes it jump somewhere else rather than staying at the same
	place. Restore cursor position on ungrab to match with guest position.

	https://bugs.freedesktop.org/show_bug.cgi?id=85117

2014-10-23  Christophe Fergeau  <cfergeau@redhat.com>

	Fix SndCodec leak in playback_handle_start()
	An audio SpiceChannel can get several times the 'start' message during
	its lifetime. If received multiple times (for example when rebooting a
	VM), this would lead to a SndCodec leak as reported by valgrind:

	==7749== 27,036 (48 direct, 26,988 indirect) bytes in 1 blocks are definitely lost in loss record 11,418 of 11,440
	==7749==    at 0x4A08946: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
	==7749==    by 0x5772A9A: spice_malloc0 (mem.c:109)
	==7749==    by 0x5772D42: spice_malloc0_n (mem.c:173)
	==7749==    by 0x57FB3E2: snd_codec_create (snd_codec.c:267)
	==7749==    by 0x573774C: playback_handle_start (channel-playback.c:380)
	==7749==    by 0x5721E44: spice_channel_handle_msg (spice-channel.c:2859)
	==7749==    by 0x571ECB3: spice_channel_recv_msg (spice-channel.c:1877)
	==7749==    by 0x571F402: spice_channel_iterate_read (spice-channel.c:2114)
	==7749==    by 0x571F614: spice_channel_iterate (spice-channel.c:2152)
	==7749==    by 0x5720411: spice_channel_coroutine (spice-channel.c:2429)
	==7749==    by 0x575CD3A: coroutine_trampoline (coroutine_ucontext.c:63)
	==7749==    by 0x575C9F4: continuation_trampoline (continuation.c:55)
	==7749==    by 0x3898E47FEF: ??? (in /usr/lib64/libc-2.20.so)
	==7749==    by 0xAED547666C92C2FF: ???
	==7749==    by 0xFFEFFF92F: ???

2014-10-10  Cole Robinson  <crobinso@redhat.com>

	m4: Update manywarnings from gnulib
	Fixes these noisy errors on Fedora 21:

	gcc: warning: switch '-Wmudflap' is no longer supported

2014-10-10  Fabiano Fidêncio  <fidencio@redhat.com>

	Add support to handle username when connecting with SASL
	Based on a patch from Dietmar Maurer <dietmar@proxmox.com>
	http://lists.freedesktop.org/archives/spice-devel/2013-October/015138.html

	Add errors related to the SASL auth
	SPICE_CLIENT_ERROR_AUTH_* will be used to set more detailed errors
	with respect to the main channel event SPICE_CHANNEL_ERROR_AUTH.

	Add missing doc for SPICE_CLIENT_USB* errors

2014-10-10  Dietmar Maurer  <dietmar@proxmox.com>

	Add "username" property to SpiceSession

2014-09-18  Christophe Fergeau  <cfergeau@redhat.com>

	Don't report IO error on clean guest shutdown
	Since commit 9cf9ca434, spice_channel_iterate() will report a
	SPICE_CHANNEL_ERROR_IO error to library users when
	SpiceChannel::has_error is set. In particular, when the server side
	closes its SPICE sockets because the VM is being shut down, an IO error
	will get reported. Prior to this change, a channel-closed event was
	reported on graceful VM shutdowns as there was
	a g_socket_condition_check() guarding the emission of the IO error
	signal.

	This commit readds the g_socket_condition_check() test, but only when
	SpiceChannel::has_error is set.

	This fixes https://bugs.freedesktop.org/show_bug.cgi?id=83692

2014-09-18  Pavel Grunt  <pavel.grunt@gmail.com>

	Fix -Wsign-compare

2014-09-18  Fabiano Fidêncio  <fidencio@redhat.com>

	channel-main: allow transferring multiple files at once
	Allow to drag and drop, from host to guest, more than one file at the
	same time.

2014-09-05  Christophe Fergeau  <cfergeau@redhat.com>

	win-usb: Initialize GError before using it
	GError variables must be set to NULL before passing them to a function
	which might set them.
	This fixes the runtime warning reported in rhbz#1138195:

	(remote-viewer.exe:3896): GLib-WARNING **: GError set over the top of a
	previous GError or uninitialized memory.
	This indicates a bug in someone's code. You must ensure an error is NULL
	before it's set.
	The overwriting error message was: handle_dev_change: Error getting
	device list from libusb: Other error [-99]

2014-08-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	xfer: send data message of size 0 for 0-size file
	Make sure we send a xfer data message for 0-size files.
	This avoid leaking file descriptiors in guest agent when
	copying such files.

	Reported-by: Cody Chan <int64ago@gmail.com>

	https://bugzilla.redhat.com/show_bug.cgi?id=1135099

2014-08-28  Jonathon Jongsma  <jjongsma@redhat.com>

	Wait to send monitor config until agent caps are received
	When the first display is disabled and the vdagent is restarted in the guest,
	it sometimes becomes enabled. This appears to be caused by a race condition
	when an agent becomes connected. When the agent becomes connected, virt-viewer
	triggers a display update (spice_main_send_monitor_config()). This display
	update happens in a timeout handler, but the timeout interval is set to 0 (so
	it behaves basically like an idle handler).

	The race happens because spice_main_send_monitor_config() behaves slightly
	differently depending on the agent's capabilities. And sometimes the idle
	handler runs before the client and server have negotiated capabilities. In this
	case, we have to assume that the server does not support sparse monitor
	configurations. So instead of sending down an update where display #0 is off
	and display #1 is WxH, we send down an update that only a single display:
	display #0 is WxH. This results in the first display becoming enabled.

	To solve the issue, we wait until the agent negotiates capabilities
	before sending the display configuration message.

	Resolves: rhbz#1043782, rhbz#1032923

2014-08-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: fix coroutine assertion when switching to TLS port
	Since v0.21-35-gbaa51c5, there are some new coroutine preconditions.

	The winfiber implementation can reach, when the structure isn't cleared,
	which happens when switching channel connection to TLS port and the
	coroutine is recycled.

	CRITICAL **: coroutine_yieldto: assertion '!to->exited' failed

	In a near future, it would be nice to use the safer implementation
	proposed for glib, see bgo#719362 (using a private copy)

2014-08-13  Christophe Fergeau  <cfergeau@redhat.com>

	Use G_OS_WIN32 #define everywhere
	Currently some parts of the windows specific code is checking for the
	WIN32 define, and other parts are checking G_OS_WIN32. This commit uses
	G_OS_WIN32 everywhere for consistency.

2014-08-13  Cody Chan  <int64ago@gmail.com>

	keyboard: wrong defined macro for WIN32
	On windows client, there's no effect for guest when
	enabling CAPS_LOCK/NUM_LOCK/SCROLL_LOCK on
	(because of the delay, guest may take the effect for several seconds).
	There's a wrong defined macro, then <modifiers> is ALWAYS 0,
	and the keyboard state of guest is synchronized with the state client
	by spice_gtk_session_sync_keyboard_modifiers_for_channel(...).

2014-08-13  Christophe Fergeau  <cfergeau@redhat.com>

	Fix 'loose' typo

	Fix build with automake 1.14
	When building a source file from a different directory, automake 1.14
	is warning that the automake option 'subdir-objects' must be used:

	automake: warnings are treated as errors
	gtk/Makefile.am:218: warning: source file
	'$(top_srcdir)/spice-common/common/sw_canvas.c' is in a subdirectory,
	gtk/Makefile.am:218: but option 'subdir-objects' is disabled
	automake: warning: possible forward-incompatibility.
	automake: At least a source file is in a subdirectory, but the
	'subdir-objects'
	automake: automake option hasn't been enabled.  For now, the
	corresponding output
	automake: object file(s) will be placed in the top-level directory.
	However,
	automake: this behaviour will change in future Automake versions: they
	will
	automake: unconditionally cause object files to be placed in the same
	subdirectory
	automake: of the corresponding sources.
	automake: You are advised to start using 'subdir-objects' option
	throughout your
	automake: project, to avoid future incompatibilities.
	autoreconf: automake failed with exit status: 1

	This causes the build to fail because we are also using the -Werror
	automake option.
	Updating the spice-common submodule to git master fixes part of this
	issue as 7ea1cc5 'Fix generation of marshallers in VPATH builds' removed
	directory references from some source files.

	This commit removes the references to
	$(top_srcdir)/spice-common/common/sw_canvas.[ch] from gtk/Makefile.am.
	At this point, automake subdir-objects support does not seem to cope
	very well with source files which are not in relative subdirectories,
	see http://mytestbed.net/issues/1327
	What is done instead is to add some local client_sw_canvas.[ch] files
	which will include the needed files from spice-common with the
	appropriate #define set (these sw_canvas.[ch] files are meant to be used
	as templates).

	This fixes https://bugs.freedesktop.org/show_bug.cgi?id=67304

	channel-display: Remove #ifdef SW_CANVAS_CACHE
	It's unconditionnally defined at build time in the global CPP flags, so
	the #ifdef SW_CANVAS_CACHE are always enabled and can be removed.

	Ensure '\0' is not part of text clipboard data
	On Windows, with some versions of gtk+, GtkSelectionData::length
	will include the final '\0'.
	When a string with this trailing '\0' is pasted in some linux
	applications, it will be pasted as <NIL> or as an invisible character,
	which is unwanted.

	This commit ensures the length we send to the agent does not
	include any trailing '\0'.

	https://bugzilla.redhat.com/show_bug.cgi?id=1090122

2014-07-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update spice-common

2014-07-23  Fabiano Fidêncio  <fidencio@redhat.com>

	Don't use _GET_PRIVATE all the time
	Let's make use of the priv members in the structs, which are much much
	faster. Also, to keep the type-safety, the SPICE_IS_* macros were added
	in the public methods affected by this patch.

	Patch based on an old patch from Alexander Larsson (alexl@redhat.com).

	Prefer using g_malloc0()/g_free()
	As we already depend on GLib, let's use g_{malloc,new}0() instead of the
	standard malloc() or the spice_{malloc,new}*() and g_free() instead of
	the standard free() when possible.
	Memory allocated by other libraries using malloc() should still be freed
	by free().
	As a side effect of the changes, we are muting a few warnings caught by
	coverity.

	Fix "REVERSE_INULL" caught by coverity

	g_type_init() is deprecated in GLib 2.36

2014-07-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: prefix proxy lookup errors
	Proxy errors are already reported with G_IO_ERROR_PROXY messages,
	however proxy name lookup error can be more detailed.

	https://bugzilla.redhat.com/show_bug.cgi?id=1115986

2014-06-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	proxy: use http proxy by default if no scheme given
	SPICE_PROXY used to accept URI without scheme, falling back on
	http/3128. This is a regression introduced with 5dcab09ac

2014-06-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Remove coroutine trampolines
	Use va_list instead of an ugly trampoline hack

	usbredir: don't use emit_main_context() for non-signal code
	The following patch deprecates the signal helper code

2014-05-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	README: add vala-tools build-dep

2014-05-22  Tiziano Müller  <tiziano.mueller@stepping-stone.ch>

	Add missing GIO_LIBS to libspice-client-glibs
	If spice-gtk is built without PHODAV, libgio is missing from the list of
	libraries to link against, causing undefined symbols for all gio functions.

2014-05-21  Tiziano Müller  <tiziano.mueller@stepping-stone.ch>

	Do not depend on libsoup directly
	The libsoup-dependency is not directly used but comes in as a dependency
	of phodav and phodav has libsoup correctly recorded in its pkg-config
	file.

	Introduce --enable/disable-webdav option
	This makes the phodav dependency configureable.
	And name it after the corresponding channel.

2014-05-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Revert "clipboard: prevent reentering main loop if main channel is busy"
	This change broke primary clipboard copying from remote to client, on win32.

	There is a pending ::clipboard-grab emission, so the channel is not
	idle, and it will handle emission and resume in the inner loop without
	issue. We should really handle this situation with care though, and the
	best would be to teach gtk+ to do async clipboard request.

	This reverts commit e3efa8cec51045d87a14a7e4f921c24ad5caffb1.

2014-05-15  Marc-André Lureau  <marcandre.lureau@gmail.com>

	clipboard: check that clipboard request does not belong to remote
	Check clipboard owner, to avoid cyclic dependency of clipboard requests.

	clipboard: prevent reentering main loop if main channel is busy
	The main channel must be idle to avoid entering the nested loop,
	or it will never reach the condition to leave it.

	This should not happen. It can happen currently when the remote sends a
	clipboard request while the clipboard is grabbed by the remote. In this
	case, while the clipboard-request signal is emitted by main channel, the
	clipboard_get() loop is entered, but the main coroutine will not be
	woken up to proceed with the request, the main channel will remain
	"frozen" and it won't be possible to leave cleanly from the inner loop.
	The application appears to be frozen, because it can't quit properly.

	Related to:
	https://bugzilla.redhat.com/show_bug.cgi?id=1083489

2014-04-29  Christophe Fergeau  <cfergeau@redhat.com>

	Include glib-compat.h in spice-option.c
	Commit 8c89485 added a call to g_clear_pointer().

2014-04-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	option: check that default ca-file exists
	Don't set default ca-file path if the file doesn't exists.

2014-04-23  Marc-André Lureau  <marcandre.lureau@gmail.com>

	option: use more portable default ca-file path
	If no CA path is given, a default one is set. Use g_build_filename() to
	set a more portable and valid default path.

2014-04-17  Christophe Fergeau  <cfergeau@redhat.com>

	Fix leak in spice_gtk_session_sync_keyboard_modifiers()
	The list of channels returned by spice_session_get_channels()
	must be freed after use.

2014-04-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: signal primary-destroy when clearing all surfaces
	When destroying the primary surface, we need to signal it, since
	listeners might be referencing the data pointer. Currently, this only
	happens during channel finalize().

	This could help with rhbz#1082555.

	gtk-session: always sync modifiers for client events
	The channel state is not synchronous.

	It may happen that we want to set and unset quickly a modifier, but the
	guest modifier state hasn't been updated yet, and will still be seen as
	unset, preventing the last unset change.

	gtk-session: s/g_debug/CHANNEL_DEBUG

2014-04-15  Christophe Fergeau  <cfergeau@redhat.com>

	Include gtk-compat.h in spice-gtk-session.c
	GDK_IS_X11_DISPLAY is not available on gtk+ 2.x, but it already has a
	fallback definition in gtk-compat.h

	Gather gtk+ compatibility code in a single file
	There are gtk+ version checks in several source files to add
	compatibility implementations of gtk3 functions not available
	in gtk2. This commit gathers all of them in a gtk-compat.h header,
	similar to what is done for glib-compat.h

	Add compat implementation of g_queue_free_full()
	This was introduced in glib 2.32 and the webdav channel uses it.

2014-04-08  Christophe Fergeau  <cfergeau@redhat.com>

	Use correct printf format modifier for gssize
	This fixes this warning/error:

	channel-webdav.c: In function 'demux_to_client':
	channel-webdav.c:318:5: error: format '%ld' expects argument of type 'long
	int', but argument 5 has type 'gssize' [-Werror=format=]
	     CHANNEL_DEBUG(self, "pushing %ld to client %p", size, client);

	Add man page
	Spice-GTK provides SPICE-specific command line options. This man page
	describes these options as well as the format of SPICE URIs.

2014-04-03  Jonathon Jongsma  <jjongsma@redhat.com>

	Use GdkKeymap to listen for keyboard modifier changes
	Connect to the GdkKeymap::state-changed signal to detect when the client
	keyboard modifiers have changed. This keeps the client and the guest in sync
	even when the SpiceDisplay widget isn't focused. New values are only sent down
	to the guest if the new value is different than the current value.

	Ensure keyboard modifiers are synchronized properly
	In certain circumstances, the keyboard modifiers get out-of-sync between the
	guest and the client. This is easy to reproduce with the following steps:
	 - launch virt-viewer with a guest that is not running
	 - start the guest
	 - while guest is booting, enable CAPS LOCK on the client
	 - after guest finishes booting, it will set its modifiers to a default value
	   (e.g. numlock on, capslock off)
	 - now capslock is OFF in the guest, but ON in the client
	 - toggle caps lock
	 - now capslock is ON in the guest, but OFF in the client

	This moves the responsibility for synchronizing client and guest modifiers into
	SpiceGtkSession. It can't be handled easily within the SpiceDisplay widget since
	there can be multiple display widgets for each inputs channel.

	A new function (spice_gtk_session_sync_keyboard_modifiers()) was added so that
	synchronization can be triggered manually if desired. But it also registers a
	signal handler for the InputsChannel::inputs-modifiers signal to detect when the
	guest has changed its modifiers. The signal handler simply overrides the guests
	modifiers and sets them back to the value from the client.

2014-04-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update NEWS for v0.25

	Make phodav an optional external dependency
	Now that upstream provides a stable/versioned API, it will be
	easier to deal with than with submodules.

	build-sys: re-organize summary to show major info first

	build-sys: add missing soup subst

2014-03-31  Jonathon Jongsma  <jjongsma@redhat.com>

	Fix missing SPICE_GTK_MICRO_VERSION value
	configure.ac tries to assign a default value of 0 to the micro version if it's
	empty, but the shell variable assignemnt doesn't work because there's whitespace
	around the '=' sign.

	This results in SPICE_GTK_MICRO_VERSION being defined to (), which causes a
	compilation failure in files that include it.

2014-03-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update NEWS for v0.24

	Update phodav

2014-03-25  Christophe Fergeau  <cfergeau@redhat.com>

	Advertise SASL cap from client
	A client setting this capability indicates to the server that it's able
	to handle SASL authentication, and it also indicates that if SASL is
	to be used for authentication, then it won't expect a valid 'pub_key' field
	in SpiceLinkReply.

	The reason for making guarantees about not looking at the pub_key field is
	that its presence and size is hardcoded in the protocol, but in some
	hardened setups (using fips mode), generating a RSA 1024 bit key as
	expected is forbidden and fails. With this new capability, the server
	knows the client will be able to handle SASL if needed, and can skip
	the generation of the key altogether. This means that on the setups
	described above, SASL authentication has to be used.

2014-03-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	webdav: use some more explicit names
	Address Alon's review from
	http://lists.freedesktop.org/archives/spice-devel/2014-March/016383.html

2014-03-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Start NEWS file

	session: add shared-dir property and option
	Allow to specify the shared directory from the command line, or at
	runtime via properties. (still default to xdg public share, if none
	specified)

	Add webdav channel
	See spice-common for protocol details.  phodav, a webdav server library,
	is imported thanks to a submodule, until this project has a stable API
	and releases.

	The webdav channel is reponsible for handling port events and
	multiplexing the request streams. Extra care has been made to avoid
	blocking and to enable some fairness between concurrent streams, however
	this has been particularly tricky and is likely to have some issues
	left.

	The webdav server is run in a seperate thread, using libsoup. The client
	communication is done via a local tcp socket, but protected to only
	accept local connection and with a pretty strong password.

	The home directory is exported for the remote to browse, which seems to
	be a sensible default atm.

2014-03-18  Christophe Fergeau  <cfergeau@redhat.com>

	mingw64: Fix gssize printf-format warnings
	When building with mingw64, several warnings about using the wrong format
	specifier for gssize/gsize occur similar to:

	win-usb-dev.c: In function 'g_udev_client_list_devices':
	win-usb-dev.c:145:21: error: format '%i' expects argument of type 'int', but argument 7 has type 'gssize' [-Werror=format=]
	                     name, errstr, rc);

	This commit makes use of the G_GSIZE_FORMAT/G_GSSIZE_FORMAT macros provided
	by glib to silence these warnings.

	I've checked that this does not introduce new warnings on linux and mingw32
	builds.

2014-03-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix spice_display_get_pixbuf() with offset area
	Fix screenshot of secondary displays, with an area position != (0,0).

	This has never been working correctly since the surface display "area"
	was introducted in:

	commit e3bb7b1cfd162fcb8943e9d582dab43eeec6ce41
	Author: Marc-André Lureau <marcandre.lureau@redhat.com>
	Date:   Tue Jun 12 19:24:47 2012 +0200

	    display: learn to restrict display to an area

	https://bugzilla.redhat.com/show_bug.cgi?id=1029761

	Silence some gcc warnings
	cc1: warnings being treated as errors
	spice-uri.c: In function ‘spice_uri_parse’:
	spice-uri.c:105: error: ‘saveptr’ may be used uninitialized in this
	function [-Wuninitialized]
	spice-uri.c:105: error: ‘saveptr2’ may be used uninitialized in this
	function [-Wuninitialized]

2014-03-13  Christophe Fergeau  <cfergeau@redhat.com>

	sasl: Rework memory handling in spice_channel_perform_auth_sasl()
	While looking at the SASL code, I noticed some memory leaks in error paths.
	This commit adds a cleanup: block to free some of the memory dynamically
	allocated in that function, and remove the corresponding g_free() from
	the regular code flow. This should ensure that both the regular path
	and the error paths free the same memory.

	This fixes at least this 'mechlist' leak which I got during regular SASL
	PLAIN authentication:
	==3452== 6 bytes in 1 blocks are definitely lost in loss record 140 of 11,706
	==3452==    at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.s
	==3452==    by 0x35BAC4EE6E: g_malloc (gmem.c:104)
	==3452==    by 0x5BF7CAA: spice_channel_perform_auth_sasl (spice-channel.c:1440)
	==3452==    by 0x5BF9033: spice_channel_recv_link_msg (spice-channel.c:1727)
	==3452==    by 0x5BFAECD: spice_channel_coroutine (spice-channel.c:2348)
	==3452==    by 0x5C35D6D: coroutine_trampoline (coroutine_ucontext.c:63)
	==3452==    by 0x5C35A1B: continuation_trampoline (continuation.c:51)
	==3452==    by 0x31342479BF: ??? (in /usr/lib64/libc-2.18.so)
	==3452==    by 0x75F2940591224CFF: ???
	==3452==    by 0xE756E5F: ???
	==3452==    by 0xE7589BF: ???
	==3452==    by 0xFFEFFF78F: ???
	==3452==    by 0x5BFCD92: g_io_wait_helper (gio-coroutine.c:43)
	=

	Make sure config.h is included first in all .c files
	This is recommended by autoconf documentation
	http://nondot.org/sabre/Mirrored/autoconf-2.12/autoconf_3.html#SEC15
	and some #defines in config.h can change what happens in system headers,
	so config.h has to be included first.

	The only file which does not get this treatment is
	gtk/spice-client-gtk-module.c as this breaks the build on gtk+2:

	CC       SpiceClientGtk_la-spice-client-gtk-module.lo
	In file included from /usr/include/python2.7/pyconfig.h:6:0,
	                 from /usr/include/python2.7/Python.h:8,
	                 from /usr/include/pygtk-2.0/pygobject.h:5,
	                 from spice-client-gtk-module.c:20:
	/usr/include/python2.7/pyconfig-64.h:1182:0: error: "_POSIX_C_SOURCE" redefined [-Werror]
	 #define _POSIX_C_SOURCE 200112L
	 ^
	In file included from /usr/include/limits.h:25:0,
	                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:168,
	                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/syslimits.h:7,
	                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:34,
	                 from /usr/lib64/glib-2.0/include/glibconfig.h:11,
	                 from /usr/include/glib-2.0/glib/gtypes.h:34,
	                 from /usr/include/glib-2.0/glib/galloca.h:34,
	                 from /usr/include/glib-2.0/glib.h:32,
	                 from /usr/include/glib-2.0/gobject/gbinding.h:30,
	                 from /usr/include/glib-2.0/glib-object.h:25,
	                 from ./glib-compat.h:24,
	                 from ../config.h:201,
	                 from spice-client-gtk-module.c:18:
	/usr/include/features.h:228:0: note: this is the location of the previous definition
	 #  define _POSIX_C_SOURCE 200809L
	 ^
	cc1: all warnings being treated as errors

2014-03-10  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Fix setting of SPICE_GTK_MICRO_VERSION
	After e124a3b2e which added the SPICE_GTK_CHECK_VERSION macro, a non-fatal
	'./configure: line 15251: x24: command not found' appears in configure
	output. This is because [ ] is not interpreted as the 'test' command by
	autoconf, but is rather used as a way to quote configure.ac content.
	This commit replaces the use of [] with a more typical AS_IF.

2014-02-27  Christophe Fergeau  <cfergeau@redhat.com>

	Add missing #include "glib-compat.h"
	wocky-http-proxy.c and vmcstream.c make use of functions that were
	not available in glib 2.26 so we need fallback for them through
	glib-compat.h or spice-gtk won't build with older glibs.

2014-02-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: fix crash when releasing primary surface
	Since 1fcaaa15f8aca362f9e6afc87fb43cfbccf6ff62, display_surface is
	allocated using gslice. However MSG_DISPLAY_MODE handler didn't allocate
	using GSlice. This can eventually lead to a crash when freeing, such as:

	Thread no. 1 (6 frames)
	 #2 g_slice_free1 at gslice.c:1097
	 #3 iter_remove_or_steal at ghash.c:787
	 #4 clear_surfaces at /lib64/libspice-client-glib-2.0.so.8
	 #5 spice_display_channel_finalize at
	 /lib64/libspice-client-glib-2.0.so.8
	 #7 spice_channel_delayed_unref at /lib64/libspice-client-glib-2.0.so.8
	 #12 gtk_main at gtkmain.c:1158

	https://bugzilla.redhat.com/show_bug.cgi?id=1069546

2014-02-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add a SPICE_GTK_CHECK_VERSION macro

2014-02-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	spice-common: revert last change

	session: add spice_session_get_proxy_uri()
	Learn to return the currently configured proxy, to allow
	client to tweak parameters, such as username and password.

	channel: add spice_channel_get_error()
	Add a function to retrieve the last GError from a channel, this may be
	useful to provide additional error details to the client.

	Make SpiceURI a public API
	Generalize a little bit SpiceProxy to allow easy URI manipulation by
	clients.

	channel: talk to giostream instead of gsocket

	channel: simplify has error code
	Get rid of a superflous g_socket_condition_check().

	openssl: learn to handle a new kind of BIO based on GIOStream
	Although reusing BIO_new_socket() once again is a hack, it seems
	to be the easiest way... The proper solution is certainly to start
	using GTls instead, but that will require a glib 2.28 dep bump.

	Fill g_proxy_address_new() with protocol, user and password
	This way, the call might eventually support more proxy and
	authentication.

	http-proxy: add https proxy
	This will require glib 2.28 for GTls support, atm

	spice-proxy: parse https protocol

	http-proxy: specify Basic scheme
	Or Squid will fail with:
	WARNING: Unsupported or unconfigured/inactive proxy-auth scheme

	proxy: parse user and pass from uri

	proxy: add user and pass properties

	proxy: split uri with : in only 2 parts
	We want just host:port here.

	compat: add strtok_r fallback
	The following Spice proxy URI parsing code makes use of it, but it is
	not available on Windows

	Origin:
	http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;a=blob;f=compat/strtok_r.c

	misc: indent wocky proxy with 2-spaces

	misc: make warning more explicit

	Add SpiceVMC GIOStream
	This allows to use conveniently GIOStream APIs without caring about
	coroutine and Spice messages details.

	channel: add spice_vmc_write_async()
	Refactor port code to create a private GIO async function that can send
	SPICE_MSGC_SPICEVMC_DATA message over any channel.

2014-02-20  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Don't build tests when not building static libs
	The tests rely on static linking in order to get access to symbols which
	are not exported in spice-gtk shared libraries. When build of static
	libraries is disabled with --disable-static, we should not attempt to build
	the tests as this will result in link errors.

2014-02-10  Christophe Fergeau  <cfergeau@redhat.com>

	Don't attempt to send 0 scancode when releasing keys
	When releasing all keys, we send a key release for scancode in the
	key_state array, including the very first element with scancode 0.
	send_key() complain when the scancode is 0, so make sure we don't call it
	for this first element.

	This fixes a
	(remote-viewer:25548): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed
	warning when starting remote-viewer windowed, and then switching to another
	desktop client-side using ctrl+alt+arrow.

2014-02-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.23

2014-02-10  Ryan Lortie  <desrt@desrt.ca>

	utils tests: fix sign comparison problem
	This test compares a guint8 and a gchar with '==' which fails when comparing
	240 to -16, even though these are the same byte value.  Add an explicit
	'guchar' cast to correct the problem.

	https://bugs.freedesktop.org/show_bug.cgi?id=74754

2014-02-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: don't track open_host_idle source id
	In all cases, when the coroutine is resumed, the idle source has been
	running and thus will be removed. Doing it a second time results in the
	wrong source being removed or an invalid source warning.

	spicy: do not flush and disconnect all kind of ports
	Some ports may want to live a bit longer, such as following webdav.

	port: send opened a port-event signal on init
	If the port is already opened, emit a "opened" port-event on init. This
	simplifies user code to only handle port events.

	test: fix a few compiler warnings
	util.c: In function 'test_set_bit':
	util.c:131:13: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]

	Add GDBus version of dbus-glib code

	Narrow dbus-glib code, to fit other implementation easily

	dbus: remove priv->dbus_conn
	It's only needed once, and it is better to group with rest of dbus-glib
	code.

	build-sys: detect GDBus

	misc: sed -i -e 's/USE_DBUS/USE_DBUS_GLIB/g'

2014-01-07  Christophe Fergeau  <cfergeau@redhat.com>

	Use local GError in spice_convert_newlines()
	spice_convert_newlines() declares a local 'err' GError but never uses it as
	the function directly uses the 'error' variable passed as an argument.
	Use 'err' throughout the function instead of the 'error' argument as this
	looks like what was intended.
	This fixes this coverity warning:

	Error: DEADCODE (CWE-561): [#def144]
	spice-gtk-0.22.9-fb3d/spice-gtk3-0.22.9/gtk/spice-util.c:318: assignment: Assigning: "err" = "NULL".
	spice-gtk-0.22.9-fb3d/spice-gtk3-0.22.9/gtk/spice-util.c:364: null: At condition "err", the value of "err" must be NULL.
	spice-gtk-0.22.9-fb3d/spice-gtk3-0.22.9/gtk/spice-util.c:364: dead_error_condition: The condition "err" cannot be true.
	spice-gtk-0.22.9-fb3d/spice-gtk3-0.22.9/gtk/spice-util.c:365: dead_error_begin: Execution cannot reach this statement "g_propagate_error(error, err);".

2014-01-03  Christophe Fergeau  <cfergeau@redhat.com>

	controller: Don't call g_type_init() in test with newer glib
	g_type_init() is deprecated, calling it on newer glib causes a compile-time
	warning.

	controller: Add missing #ifdef WIN32 in test
	The spicec_pid variable is only used in a #ifdef WIN32 block, but it was
	unconditionnally declared/initialized. This causes a gcc warning.

	controller: Avoid out of string bound accesses in test
	When computing the amount of data to send for static strings, the test
	program is confusing sizeof() which returns the size of the string
	including the trailing '\0' and strlen() which returns the size of the
	string without the trailing '\0'.
	This causes attempts to access one byte past the string.
	This fixes this coverity warning:
	Error: OVERRUN (CWE-119): [#def44]
	spice-gtk-0.20/spice-gtk-0.20/gtk/controller/test.c:258:
	overrun-buffer-arg: Overrunning array ""main,inputs,playback"" of 21 bytes
	by passing it to a function which accesses it at byte offset 21 using
	argument "22UL".
	spice-gtk-0.20/spice-gtk-0.20/gtk/controller/test.c:101:5:
	access_dbuff_in_call: Calling "memcpy(void * restrict, void const *
	restrict, size_t)" indexes array "data" with index "data_size".

	cursor: Avoid potential sign extension issue
	When doing arithmetic operations on the uint16_t cursor width and height
	with integer constants, the result of the operation will be of type 'int'
	as the integer constant as type 'int'.
	There are 2 places which assign the result of such an operation to
	an (unsigned 64 bit)) size_t variable. This means that if width/height are
	big enough, the int -> size_t conversion would cause a sign extension to
	happen, which is unwanted as we are only manipulating positive values.

	This commit explicitly mark the constants with the correct unsigned type.
	This fixes this kind of coverity warnings:

	spice-gtk-0.20/spice-gtk-0.20/gtk/channel-cursor.c:388: sign_extension:
	Suspicious implicit sign extension: "hdr->height" with type "unsigned
	short" (16 bits, unsigned) is promoted in "4 * hdr->width * hdr->height" to
	type "int" (32 bits, signed), then sign-extended to type "unsigned long"
	(64 bits, unsigned).  If "4 * hdr->width * hdr->height" is greater than
	0x7FFFFFFF, the upper bits of the result will all be 1.

2014-01-02  Jeremy White  <jwhite@codeweavers.com>

	Add support for the Opus codec.

	Don't emit start signals if codec creation fails.

	Use the new snd_codec interface to process encoded audio.

2013-12-12  David Jaša  <djasa@redhat.com>

	Use TLS version 1.0 or better
	When creating a TLS socket, both spice-server and spice-gtk currently
	call SSL_CTX_new(TLSv1_method()). The TLSv1_method() function set the
	protocol version to TLS 1.0 exclusively. The correct way to support
	multiple protocol versions is to call SSLv23_method() in spite of its
	scary name. This method will enable all SSL/TLS protocol versions. The
	protocol suite may be further narrowed down by setting respective
	SSL_OP_NO_<version_code> options of SSL context.  This possibility is
	used in this patch in order to block use of SSLv3 that is enabled by
	default in openssl for client sockets as of now but spice has never used
	it.

2013-12-09  Marc-André Lureau  <marcandre.lureau@gmail.com>

	coroutine: add missing glib.h include

2013-12-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix giscan warnings, add missing signal doc
	  GISCAN   SpiceClientGLib-2.0.gir
	channel-main.c:633: Warning: SpiceClientGLib: incorrect number of
	  parameters in comment block, parameter annotations will be ignored.
	channel-main.c:672: Warning: SpiceClientGLib: incorrect number of
	  parameters in comment block, parameter annotations will be ignored.
	channel-main.c:716: Warning: SpiceClientGLib: incorrect number of
	  parameters in comment block, parameter annotations will be ignored.
	channel-main.c:757: Warning: SpiceClientGLib: incorrect number of
	  parameters in comment block, parameter annotations will be ignored.
	channel-display.c:367: Warning: SpiceClientGLib: incorrect number of
	  parameters in comment block, parameter annotations will be ignored.
	  GICOMP   SpiceClientGLib-2.0.gir

	Pushed unreviewed under trivial rule.

2013-11-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.22
	v0.22
	=====

	- improve inverted cursor support
	- use system-wide trust certificate store
	- make sasl support work with other method than MD5
	- fix some clipboard crasher, limit clipboard size
	- fix various regressions:
	  usbredir, alt-tab on win32, palette crash, agent notification, old
	  protocol support, sasl ending crash, gthread coroutine crash, close
	  sockets on migration, pulse backend crash
	- fix a few memory leaks
	- build-sys improvements

	build-sys: bump spice-glib version
	new symbols in spice-glib, bump before release

	continuation: fix "fortify" crash
	Since 0508f586,  errno.h is included above #undef _FORTIFY_SOURCE.

	But it must be placed above system headers to take effect

	 *** longjmp causes uninitialized stack frame ***:
	 /home/jwhite/xfer/spice/bin/spicy terminated
	 ======= Backtrace: =========
	 /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7ffff48dc2a7]
	 /lib/x86_64-linux-gnu/libc.so.6(+0xef239)[0x7ffff48dc239]
	 /lib/x86_64-linux-gnu/libc.so.6(__longjmp_chk+0x33)[0x7ffff48dc1a3]
	 /home/jwhite/xfer/spice/lib/libspice-client-glib-2.0.so.8(+0x49761)[0x7ffff78f1761]
	 /home/jwhite/xfer/spice/lib/libspice-client-glib-2.0.so.8(+0x499a4)[0x7ffff78f19a4]
	 /home/jwhite/xfer/spice/lib/libspice-client-glib-2.0.so.8(+0x1bae7)[0x7ffff78c3ae7]
	 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x135)[0x7ffff505f355]
	 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a688)[0x7ffff505f688]
	 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0x72)[0x7ffff505fa82]
	 /home/jwhite/xfer/spice/bin/spicy[0x4054aa]
	 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7ffff480bead]
	 /home/jwhite/xfer/spice/bin/spicy[0x405679]

2013-11-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	pulse: do not abort on corking no stream
	There is no guarantee that a stream actually exist when min-latency
	change is notified.

	Check that there is an actual stream before calling cork().  All callers
	where previously checking that stream existed. Add a pre-condition to
	verify argument and spot that error is from spice-gtk itself.

	Fixes the following crash:
	 #1  0x0000003c12e34105 in abort () at abort.c:92
	 #2  0x0000003c2c223180 in pa_stream_is_corked (s=0x0) at
	 pulse/stream.c:2536
	 #3  0x0000003c2c648cb7 in stream_cork (pulse=<value optimized out>,
	 s=0x7fbb38, with_flush=0) at spice-pulse.c:227
	 #4  0x0000003c2c649989 in playback_min_latency_changed (object=<value
	 optimized out>, pspec=<value optimized out>, data=0x7fbad0) at
	 spice-pulse.c:674

	https://bugzilla.redhat.com/show_bug.cgi?id=1032785

2013-11-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: swap channel GSocketConnection on migration
	When migration completes, unrefing the new connection leads to original
	GSocket pending refs, and thus the sockets stay in CLOSE_WAIT.

	This is a regression from 8029bd0 where GSocketConnection is kept around
	to satisfy old glib.

	https://bugzilla.redhat.com/show_bug.cgi?id=1024501

	This will also probably fix:
	https://bugzilla.redhat.com/show_bug.cgi?id=952375

2013-11-21  dietmar@proxmox.com  <dietmar@proxmox.com>

	Fix SASL for mechanism using WANT_CLIENT_FIRST
	Current code works with DIGEST-MD5, but not with PLAIN.

	In particular, when using PLAIN, sasl_client_start() returns SASL_OK, which
	should not be an error in spite of vague/confusing upstream documentation
	about this:
	http://asg.andrew.cmu.edu/archive/message.php?mailbox=archive.cyrus-sasl&msg=10104

2013-11-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	main: fix recent main_channel_reset() warning
	Fix wrong warning added in 0704147d.

	(lt-spicy:17511):
	GSpice-WARNING **: (channel-main.c:415):spice_main_channel_reset:
	runtime check failed: (c->agent_connected == FALSE)

	coroutine: make gthread coroutine pass tests
	The coroutine entry() return value must be passed via the caller->data,
	since coroutine_swap() returns from->data. (this is needed because
	coroutine_swap() argument is used both to return from entry() or to send
	data to a running coroutine)

	When leaving a coroutine, clear its caller.

	Return correct coroutine_self() before other coroutine are initialized.

	tests: add some coroutine tests

	coroutine: replace IN_MAIN_CONTEXT macro
	Use a nicer function, with correct prefix.
	Remove extra "context" from function name

	coroutine: error out on OOM or impossible conditions
	Take an approach similar to gthreads, which are considered as low
	level/must work features by glib, which aborts on failures.

	channel: get rid of connection_id, available from session

	channel: remove useless desc != NULL check
	spice_channel_type_to_string() does not return NULL

2013-11-20  Christophe Fergeau  <cfergeau@redhat.com>

	Fix 'monitors' leak in update_monitor_area()
	This function has an early return where we fail to unref the 'monitors'
	array.

2013-11-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	main: send max-clipboard to agent
	Send configured max-clipboard size to the agent, after receiving agent
	capabilities.

	See also spice-protocol patch description:
	http://lists.freedesktop.org/archives/spice-devel/2013-November/015254.html

	main: simplify usage of VD_AGENT_HAS_CAPABILITY
	Introduce a helper function test_agent_cap() to clear the code a
	little bit.

	main: use self for main channel variable
	This simplifies the following commit which uses even more
	SPICE_MAIN_CHANNEL macro, and makes the code unnecessarily heavy.

	Add SPICE_MAX_CLIPBOARD environment variable
	Allow to easily override default max-clipboard value with environment
	variable.

	Block sending clipboard data > max-clipboard
	Attempt to send very large clipboard data may easy cause OOM
	abort, either in  gdk - some patch are proposed to improve the situation,
	or in spice-gtk itself.

	Let's have a property that blocks unreasonably big clipboard data from
	being processed (by default 100mb). Users willing to send larger data
	can use the send basic drag-drop send file instead, or tweak the
	property value.

2013-11-19  Christophe Fergeau  <cfergeau@redhat.com>

	Use system-wide trust certificate store
	Currently, spice-gtk will look in $HOME/.spicec/spice_truststore.pem
	by default for its trust certificate store (to verify the certificates
	used during SPICE TLS connections).
	However, these days, progress is under-way to have a system-wide
	certificate store [1].
	In order to use it, we only need to call SSL_CTX_set_default_verify_paths()
	and it will automatically use the shared system CA store if the distro
	is properly setup.
	We only try to use that store if there was no user-provided CA file to use,
	or if we failed to load it.

	[1] https://fedoraproject.org/wiki/Features/SharedSystemCertificates

	build-sys: Add real autodetection of python
	configure help text says that by default python will be used automatically
	if appropriate, however this only means that on !windows and !gtk3, we will
	force build of the python bindings, and fail if any needed package to build
	them is missing.

	This commit improves on the current checks so that when autodetecting
	python, if a package is missing then build of the bindings is silently
	disabled rather than failing.

	build-sys: Re-enable building of python bindings by default
	Commit daa4ece tried to disable building of python bindings on Windows by
	default, but in doing so, it also disabled building of python bindings by
	default when we are building neither for Windows nor for gtk3.

	build-sys: Fix invalid 'test' syntax in configure.ac
	test ... -o test ... is not a valid shell construct, change it to
	test ... || test ... as this is more portable than test ... -o ...

	This was causing a warning when running configure.

2013-11-18  Christophe Fergeau  <cfergeau@redhat.com>

	Fix leak of mmapped memory when cc_init() fails

	Check coroutine_init() return value
	coroutine_init() can fail, but spice-channel.c was not checking its return
	value, which could lead to some crashes if coroutine_init() failed and we
	then try to use coroutine_yieldto()

2013-11-18  Daniel P. Berrange  <berrange@redhat.com>

	Free coroutine stack when releasing coroutine
	The coroutine_init function mmap's a stack for the
	ucontext coroutine, but nothing ever munmaps it.

	Abort if mmap of coroutine stack fails
	If we fail to mmap the stack, abort the processs rather
	than returning an error. This is standard practice in
	glib apps, and the caller was not checking the
	coroutine_init() return code leading to memory corruption.

2013-11-18  Christophe Fergeau  <cfergeau@redhat.com>

	Fix IN_MAIN_CONTEXT when using coroutine=gthread
	The IN_MAIN_CONTEXT macro checks coroutine_self()->caller against NULL to
	decide whether we are in the main context or not. However, this is an
	implementation detail of the ucontext coroutine implementation, in the
	gthread implementation, coroutine_self()->caller will be non-NULL even in
	the main context.

	This commit introduces a coroutine_is_main_context() method which each
	coroutine backend implements. It turns out it can be implemented the same
	way for each backend.

	Fix crash on remote-viewer startup with gthread coroutine
	g_object_notify_main_context() was recently changed to automatically
	detect whether we are running in the main context or not, and SpiceSession
	is now using g_object_notify_main_context().

	In order to achieve that, IN_MAIN_CONTEXT is used, but it's not safe
	to be used before coroutine_init() is called. IN_MAIN_CONTEXT expands to
	(coroutine_self()->caller == NULL), but coroutine_self() will be NULL when
	using gthreads for the coroutine implementation until coroutine_init() has
	been called.

	Before coroutine_init() has been called, we'll always be running in the
	main context, so we can just add a check for coroutine_self() != NULL to
	IN_MAIN_CONTEXT to solve that issue.

2013-11-18  Marc-André Lureau  <marcandre.lureau@gmail.com>

	coroutine: fix current coroutine
	When leaving a coroutine, it swaps back to where it came from, not to
	the leader/main coroutine.

	coroutine: add some preconditions

2013-11-07  Jonathon Jongsma  <jjongsma@redhat.com>

	Guarantee that 'uuid' property is notified after connection
	This creates a synchronization point and allows API users to rely on the fact
	that they'll always get a UUID notification before all of the channels are
	created.

	Make sure property notifications are done in the main context
	Modify g_object_notify_main_conetxt() to work whether it's called from the main
	context or a coroutine context.  Change object notify calls in SpiceSession to
	use g_object_notify_main_context() instead of g_object_notify().

	Revert "Add ability to get SpiceDisplay resolution"
	This reverts commit a285e0187d15ad650f6524f3811072fa55b20617.

	This API was not actually needed for what I intended to use it for.  So revert
	for now.  We can always add it back if necessary in the future.

	Conflicts:
		gtk/spice-widget.c

2013-11-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: blank surface on creation
	In theory, zero-ing the surface shouldn't be necessary, as only
	invalidated/painted region should be shown. However, this results in
	less artifacts on resolution changes (probably some regions are painted,
	but with masks, blend, copy etc), in particular on console after VM
	reboot.

2013-11-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: add since tag for spice_display_get_monitor_config()

2013-11-04  Jonathon Jongsma  <jjongsma@redhat.com>

	SpiceDisplay: validate 'self' argument for public API
	Add defensive g_return[_val]_if_fail(SPICE_IS_DISPLAY()) to all public API

	Add ability to get SpiceDisplay resolution
	Add spice_display_get_monitor_config() to get the current configuration of the
	display.

2013-11-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix spice-common submodule, my bad

2013-11-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	util: document spice_uuid_to_string

2013-11-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	util: do not overwrite G_MESSAGES_DEBUG=all
	glib log handler only check for a single 'all' value, mixing it with
	other domains name will disable 'all' messages.

2013-10-29  Jonathon Jongsma  <jjongsma@redhat.com>

	Export spice_uuid_to_string() properly
	Update map-file and spice-glib-sym-file

	Expose spice_uuid_to_string() as public API
	SpiceSeession has a 'uuid' property that is a byte array, but clients often need
	the uuid in string format (for writing to disk, etc).  Rather than having each
	client re-implement this, expose the utility function as public API in
	spice-gtk.

2013-10-19  Alon Levy  <alevy@redhat.com>

	channel-cursor: mono cursors edge highlighting
	Fix 998529, mono (invert) cursors not visible on a black background, by doing
	simple edge detection on the cursor (this is done once when the cursor
	is changed and then cached, cursors are 32x32 generally) and thus having
	a cursor with contrast on both dark and light backgrounds.

	When (if) GDK gets invert cursor support (wayland?) then we can just use
	the cursor as is. Until then X doesn't provide any way I see of solving
	this otherwise. The end result was tested with the I beam cursor that
	the original bug was referring to (run putty on a windows 7 vm) and
	looks ok to me.

	Moving the core function to spice-util for testing.

2013-10-18  Alon Levy  <alevy@redhat.com>

	cursor-channel.c: add cursor print function for debugging only (ifdefed)

2013-10-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	main: add missing vdagent caps name
	This is useful in debug messages atm.

2013-10-16  Christophe Fergeau  <cfergeau@redhat.com>

	sasl: Fix crash when ending a SASL session
	When exiting remote-viewer after authenticating through SASL, I got
	this crash:

	 #0  0x0000000100a51870 in ?? ()
	 #1  0x000000314d20c53e in _sasl_log (conn=<optimized out>, level=5, fmt=0x7fffe49893e8 "DIGEST-MD5 client mech dispose")
	     at common.c:1985
	 #2  0x00007fffe4982d88 in digestmd5_client_mech_dispose (conn_context=0xaf1900, utils=0xaefd10) at digestmd5.c:4580
	 #3  0x000000314d208654 in client_dispose (pconn=0xaf0710) at client.c:332
	 #4  0x000000314d20b76b in sasl_dispose (pconn=0xa51898) at common.c:851
	 #5  0x00007ffff7602dc7 in channel_reset (channel=0xa52250, migrating=0) at spice-channel.c:2493
	 #6  0x00007ffff760f7b7 in spice_inputs_channel_reset (channel=0xa52250, migrating=0) at channel-inputs.c:615
	 #7  0x00007ffff76030ac in spice_channel_reset (channel=0xa52250, migrating=0) at spice-channel.c:2551
	 #8  0x00007ffff76031e0 in channel_disconnect (channel=0xa52250) at spice-channel.c:2570
	 #9  0x00007ffff760283d in spice_channel_coroutine (data=0xa52250) at spice-channel.c:2368
	 #10 0x00007ffff763d14b in coroutine_trampoline (cc=0xa51900) at coroutine_ucontext.c:58
	 #11 0x00007ffff763ce30 in continuation_trampoline (i0=10819840, i1=0) at continuation.c:49
	 #12 0x00000031342479c0 in ?? () from /lib64/libc.so.6
	 #13 0x0000000000a51cc8 in ?? ()
	 #14 0x0000000000000000 in ?? ()

	It turns out that the sasl_callback_t data passed when calling
	sasl_client_new() must be valid until sasl_dispose() is called. I could not
	find mentions of this in the official documentation but
	https://mail-archives.apache.org/mod_mbox/subversion-dev/201109.mbox/%3C20110908072256.GN25324@ted.stsp.name%3E
	describes what happens.
	Making the sasl_callback_t structure static should be enough to guarantee
	that the data will stay around long enough.

	Display g_debug messages when SPICE_DEBUG is set
	When SPICE_DEBUG is set but --spice-debug is not used, we fail
	to set G_MESSAGES_DEBUG to the log domain used by spice-gtk, which
	causes debug messages not to be printed as one would expect.

	Fix --spice-debug
	If spice_util_set_debug() gets called before spice_util_get_debug(),
	then the value set using spice_util_set_debug() will be overridden
	by the result of g_getenv("SPICE_DEBUG") != NULL the first time
	spice_util_get_debug() is called.

	This causes remote-viewer --spice-debug to not enable debug as
	advertised if SPICE_DEBUG is not set.

	An alternate fix would have been to set debug_once.status to
	G_ONCE_STATUS_READY but then we would lose the thread-safety
	guarantees GOnce gives us.

2013-10-10  Christophe Fergeau  <cfergeau@redhat.com>

	Fix switch to old SPICE protocol
	After the previous commit, spice_channel_switch_protocol() is now
	called when needed, but it's not doing anything. What happens is
	that spice_channel_switch_protocol() triggers a channel disconnection
	and then it queues an idle to reconnect (after having changed the
	protocol version to be used).

	When spice_channel_recv_link_hdr() returns, we need to jump out of
	the coroutine to let the idle trigger and the new channel coroutine
	be started. But jumping out of the coroutine will call channel_disconnect()
	which calls channel_reset() which disables the idle switch_protocol()
	just queued. This causes the connection attempt to be apparently
	stuck with nothing happening.

	Falling back to the older SPICE protocol is not the only situation
	when we need to drop the current connection attempt and reconnect,
	we also need to do that when the remote server returns
	SPICE_LINK_ERR_NEED_SECURED to let the client know it needs to use
	a secure port for this channel. This is handled by the 'switch_tls'
	variable set in spice_channel_recv_link_msg and handled in
	spice_channel_coroutine().

	'switch_tls' does the same thing as spice_channel_switch_protocol(),
	except that it calls spice_channel_connect() after channel_disconnect()
	has been called, which means the idle queued by channel_connect()
	won't get cleared.

	This all that commit does, remove the spice_channel_switch_protocol()
	method and use the same codepath as 'switch_tls' to handle the
	reconnection.

	Reenable call to switch_protocol() on protocol version mismatches
	This partially reverts b19acbc. This commit broke the fallback
	to the old protocol as it added a check for c->peer_msg != NULL
	before calling switch_protocol(), but mismatch between local
	and remote protocol versions is detected before c->peer_msg is
	allocated, so:
	    if (c->peer_msg != NULL && c->link_hdr.major_version != 1) {
	         SPICE_DEBUG("%s: error, switching to protocol 1 (spice 0.4)",
	c->name);
	         spice_channel_switch_protocol(channel, 1);
	         return TRUE;
	    }
	will never get triggered when c->peer_hdr.major_version !=
	c->link_hdr.major_version

	The crash described in b19acbc occurred when calling
	spice_channel_recv_link_msg() in spice_channel_coroutine()
	after a call to spice_channel_recv_link_hdr() failed and did
	not set c->peer_msg.

	This commit removes the c>peer_msg check done before calling
	spice_channel_switch_protocol() so that it gets called when needed,
	but makes sure that we return FALSE to indicate that an error happened
	and that we need to reconnect. This way we won't try to call
	spice_channel_recv_link_msg() when c->peer_msg is NULL.

	Use latest warnings.m4 from gnulib
	The one we were using does not work properly with clang, causing
	the build process to try to use -f/-W options that are not
	supported by clang.

2013-10-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk-session: avoid mainloop recursion in clipboard_get
	clipboard_get() exits when the clipboard data is received, or when the
	agent connection state change. However, if the agent is already
	disconnected, neither of those 2 conditions can be reached.

	Check if the agent is connected before running loop, exit early if not.

	gtk-session: fix clipboard_agent_connected
	Use swapped connection to pass data as first argument to signal handler.

	main: fix notify of agent disconnection
	spice_main_channel_reset_agent() reset connected state, and prevent
	notify of property change.

	This is a minor regression introduced in c3adb24425.

2013-10-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: cache id is uint64_t

	display: fix palette regression
	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

2013-10-02  Alon Levy  <alevy@redhat.com>

	mono cursor: increase contrast, better looking putty cursor (rhbz 998529)

2013-09-30  Hans de Goede  <hdegoede@redhat.com>

	spice-channel: Fix usbredir being broken since commit 159c6ebf
	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

2013-09-26  Marc-André Lureau  <marcandre.lureau@gmail.com>

	win32: fix alt-tab grab regression
	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

	build-sys: do not compile python binding with windows by default

	Update spice-common

	build-sys: add --with-audio=auto
	Defaults to GStreamer on Windows, and PulseAudio otherwise atm.

	build-sys: fix --with-sasl
	The default configure sasl auto setting will error out if SASL is
	missing. Instead, silentely skip sasl configure if detected missing.

2013-09-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: fix g_clear_pointer usage on old glib
	As pointed out and verified on the ML after 0.21 release by Klaus
	Hochlehnert.

2013-09-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.21

2013-09-18  Colin Walters  <walters@verbum.org>

	acl helper: Use ruid of invoker rather than looking up euid in /proc
	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

2013-09-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: fix bad cast on win64
	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));

2013-09-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: unshare the palette cache
	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.

	channel: unref incoming migrate data

2013-09-13  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk: simplify spice_channel_recv_msg
	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.

	gtk: use slices for frequently allocated objects

	gtk: use GHashTable in display_cache
	The cache code isn't very quick, it shows up in profilers.  Using
	GHashTable allows to simplify the code while making it faster.

	channel: do not reenter the mainloop at every iteration
	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

	util: avoid calling getenv for every SPICE_DEBUG
	That doesn't seem to really improve performance so much,
	but that' s what we should do probably.

2013-09-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: keep a reference to the primary surface
	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

	display: make the hashtable to destroy the surface
	Improve a bit the code by using hashtable ownership.

	display: replace ring with hashtable
	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

	channel: add SPICE_DISABLE_CHANNELS
	Allow to disable selectively channels, mainly used for testing,
	ex: SPICE_DISABLE_CHANNELS=display spicy-stats -p 12345

	channels: use spice_channel_set_handlers()
	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)

	channel: add spice_channel_set_handlers()
	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().

	display: use bitfields for surface flags
	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).

	Update spice-common

2013-09-10  Dunrong Huang  <riegamaths@gmail.com>

	Fix _FORTIFY_SOURCE redefine error
	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>

2013-08-28  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Revert "tmp: debug MIGRATE_DATA"
	This reverts commit f670e0197c37b2f12518f6d216642f67cdf5de84.

2013-08-28  Alon Levy  <alevy@redhat.com>

	gtk/channel-cursor: copy spicec hack, RHBZ #998529
	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.

	gtk/channel-cursor.c: add cursor_type_to_string for debugging

	gtk/channel-display: only use SysV shm for x11

	tmp: debug MIGRATE_DATA

2013-08-28  Jonathon Jongsma  <jjongsma@redhat.com>

	Remove incorrect option context from spicy-stats
	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.

	channel-main: Fix minor documentation issue
	Documentation for spice_main_clipboard_selection_request() refers to deprecated
	signal 'main-clipboard' instead of 'main-clipboard-selection'

2013-08-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	tests: add some dos2unix tests
	This is probably not exhaustive enough, but better than nothing.

	gtk: handle clipboard CRLF conversion
	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.

	util: add unix2dos and dos2unix
	Convert line endings from/to LF/CRLF.

2013-08-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Revert "channel-main: Convert text line-endings if necessary (rhbz#752350)"
	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.

	gtk: remove dead code

2013-08-20  Uri Lublin  <uril@redhat.com>

	win-usb-dev: ignore devices with addr 1 for LIBUSBX_API_VERSION
	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).

	win usb: request for driver uninstall only for driver that were installed
	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

2013-08-19  Christophe Fergeau  <cfergeau@redhat.com>

	Use g_slist_foreach_full glib implementation
	For the compat case (glib < 2.28), we were using our own implementation
	instead of directly reusing glib code.

2013-08-19  Hans de Goede  <hdegoede@redhat.com>

	glib-compat: g_slist_free_full: pass the right ptr to destroy (rhbz#997893)
	The destroy function passed to g_slist_free_full should be passed the elements
	data pointer, not the element itself.

2013-08-13  Christophe Fergeau  <cfergeau@redhat.com>

	Only use GOBJECT_INTROSPECTION_CHECK when available
	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

2013-08-06  Yonit Halperin  <yhalperi@redhat.com>

	usb-device-manager: fix compilation error when usbredir is disabled

2013-08-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	usb-widget: fix gtk2 Python bindings
	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.

2013-07-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: copy "ca" property in copy ctor
	This fixes the GSpice-WARNING **: no cert loaded, when doing a seamless
	migration (when using the "ca" property).

2013-07-11  Christophe Fergeau  <cfergeau@redhat.com>

	smartcard: Only init manager once
	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.

	smartcard: Handle VCARD_EMUL_INIT_ALREADY_INITED
	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

2013-07-08  Christophe Fergeau  <cfergeau@redhat.com>

	doc: Fix typo in code comment

	gst: Chain up dispose impl to parent class

	gi: Add (allow none) to optional const char * params
	Without that annotation, it will not be possible to pass NULL to
	these methods when using a gi-based binding.

	gi: Make sure usb-device-widget.c is introspected
	If it's not, annotation we add to inline gtk-doc comments won't
	be taken into account in the .gir file.

2013-07-05  Hans de Goede  <hdegoede@redhat.com>

	usb-device-manager: Add support for libusb hotplug API
	For now this makes the usb-code even more of a #ifdef party (albeit only
	slightly so). But it does give us (theoretical, untested) usb support on
	Mac OS X, and once the libusb Windows backend also gets hotplug support, we
	can bump the required libusb version to a new enough one, and drop both the
	windows gudev emulation as well as the gudev code-paths.

2013-07-04  Hans de Goede  <hdegoede@redhat.com>

	usb-device-manager: Splitout device add / remove function
	Split the device add / remove functions into a gudev specific part and
	a generic part. This is a preparation patch for adding support libusb's
	new hotplug API.

2013-06-27  Hans de Goede  <hdegoede@redhat.com>

	Add spice_channel_string_to_type to map files
	And document both spice_channel_string_to_type and
	spice_channel_type_to_string.

	channel-main: Convert text line-endings if necessary (rhbz#752350)
	This implements line-ending conversion following the specification in the
	commit message of spice-protocol commit 7be0e88e7e03a956b364cc847aad11b96ed4 :
	vd_agent: Add caps for the agent to signal the guest line-ending (rhbz#752350)

2013-06-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.20

	build-sys: bump spice-glib version
	new symbols in spice-glib, bump before release

	doc: add missing symbols and versions

2013-06-24  Yonit Halperin  <yhalperi@redhat.com>

	display: disabling adaptive video streaming via env var SPICE_DISABLE_ADAPTIVE_STREAMING
	spice-server supports adaptive video streaming only if the client
	publishes SPICE_DISPLAY_CAP_STREAM_REPORT.

	Disabling this feature is useful for debugging and performance comparison.

	display: video stats logging - improve readability and ease of parsing

2013-06-24  Christophe Fergeau  <cfergeau@redhat.com>

	automake: Disable portability warnings
	When they are enabled, autogen.sh fails with:
	automake: warnings are treated as errors
	gtk-doc.make:77: warning: GTK_DOC_V_SETUP_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:78: warning: GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:96: warning: GTK_DOC_V_SCAN_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:97: warning: GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:100: warning: GTK_DOC_V_INTROSPECT_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:101: warning: GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:132: warning: GTK_DOC_V_XML_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:133: warning: GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:149: warning: GTK_DOC_V_HTML_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:150: warning: GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:153: warning: GTK_DOC_V_XREF_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:154: warning: GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:185: warning: GTK_DOC_V_PDF_$(V: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	gtk-doc.make:186: warning: GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion
	doc/reference/Makefile.am:59:   'gtk-doc.make' included from here
	autoreconf: automake failed with exit status: 1

	on my F19.
	-Wportability used to be automatically disabled with automake <= 1.12 when using
	silent rules, but this is no longer the case with automake 1.13 which is what
	fedora 19 uses: http://www.flameeyes.eu/autotools-mythbuster/automake/silent.html
	"As of version 1.13, though, this opt-in is no longer necessary, as all the
	Makefiles are generated to support them. The silent-rules option is now a
	no-op, doing nothing at all, in particular not silencing the portability
	warnings."

	This commit disables these warnings in order to avoid autogen.sh breakage
	because of the use of -Werror, they can be reenabled once gtk-doc.make is
	fixed to avoid these portability warnings.

	Remove obsolete files from POTFILES.in
	intltool-update -M complains about them

	smartcard: Move down spice_smartcard_reader_is_software body
	It's more consistent to have it close to
	spice_smartcard_reader_insert_card() et al.

	Add spice_smartcard_manager_get_readers()
	This returns the list of smartcard readers known to a given
	SpiceSmartcardManager. This is useful to check whether a software
	smartcard reader is available or not.

	smartcard: Add methods to act on software readers
	Currently, the methods to insert/remove smartcards from a software
	smartcard reader are global to the SpiceSmartcardManager singleton
	rather than acting on a SpiceSmartcardreader object.
	This commit adds insert/remove methods acting on such objects.

	smartcard: Report failure when software reader is missing
	As there is no easy way to know if the SpiceSmartcardManager
	has an associated software reader or not, it's better to report
	failure instead of g_return_if_fail on attempts to use
	spice_smartcard_manager_insert/remove_card with no software reader
	available.

2013-06-24  Hans de Goede  <hdegoede@redhat.com>

	Update spice-common

2013-06-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	proxy: remove trailing slash from proxy URL
	Apparently, trailing slash are common for proxy URI. Is there a
	specification for these kind of URI?

	(I cry that we don't have GUri yet to handle parsing... gbo#489862)

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=975472

2013-06-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: don't block key up events
	The win32 ll keyboard hook avoid Windows and other application to
	receive global keyboard events. But some key combinations can't be
	filtered, such as Win+L. However, the windows lock screen doesn't catch
	that the Win key is released, when virt-viewer still holds the hook and
	filters it.

	So pressing Win+L quickly will lock the screen, but some key press in
	the password entry will still be handled as if the Win key was pressed,
	such as Win+P or Win+U and probably other, and prevents user from typing
	his password.

	The only working solution I could find is to just let go all the release
	key events in the hook. There doesn't seem any drawback with that.

	https://bugzilla.redhat.com/show_bug.cgi?id=917986

	widget: release keys on grab-broken
	This is similar to 8cbd5d745c221f788878c9c713f3b46a25828d3f and can be
	reproduced by pressing Win+l while the widget has the keyboard
	grab (pointer over the display).

	I have not reproduced implicit grab-broken event, I suppose they could
	happen if the grab is stolen from within the app. In any case, it's
	probably better to release the keys.

	This is related to:
	https://bugzilla.redhat.com/show_bug.cgi?id=917986

2013-05-29  Hans de Goede  <hdegoede@redhat.com>

	Make sure our foo_get_type functions are thread-safe
	While debugging:
	https://bugzilla.redhat.com/show_bug.cgi?id=866718

	I found a thread-safeness issue with a couple of foo_get_type functions
	in polkit causing this crash.

	After this I decided to check if spice-gtk has the same issue, and it does,
	since foo_get_type can be called from different threads, it is important to
	make them thread-safe.

2013-05-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: remove grab key filter
	The widget currently filters out last key press from grab key sequence
	if it's not a modifier key. But this will prevent nested usage of ungrab
	combinations such as shift+f12.

	https://bugzilla.redhat.com/show_bug.cgi?id=889962

	This will also make the following obsolete:
	https://bugzilla.redhat.com/show_bug.cgi?id=846005

	Build fix, use correct check version

2013-05-15  Mattias Grönlund  <mattias@gronlund.se>

	mingw: Fix non-working AltGr with some layouts
	Running virt-viewer-x64-0.5.6.msi, on Windows 7, connecting to QEMU using
	spice, AltGR key combinations fails (using Swedish keyboard layout both at
	server and client).

	I suspect that this is a variant of
	https://bugzilla.redhat.com/show_bug.cgi?id=904092.

	After some debugging, I realized that there is an extra VK_LCONTROL
	keypress sent by Windows. This extra VK_LCONTROL will then make the key
	e.g. AltGr-< actually be Control-AltGr-<, which is not interpreted as a |
	sign.

	So in spice-widget.c : keyboard_hook_cb(), I added SPICE_DEBUG lines which
	printed out the hooked->scanCode, and realized that this extra VK_LCONTROL
	has a very suspect scanCode with bit 9 set. If I instead press the left
	Ctrl key, it will also emit VK_LCONTROL, but with bit 9 cleared.

	So I just made sure that keyboard_hook_cb(), silently dropped these strange
	VK_LCONTROL events, which seems to work for me.

2013-05-15  Christophe Fergeau  <cfergeau@redhat.com>

	Fix printf format string warning
	When doing a mingw32 build, I hit the following warning (which became an
	error because of -Werror):

	channel-display.c: In function 'destroy_stream':
	channel-display.c:1546:9: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'uint64_t' [-Werror=format=]
	         CHANNEL_DEBUG(channel, "%s: drops total duration %lu ==>", __FUNCTION__, drops_duration_total);
	         ^

2013-05-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Build fixes for gtk+2

	Fix glib2 2.22 build after edf1daf5
	channel-display.c: In function 'display_update_stream_report':
	channel-display.c:1273: warning: implicit declaration of function
	'g_get_monotonic_time'

2013-05-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: timeout after 10s of socket connect() attempt
	https://bugzilla.redhat.com/show_bug.cgi?id=885101

	Fix build after 577263aaf4c

2013-05-13  Yonit Halperin  <yhalperi@redhat.com>

	channel-display: protect video streaming from temporarily unsynced mm_time (migration related)
	rhbz#951664

	When the src and dst servers have different mm-times, we can
	hit a case when for a short period of time the session mm-time and
	the video mm-time are not synced. If the video mm-time is much
	bigger than the session mm-time, the next stream rendering will be
	scheduled to (video-mm-time - session-mm-time), and even after
	the different mm-times are synced, the video won't be rendered
	till the rendering timeout that was scheduled based on a wrong mm-time,
	takes place.
	This patch protects from such cases. You can find more details in the
	code comments.

	spice-session: new signal for notifying on a significant change in mm-time
	mm-time can change after migration. This can cause video synchronization
	problems after migration if not handled appropriately (see rhbz#951664).

	emit_main_context macro: handle calls from both coroutine context and main context

2013-05-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	vncdisplaykeymap: add wayland support
	The Wayland keycode are just Linux evdev, but the Gdk backend
	add the +8 offset used by Xorg evdev.

2013-05-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	vncdisplaykeymap: add broadway support

	keymaps: add basic x11 keysyms
	Ok, this isn't a good idea, but atm, the browser don't seem to send
	hardware keycode, and so Gtk+ broadway backend decided to use keysyms
	representation, which spice-gtk receives as "hardware keycodes"...

	Since Gdk keysyms are same as X11, add a new x11 keysym to keymap.

	This is not going to fly,...

	vncdisplaykeymap: adapt gtk2 compat code

	vncdisplaykeymap: use a window to associate table

	widget: check backend is X11
	spice-gtk blindly assume the backend is X11 if it's compiled on
	Unix. But nowadays, gtk+ support runtime backend selection.

	https://bugzilla.redhat.com/show_bug.cgi?id=961577

	Remove unused spice_set_keyboard_lock_modifiers()
	That code was used in early version to set client modifiers lock
	but it is the wrong approach, and guest should follow client
	state instead.

	Remove GnomeRR code
	Changing client resolution is a bad idea, and never took up.
	Remove some unmaintained experimental code.

	widget: release keys when the grab is taken elsewhere
	gtk may propagate some press event up to the Spice display widget, but
	a widget may take focus and grab the release event, so the guest will
	keep seeing the key pressed.

	Releasing the keys when the grab is taken solves two menu-related bugs:

	https://bugzilla.redhat.com/show_bug.cgi?id=820829
	https://bugzilla.redhat.com/show_bug.cgi?id=924577

	main: do not send monitors config if some are missing
	Spice-gtk does a bit of client-side work by optionnally delaying sending
	the monitor configuration to the guest automatically. However, the
	client may be slow to set all the monitors, so teach the timer to not
	fire the event unless at least the number of monitors set explicitely
	enabled or disabled matches the number of display channels.

	This avoid some configuration races when connecting to a multi-channel
	display server which is slow to set up.

2013-04-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: don't grab mouse when switching to server mode
	spice-gtk used to try taking the grab when switching to server mode, so
	that the current mouse interaction (for example a drag), isn't
	interrupted if the agent dies. However, shutting down a VM will
	automatically try taking the grab when there is no tablet input, and
	agent exits.

	Some users are complaining about it (especially when they don't know the
	ungrab combination).

	Instead, let's try to keep the grab only if we have currently a mouse
	button pressed.

	https://bugzilla.redhat.com/show_bug.cgi?id=873272

2013-04-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	main: do not send monitor config if monitor state didn't change
	Don't send monitor config after spice_main_set_display_enabled() if the
	monitor state didn't change.

	This solves monitor "flashing", reconfiguring in a loop:
	https://bugzilla.redhat.com/show_bug.cgi?id=952327

2013-04-24  Hans de Goede  <hdegoede@redhat.com>

	usb-redir-manager: Fix redirect_on_connect string mem leak

	usb-device-manager: Fix stray '\n'-s in g_warning calls

	usb-device-manager: Fix redirect_on_connect_rules mem-leak

	usb-device-manager: Add spice_usb_device_manager_get_devices_with_filter (fdo#63807)

	usb-device-manager: Error check spice_usb_device_manager_device_to_libdev calls
	Under Windows all calls to spice_usb_device_manager_device_to_libdev may fail,
	so error check them all.

	usb-device-manager: Avoid needless re-numeration of usb devs under Linux
	libusb_get_device_list() is not exactly a cheap call (lots of sysfs and
	usbfs accesses), so it is worth to avoid it where possible.

	This patch restores the old (pre win32 support addition) of dealing with
	libusb-devices under Linux, it keeps the device from the first lookup
	in spice_usb_device_manager_add_dev cached and uses that throughout.

	This also means that spice_usb_device_manager_device_to_libdev can no
	longer fail under Linux, so no need to error check it.

2013-04-23  Christophe Fergeau  <cfergeau@redhat.com>

	option: Allow multiple options in --disable-effects
	Commit 82c367 added checks that the value passed to --disable-effects
	is valid, but it does not take into account that it's perfectly valid
	to pass multiple values separated by commas. This commit splits
	the value passed to --disable-effects and checks each component separatey.

	Fixes rhbz#955277

	Fix setting of SPICE_{GLIB,GTK}_REQUIRES
	Because of a typo (REQUIRED vs REQUIRES), these variables only
	contained the last require that was set rather than a concatenation
	of all the needed libraries.

	Fix GNetworkAddress leak when opening spice session

2013-04-22  Yonit Halperin  <yhalperi@redhat.com>

	channel-display: trigger re-sync of audio playback latency when there are frequent video frame drops
	This was added in order to respond more quickly when the audio and video playback are
	not synchronized, and when the latency between the client and the server
	is high (i.e., when the server response to the status is delayed).

	playback: support syncing the playback latency via session

	spice-pulse: adjust the playback latency when the min-latency property changes
	If the current latency is smaller than the new min-latency
	value, we cork the playback till the target latency is achieved.

	Note: I didn't modify the prebuf configuration and used
	pa_stream_prebuf, because pulse updated the prebuf only if
	I set both prebuf and tlength to be target_latency*2. Then,
	due to the tlength growth, each time the playback latency deviated
	from the target latency, an underflow occurred. Since the latency
	that is computed by the server is not exact and is based on its
	current evaluation of the bit-rate, which is dynamic, it is better not
	to change the tlength (in order to avoid unnecessary underflows).

	channel-playback: support SPICE_MSG_PLAYBACK_LATENCY
	Add a new property for minimum playback latency. This property is
	updated with the value from SPICE_MSG_PLAYBACK_LATENCY.
	I also increased the default latency from 100ms to 200ms in order to
	be more robust to different bandwidth settings.
	The patch also updates spice-common submodule.

	channel-display: video stream quality report
	Handle MSG_STREAM_ACTIVIATE_REPORT and send MSGC_STREAM_REPORT
	periodically, or when the playback is out of sync.
	The patch also updates spice-common submodule.

	channel-playback: provide access to playback properties via the session
	Support checking whether an audio playback is active and what its latency
	is.

	spice-pulse: update the playback latency automatically when it changes

	channel-display: collect and print video stream stats
	also prints the number of underflows during a spice-pulse audio playback

2013-04-12  Christophe Fergeau  <cfergeau@redhat.com>

	Revert "build-sys: keep common submodule up to date"
	This reverts commit 5150285e1cba35570c29bd923df065d2c81f081e.

2013-04-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: enforce secure channels

	option: add --spice-secure-channels

	Add function to return Spice channel type from string

	Add function to return list of supported channels

	session: add secure-channels property

	channel: try TLS only once
	A broken server may reply to switch to TLS again and again. spice-gtk
	should only try once.

	cosmetic: fix indentation and comment

2013-04-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.19

	build-sys: bump spice-glib version
	new symbols in spice-glib, bump before release

	Update README/TODO

	spicy-ss: quit when channel error

	Rename snappy to spicy-screenshot
	Following discussion on the ML:
	http://lists.freedesktop.org/archives/spice-devel/2013-April/012953.html

	build-sys: keep common submodule up to date
	This requires git 1.8.2 to work properly. With this we should no longer
	need to update the reference, assuming the tarball is always up to
	date (that doesn't change from before, you need to update the submodule)

2013-04-10  Alex Efros  <powerman-asdf@yandex.ru>

	gnome-rr: keep user DPI
	I'm running startx -dpi 144, but after exiting from spicy's full screen mode Xorg DPI reset to 96. Attached patch fix this issue by keeping user's DPI.

	See also: https://bugs.gentoo.org/show_bug.cgi?id=448362

	https://bugs.freedesktop.org/show_bug.cgi?id=58715

2013-04-10  Tiziano Müller  <tiziano.mueller@stepping-stone.ch>

	build: fix parallel install
	This is a workaround for broken parallel install support in automake
	with LTLIBRARIES, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328

	Broken parallel install can be reproduced when building with --with-gtk=2.0
	and dies with:
	/home/teuf/redhat/spice-gtk/gtk/.libs/libspice-client-gtk-2.0.so: file not recognized: File truncated
	collect2: error: ld returned 1 exit status
	libtool: install: error: relink `SpiceClientGtk.la' with the above command before installing it
	make[5]: *** [install-pyexecLTLIBRARIES] Erreur 1
	m

2013-04-10  Christophe Fergeau  <cfergeau@redhat.com>

	Use a GHashTable for list of file transfer tasks
	This list is used to lookup tasks by their numerical id, so
	a hash table is a more appropriate data structure for this kind of
	uses.

2013-04-10  Hans de Goede  <hdegoede@redhat.com>

	spice-common: Update

2013-04-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: don't send current configuration back
	spice-gtk keep the main channel monitor configuration in sync, but
	shouldn't send back to the remote if disabled, as this may results in
	different settings, for example if the remote has switched to
	16 bits.

	main: add spice_main_update_display()
	Allow to change locally display resolution without sending it to remote,
	this is useful to keep local information without bothering the remote.

2013-04-09  Yonit Halperin  <yhalperi@redhat.com>

	channel_base: exit handle_migrate when expecting MIGRATE_DATA and receiving something else
	Previously, when an error occurred on the src server side, and we
	received other message than MIGRATE_DATA, this messages was forwarded
	to the dest server, and made it crash.

2013-04-09  Hans de Goede  <hdegoede@redhat.com>

	channel-main: Don't g_warn when not finding a file-xfer-id
	Since the agent channel can have a significant latency, it is possible
	for a cancel send from the client to the agent and a status message from
	the agent to cross each other. If this happens then the file-xfer will no
	longer be on the list.

	Printing a g_warning on this (rare but triggerable) condition will only get
	us hard to debug bug reports, so turn it into a SPICE_DEBUG.

	channel-main: Cancel active file-xfers on channel/agent disconnect

	channel-main: Check no callbacks are pending on xfer start and end
	We should never have pending callbacks when we receive a file-xfer start or
	end (success) message from the agent.

	channel-main: Don't call g_input_stream_close on a NULL stream
	If we fail to open a file, task->file_stream will be NULL, so we should
	not call g_input_stream_close on it.

	channel-main: Allow calling file_xfer_close_cb with a NULL object
	So that it can used for cleanup before we've a file_stream.

	Note this also gets rid of the weird double initialization of the local
	stream variable.

	channel-main: Don't close the file_stream if callbacks are pending
	If file_xfer_completed gets called while callbacks are pending we should
	not call g_input_stream_close_async, because:
	1) Doing so while another operation is pending on the file_stream will fail
	2) Doing so while a non file_stream callback is pending may result in the
	task being freed before the callback runs, resulting in a use after free.

	This patch fixes this by setting a pending flag when any callbacks are
	scheduled, and clearing it when it runs + checking for task->error
	from all callbacks and if that is set call file_xfer_completed again.

	channel-main: Use file_xfer_completed where appropriate

	channel-main: file_xfer_failed -> file_xfer_completed
	Make file_xfer_failed usable for all file_stream closing.

	channel-main: Make SpiceFileXferTask-s ref the channel
	So that the channel sticks around while their callbacks are completing.

	channel-main: Reset agent message receive state on agent stop
	Discard any partially received messages from the agent on agent stop.

	channel-main: Add a spice_main_channel_reset_agent helper function

	channel-main: Drop bogus xfer_id check from file_xfer_send_start_msg_async
	xfer_id > UINT32_MAX is never true since xfer_id is an uint32_t, and
	thus explicit wrapping is not necessary since it will wrap every
	UINT32_MAX + 1 itereations anyways.

	channel-main: Properly verify result in spice_main_file_copy_finish
	Call g_simple_async_result_is_valid on the passed in result to verify it is
	what we expect.

	channel-main: Call g_simple_async_result_is_valid first
	Call g_simple_async_result_is_valid before using the result.

	Revert "channel-main: Fix dangling references to freed file-xfer-tasks on agent cancel"
	The fix from commit 19313a133af0d2404b29914b5937219127ad455b is incomplete,
	this commit added code to file_xfer_close_cb, to remove any reference to
	the task being closed from the flushing queue.

	But file_xfer_flushed / file_xfer_flush_async execute file_xfer_data_flushed_cb
	from an idle handler, so it is possible that when file_xfer_close_cb runs and
	frees the task, it is not part of the flushing queue, but a
	file_xfer_data_flushed_cb with the task as user_data argument still needs to
	run, and when it will run it will refer to the now freed task.

	A related problem which is also addressed in this patchset happens when we
	receive a file-xfer-cancel from the agent when an async operation on the
	file_stream is pending, since we then cannot call g_input_stream_close_async
	on it. This is fixed in the patchset by adding a pending flag to the task
	struct, and the problem with pending flushes is solved in the same way.

	spice-widget: Fix file drag-n-drop mime-type
	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.

2013-04-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	cairo: fix reference leak
	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

2013-04-04  Uri Lublin  <uril@redhat.com>

	usb-device-manager: fix log messages to match vid:pid change
	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.address
	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:pid
	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_device
	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 function
	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 function
	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_ functions

	win-usb-dev: compare vid:pid instead of bus.addr (Windows)
	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)

2013-04-03  Hans de Goede  <hdegoede@redhat.com>

	channel-playback/record: Refuse audio-vol-msgs with 0 channels
	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

2013-04-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: do not handle win keys when the keyboard is not grabbed
	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-broken
	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

2013-03-29  Hans de Goede  <hdegoede@redhat.com>

	channel-main: Don't send empty monitor config on main_init with agent
	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.

2013-03-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	main: copy the right nth monitor config
	i is our counter for c->display[]

2013-03-27  Christophe Fergeau  <cfergeau@redhat.com>

	Keep GSocketConnection around after initial connect
	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.

2013-03-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Be less verbose about monitor config

2013-03-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: copy proxy setting
	Solve migration falling back to switch-host method when using proxy
	set through controller:

	https://bugzilla.redhat.com/show_bug.cgi?id=923894

2013-03-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk-session: remove clipboard timeout
	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 agent

	main: only notify on agent status change

2013-03-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controller: don't try to set integrity on XP x64 edition
	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

2013-03-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Notify of monitors when not using MonitorConfig
	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 started
	This ensures we have the requested resolution whenever possible.

2013-03-15  Hans de Goede  <hdegoede@redhat.com>

	spice-widget: Reconfiguring the grab is only needed on win32
	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.

	spice-widget: Fix auto-grab on window size change
	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.

	spice-widget: Ignore duplicate configure events
	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.

2013-03-11  Dunrong Huang  <riegamaths@gmail.com>

	spice-channel: Do not segfault fault if peer_msg was a NULL pointer
	$ 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.

2013-03-05  Christophe Fergeau  <cfergeau@redhat.com>

	usb: Remove device from ::devices before emitting device-removed
	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.

2013-03-04  Hans de Goede  <hdegoede@redhat.com>

	channel-main: Handle the new VD_AGENT_FILE_XFER_STATUS_SUCCESS status msg
	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.

	Update spice-common

	channel-main: Send an error to the agent on file-xfer read error
	So that the agent knows the rest of the file won't be coming.

	channel-main: Fix dangling references to freed file-xfer-tasks on agent cancel
	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.

2013-02-28  Christophe Fergeau  <cfergeau@redhat.com>

	Add fallback for g_key_file_set_uint64
	This was only added in glib 2.26

	Don't try to call _wocky_http_proxy_get_type with old gio
	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.

2013-02-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	smartcard: do not register monitor before smartcard init
	Never call vevent_get_next_vevent() before calling vcard_emul_init()

	Some mutexes are initialized in vevent_queue_init(), during emul_init()

	smartcard: trivial cleanup

	session: warn on invalid port value

2013-02-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: swap tls status during seamless migration
	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

2013-02-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	main: use stable comparison function for monitors
	If monitors are equal, compare them by their addresses, to get the
	effect of a stable sort.

	main: use glib sort
	Use glib sort for monitors. This allows to share the same
	implementation and behaviour on various platforms.

2013-02-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.18
	v0.18
	=====

	- Build fix with Gtk+ unstable.
	- MinGW build fixes with old headers
	- Fixes rhbz#908057

2013-02-12  Hans de Goede  <hdegoede@redhat.com>

	usb-device-manager: Fix coldplug race
	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.

2013-02-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: keep monitor config updated if resize-guest is disabled
	https://bugzilla.redhat.com/show_bug.cgi?id=908057

	Update spice-common

2013-02-06  Uri Lublin  <uril@redhat.com>

	mingw: spice-widget: make sure MAPVK_VK_TO_VSC is defined
	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

2013-02-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: don't use -Wstrict-prototypes with Gtk+ 2.0

	build-sys: remove GTK_DISABLE_DEPRECATED
	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-info
	spice-glib version-info should have been bumped, since we have new
	symbols.

	249dd73132a7ecc1ceb32b4fea6529491ca219d3

	Release v0.17
	v0.17
	=====

	- Update spice-common with fedora 875348, 826036 fixes
	- Multi-monitor fixes (avoid monitor order shuffling, fix mouse offset
	  if monitor 0 is not at +0+0 and let agent do monitor offset)
	- Add support for VD_AGENT_CAP_SPARSE_MONITORS_CONFIG
	- Add controller & session "proxy" properties
	- Add drag and drop file copy support to send file to guest, you will
	  need capable agent to use that feature. Adds spice_main_file_copy_async()
	- Introspection fixes
	- Build fixes

	spice-proxy: explicitely mark as internal

2013-02-06  Hans de Goede  <hdegoede@redhat.com>

	widget: Fix mouse position reporting for multiple monitors on 1 display channel
	VDAgentMouseState contains a display_id and expects coordinates in multi-mon
	mode to be relative to the origin of the monitor specified by the display_id.

	The agent will then adjust the mouse coordinates for the position of the
	monitor as configured in the guest.

	In multiple monitors on 1 display channel spice-gtk is wrongly setting
	display_id to the channel_id (which is 0 for all monitors), and is working
	around the problems this causes by doing the adjustment of the mouse position
	itself.

	But the agent is still applying the correction for the monitor position to
	all VDAgentMouseState messages it gets, and since for all monitors a display_id
	of 0 is reported it always uses the position of display 0 for the correction.

	Since the position of display 0 is usally +0+0 this usually works, but as soon
	as the position of display 0 is not +0+0, the correction will get done twice
	for display 0, and the display 0 position will wrongly get added the mouse
	position for other displays.

	This patch fixes this by properly setting display_id, and removing the
	modification of the mouse coordinates as that is already done in the agent.

2013-02-04  Natanael Copa  <ncopa@alpinelinux.org>

	build: fix for automake-1.13
	Use AC_CONFIG_HEADER instead of deprecated AM_CONFIG_HEADER.

2013-01-31  Yonit Halperin  <yhalperi@redhat.com>

	update spice-common submodule
	obtaining a fix related to palettes caching (fedora 875348, 826036)

2013-01-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controller: add proxy property

2013-01-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: clear SpiceSession:proxy also if SPICE_PROXY is NULL

	Add SpiceSession:proxy
	Add a session property to set proxy setting, since it is racy to rely
	on setenv(). Also doing so would override system environment, which
	will modify other session too sharing the same process.

2013-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	proxy: initialize proxy at session construct time

	Fix a bunch of gtkdoc/giscan warnings

	Update spice-common

	session: simplify a little bit open_host_idle_cb
	open_host->error is only set if we try to use a proxy. Let´s make that
	more clear.

2013-01-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: generate THANKS at dist time

2013-01-21  Jasper Lievisse Adriaanse  <jasper@humppa.nl>

	build-sys: Use a portable variable assignment in configure.ac

	build-sys: missing sys/types.h in gtk/channel-display.c

2013-01-18  Hans de Goede  <hdegoede@redhat.com>

	channel-main: Fix monitors_align to not shuffle monitor order
	Before this patch monitor_align was calling qsort directly on the
	VDAgentMonConfig monitors array, but VDAgentMonConfig does not contain
	an id, so the order matters!

	This fixes (for example) 2 issues with having 3 windows/monitors on a row
	numbered 1-3, ordered left-to-right as 1-2-3, and then changing the
	ordering to 1-3-2:
	1) Window 3 would be resized to the size of window 2, and window 2 would
	   get resized to the size of window 3.
	2) Dragging a window on monitor 1 over its right edge, makes the part over
	   the edge show up on the right monitor, rather then on the middle.
	This is happening because the agent is configuring qxl-1 (which is monitor 2)
	with the monitors[1] data, which after the qsort contains the size and
	coordinates of monitor 3.

	Note this only happens with virt-viewer fixed to properly send window
	coordinates, as before that all monitors had x and y set to 0 making the
	sort a nop.

	channel-main: Add support for VD_AGENT_CAP_SPARSE_MONITORS_CONFIG (rhbz#881072)

	spice-widget: update_monitor_area: Fix memory-leak on whole fallback
	When we've successfully gotten the monitors display-channel property, but
	still end up falling back to whole-display mode, we still need to free
	the monitors array.

	spice-widget: Search monitor info by display monitor-id
	As discussed indexing the display-channel's monitors property by monitor-id
	causes problems with the vdagent's new sparse monitor config support.

	Searching the monitors property by monitor-id avoids these problems.

2013-01-16  Andrew Hughes  <gnu.andrew@redhat.com>

	build-sys: fix out-of-tree build with vala

2013-01-16  Cole Robinson  <crobinso@redhat.com>

	Fix introspection for send_keys
	Without this I can't find a usable way to call this API with the
	introspected python bindings.

	https://bugs.freedesktop.org/show_bug.cgi?id=59444

2013-01-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: avoid use gtk+ 3.0 only API

2013-01-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	file-xfer: always take error if set in xfer_read_cb()

	file-xfer: use file_xfer_..() prefix for all internal copy functions

	file-xfer: move file_close_cb() above all to ease reading

	file-xfer: try to report any error from file_info_async_cb()

	file-xfer: non-programming errors should be reported in async
	It is fine to not return async errors for programming errors via
	g_return_if_fail() and friends, however, we need to return proper
	error if it's a normal run-time error.

	file-xfer: avoid g_alloca() usage when possible

2013-01-12  Dunrong Huang  <riegamaths@gmail.com>

	file-xfer: handle "drag-data-received" signal
	When user drags a file to SpiceDisplay and drops it, a signal named
	"drag-data-received" will be emitted, the signal will be received by
	SpiceDisplay, then our signal handler should receive data which contains
	file path, and call spice_main_file_copy_async() to transfer file to guest.

	file-xfer: disable file-xfer when agent is not connected

	file-xfer: handling various transfer messages in main channel
	This patch is aimed to handle various file xfer messages.

	How it works:
	0) our main channel introduces a API spice_main_file_copy_async().

	1) When user drags a file and drop to spice client, spice client will
	   catch a signal "drag-data-received", then it should call
	   spice_main_file_copy_async() for transfering file to guest.

	2) In main channel: when spice_main_file_copy_async() get called with file
	   list passed, the API will send a start message which includes file
	   and other needed information for each file. Then it will create a
	   new xfer task and insert task list for each file, and return to caller.

	3) According to the response message sent from guest, our main channel
	   decides whether send more data, or cancel this xfer task.

	4) When file transfer has finished, file xfer task will be removed from
	   task list.

2013-01-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.16
	v0.16
	=====

	- Fix crash with SSL connection (#890464)
	- Send monitor config to the agent on spice_main_set_display_enabled() (#881072)
	- Fix channel leak and wrong condition in spice_channel_flush()
	- Build fixes

	spice-channel: fix state condition check in flush()

	spice-channel: plug a channel ref leak

2013-01-09  Hans de Goede  <hdegoede@redhat.com>

	Send monitor config to the agent on spice_main_set_display_enabled (#881072)
	Currently we send an updated monitor-config to the agent whenever some
	of the display settings are changed (whenever spice_main_set_display is
	called), including when a new display is enabled, as that involves
	creating a new window, which calls spice_main_set_display. The only
	exception to this is when a display gets disabled.

	This is rather inconistent, it causes the user to be able to move windows
	in the guest to the now no longer visible monitor, and any windows which
	were already there are hidden... until something else triggers us sending
	updated monitor info. Withe gnome3 an alt-tab away and back again from a still
	open display-window is enough to trigger the update, and then the guest will
	all of a sudden become aware of the monitor no longer being there and
	re-arrange windows accordingly, on an alt-tab in the client machine ...
	not pretty.

	So lets make things consistent and also send the agent updated monitor info
	from spice_main_set_display_enabled, like we already do from
	spice_main_set_display.

2012-12-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix switching to TLS regression
	The commit fcbbc248a8f885f9a9a6e7c47d7aae0c1ab3cd1b changed the way a
	channel coroutine is exiting. In particular, it was going through the
	coroutine main cleanup (finishing in main coroutine) while switching
	to TLS is recycling the channel. That part of the code is a bit
	difficult to grasp, but with this refactoring, I think it makes it
	easier to understand the reconnection.

	Clean-up idle handler when leaving the open_host_idle()
	An explicit yield back to the channel coroutine when the idle function
	is still pending will leave it in the background, referencing objects
	that may no longer exist. Make sure we remove it when
	channel_open_host() is resumed.

2012-12-21  Christophe Fergeau  <cfergeau@redhat.com>

	mingw: Fix link errors
	Without this patch build fails with:

	  CCLD     libspice-client-glib-2.0.la
	.libs/spice-channel.o: In function `spice_channel_coroutine':
	/home/teuf/redhat/spice-gtk/gtk/spice-channel.c:2287: undefined reference to `_imp__setsockopt@20'
	.libs/channel-display.o: In function `create_compatible_dc':
	/home/teuf/redhat/spice-gtk/gtk/channel-display.c:672: undefined reference to `_imp__CreateCompatibleDC@4'
	../spice-common/common/.libs/libspice-common.a(canvas_utils.o): In function `release_data':
	/home/teuf/redhat/spice-gtk/spice-common/common/canvas_utils.c:41: undefined reference to `_imp__DeleteObject@4'
	../spice-common/common/.libs/libspice-common.a(canvas_utils.o): In function `surface_create':
	/home/teuf/redhat/spice-gtk/spice-common/common/canvas_utils.c:192: undefined reference to `_imp__CreateDIBSection@24'
	/home/teuf/redhat/spice-gtk/spice-common/common/canvas_utils.c:208: undefined reference to `_imp__DeleteObject@4'
	../spice-common/common/.libs/libspice-common.a(ssl_verify.o): In function `inet_aton':
	/home/teuf/redhat/spice-gtk/spice-common/common/ssl_verify.c:38: undefined reference to `_imp__inet_addr@4'
	../spice-common/common/.libs/libspice-common.a(ssl_verify.o): In function `verify_hostname':
	/home/teuf/redhat/spice-gtk/spice-common/common/ssl_verify.c:216: undefined reference to `_imp__inet_ntoa@4'
	collect2: error: ld returned 1 exit status

2012-12-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.15
	v0.15
	=====

	- Add HTTP Proxy support (only with glib >= 2.26)
	- Add "port" channel support, to allow arbitrary communication on top
	  of spice connection
	- usb-redir: fix migration support
	- win32: various keyboard & mouse fixes
	- Add info message when USB dialog is empty
	- Fix initial black screen on some 16bits guest
	- Various bug fixes and improvements

	build-sys: update sym-files

	session: improve open_host() clean-up
	Make sure the GSocketClient is unref when leaving the function, and
	not left around in some unfinished async state.

	session: do not unref() NULL connection
	 #3  0x00007ffff59cfb3b in g_object_unref (_object=0x0) at gobject.c:2916
	 #4  0x00007ffff6ea9c20 in socket_client_connect_ready (source_object=0x87ced0,
	     result=0x8a58f0, data=0x7fffe3fffa80) at spice-session.c:1606
	 #5  0x00007ffff5ea1278 in g_task_return_now (task=0x8a58f0) at gtask.c:1102

2012-12-20  Hans de Goede  <hdegoede@redhat.com>

	acl-helper policykit policy: Allow redir by default for console users
	This makes usb-redir a lot more userfriendly to use. This  has been
	discussed with the security team and they are ok with it, rationale:

	Since we only set <allow_active> to yes, we only give raw usb access
	to users *physically present behind the machine*. This is ok since
	they already have full control over usb devices anyways, they can
	always just unplug the device and put it in a user controlled machine.

	This follows how we already grant a great deal of access to users
	*physically present behind the machine* including dangerous things like
	/dev/sg access for cd/dvd writers. And raw usb access to all devices which
	happen to have a userspace driver rather then an in kernel driver.

	Also the opening up is limited compared to the existing opening up of
	other devices listed above in that:

	1) It will only happen on machines which have spice-glib installed
	2) We are not opening up the device nodes rights automatically, as an udev rule
	would do. So there is no chance that any random app can start (accidentally)
	poking the devices.

2012-12-19  Hans de Goede  <hdegoede@redhat.com>

	spicy: Fix compilation breaking due to a compiler warning
	This fixes:
	spicy.c:1711:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]

2012-12-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controller: fix new vala warnings
	send_msg() is done in background, use .begin

	controller.vala:62.3-62.10: warning: implicit .begin is deprecated
	foreign-menu.vala:44.3-44.10: warning: implicit .begin is deprecated
	foreign-menu.vala:59.3-59.10: warning: implicit .begin is deprecated
	foreign-menu.vala:70.3-70.10: warning: implicit .begin is deprecated
	Compilation succeeded - 4 warning(s)

	channel: switch to protocol 1 on error during link-time
	The Spice server doesn't wait until all the data are received by the
	remote before closing the socket (that would need SO_LINGER?). Under
	some racy conditions, the client may not have received the link reply
	indicating the server protocol version mismatch, which would trigger
	reconnection with compatible protocol.

	It seems to happen on local networks with Windows sockets (error
	WSAECONNRESET). To workaround that issue, spice-gtk can try to
	reconnect with protocol 1 when a socket error is encoutered during
	link-time.

	Fixes:
	https://bugzilla.redhat.com/show_bug.cgi?id=874698

2012-12-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: allow to connect via HTTP CONNECT proxy
	Allow to connect to a Spice server via a HTTP proxy with CONNECT
	method. spice-gtk will use the SPICE_PROXY environment variable, which
	can currently only have the following syntax: [http://]hostname[:port]

	This is paving the way to more proxies support (socks4/socks5).

	This code is now entirely sync (it was not even completely async), the
	following patch will make it all async again.

	Tested with Squid, locally only.

	Add SpiceProxy object
	Add a simple object to handle the SPICE_PROXY values.

	It's not clear to me whether each GIO user needs to handle the proxy
	configuration, or if there is a more global mechanism (via
	g_network_address_parse_uri())

	Also, the parsing is currently very limited and only support basic
	HTTP proxy URI. In the future, we really want to rely on GUri or
	similar instead...

	Add wocky HTTP proxy
	Courtesy of Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>

	It might make sense to include this proxy in glib/gio, but it is still
	missing some features according to its author, namely SSL and perhaps
	better CRLF.

	spice-channel: remove unnecessary g_socket_close()

	spice-channel: plug a small memory leak

2012-12-10  Uri Lublin  <uril@redhat.com>

	gtk/channel-port: include glib-compat for g_clear_pointer

	glib-compat: add g_slist_free_full

	channel-display: add more protection against bad access to streams

2012-12-07  Dunrong Huang  <riegamaths@gmail.com>

	spice-widget: Fix rendering issue with X11 backend enabled
	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

2012-12-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: rely on couroutine instead of channel state
	We can simplify the channel state callback and simplify a little
	the code by relying on coroutine state instead.

	spicy: demo SpicePort usage
	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 channel
	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()
	Add spice_channel_flush_async() that asynchronously will write all the
	pending channel data.

	update spice-common

2012-11-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: make spice_msg_out_send() slightly easier to read
	Avoid the obfuscating many -> indirection by using the
	SpiceChannelPrivate *c variable.

2012-11-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: fix rendering issue when widget is partially off screen
	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

2012-11-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	channel: learn to load certificate from memory
	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 property

2012-11-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: translate virtual-key code to scancode via MapVirtualKey
	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

2012-11-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: track current window handle
	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.

2012-11-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: clip and move cursor within window region
	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

2012-11-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: regrab when widget is reconfigured
	On Windows, we need to update the cursor clip. Call ungrab&grab to update it.

	widget: don't redraw server mouse until moved
	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.

2012-10-25  Uri Lublin  <uril@redhat.com>

	win-usb-driver: use usbclerk new message: USB_CLERK_DRIVER_SESSION_INSTALL
	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

2012-10-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controller/win32: limit access to current user only
	Based on RHEV spicec-win only code.

	controller/win32: allow ActiveX connection on untrusted website
	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

2012-10-24  Uri Lublin  <uril@redhat.com>

	spice-gtk: controller: log messages received from a controller

2012-10-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: implement disabling mouse accel
	https://bugzilla.redhat.com/show_bug.cgi?id=867885

	move mouse acceleration code in a seperate function

	Fix disabling mouse acceleration on X11
	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

2012-10-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Empty host subject from qemu should only validate hostname
	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 message
	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 channels
	https://bugzilla.redhat.com/show_bug.cgi?id=834513

2012-10-18  Hans de Goede  <hdegoede@redhat.com>

	channel-inputs: Fix sending 00 scancodes to guests with scancode cap
	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.

2012-10-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: implement sync_keyboard_lock_modifiers()
	Fix numlock numerical keypad being broken:
	https://bugzilla.redhat.com/show_bug.cgi?id=856538

	spicy: show the correct ungrab key combination
	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

2012-10-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: apply color conversion when creating image
	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

2012-10-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	win32: ignore hardware keycode 255
	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 size
	This lead to out of bound array access

	Add a warning if scancode lookup failed
	This helps tracking some send_keys() issues, such as
	https://bugzilla.gnome.org/show_bug.cgi?id=686170

	win32: fix quote key handling
	Fix keymaps to correctly handle the quote key.

	https://bugzilla.redhat.com/show_bug.cgi?id=856317

2012-10-11  Hans de Goede  <hdegoede@redhat.com>

	Add spice-usbredir-filter alias for spice-usbredir-auto-redirect-filter (v2)
	For commandline backward compatibility with older spice-gtk versions.

	Changes in v2:
	-warn about spice-usbredir-filter being deprecated when it gets used

	UsbDeviceManager: Don't warn on EINTR

	UsbDeviceManager: Hookup redirect-on-connect property

	UsbDeviceManager: Build channel list after building the device list
	This is necessary for redirect-on-connect

	UsbDeviceManager: Add a redirect-on-connect property

	Rename spice-usbredir-filter option to spice-usbredir-auto-redirect-filter
	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.

2012-10-09  Hans de Goede  <hdegoede@redhat.com>

	usb-redir: Fix read error handling depending on SpiceUsbDevice == libusb_device
	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.

2012-10-08  Hans de Goede  <hdegoede@redhat.com>

	channel-usbredir: Properly reset state from reset callback
	This is necessary to be able to use the usbredir channel after a
	non seamless migration.

	Set channel state before calling channel_reset
	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.

2012-10-03  Christophe Fergeau  <cfergeau@redhat.com>

	Update spice-glib-sym-file for new symbol

2012-10-01  Christophe Fergeau  <cfergeau@redhat.com>

	usb: Add info message when USB dialog is empty
	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;

2012-09-25  Hans de Goede  <hdegoede@redhat.com>

	Deal with libusbredirparser.pc rename to libusbredirparser-0.5.pc
	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.

2012-09-25  Marc-André Lureau  <marcandre.lureau@gmail.com>

	G_GNUC_DEPRECATED_FOR must be defined publicly
	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.

2012-09-24  Dunrong Huang  <riegamaths@gmail.com>

	spicy: Make "CopyToGuest" and "PasteFromGuest" insensitive if spice agent is not connected
	"CopyToGuest" and "CopyToGuest" can not work if spice agent is not
	connected, e.g. guest does not install or enable spice agent, or spice
	server does not create vdagent channel.

	In these cases, make those item insensitive.

2012-09-21  Christophe Fergeau  <cfergeau@redhat.com>

	Update spice-common submodule

	Update git.mk to latest version

2012-09-20  Christophe Fergeau  <cfergeau@redhat.com>

	Update NEWS

	Unescape SpiceSession::uri component by component
	Unescaping the whole URI and then parsing it is dangerous as
	the unescaping may (for example) add some extra '/' in the URI
	which are not part of a path. It's better to do the unescaping later
	once the URI has been split in separate components.
	This commit unescapes the path, host and query values. Handling escaped
	query values is important for usernames/passwords which might contain
	chars which are invalid in URIs.
	If the host is enclosed in [], it's intentionally not escaped as this
	contains an ipv6 URI, and may contain a %zone_id (see RFC4007). This is
	consistent with libvirt/libxml2 behaviour, not with what gvfs does.

2012-09-14  Colin Walters  <walters@verbum.org>

	usb-acl-helper: Clear environment
	Otherwise we can be subject to attack via environment variables such
	as DBUS_SYSTEM_BUS_ADDRESS.
	This addresses CVE-2012-4425 http://seclists.org/oss-sec/2012/q3/470

2012-09-13  Christophe Fergeau  <cfergeau@redhat.com>

	cursor: don't access unitialized data when logging
	SpiceCursor::header is only valid when SPICE_CURSOR_FLAGS_NONE is
	not set in SpiceCursor::flags, so don't try to log info about
	the header before we have tested this flag.

2012-09-12  Christophe Fergeau  <cfergeau@redhat.com>

	channel: Introduce CHANNEL_DEBUG for channel debug logs
	It automatically prepends the channel name to the log message
	for easier debugging.

	Fixes rhbz#822437

2012-09-10  Christophe Fergeau  <cfergeau@redhat.com>

	build-sys: Fix symbol versioning
	My changes in bug 5bf72a2e had a typo which broke symbol versioning
	of libspice-client-gtk.so when -Wl,--version-script is available...

	Update spice-common submodule
	We need a newer spice-protocol to get the definitions for A8 surfaces.
	Without it, compilation is broken.

	Fix VD_AGENT_HAS_CAPABILITY use
	The 'size' argument to this macro (defined in
	spice-protocol/spice/vd_agent.h) is the number of 32 bit elements
	available in its first argument. In channel-main.c it's used
	most of the time with SpiceMainChannelPrivate::agent_caps which is
	an uint32_t[VD_AGENT_CAPS_SIZE]. The 'size' argument to pass to
	VD_AGENT_HAS_CAPABILITY is thus the number of elements in this array,
	and not sizeof(agent_caps).

	Fixes rhbz#837545

2012-09-07  Søren Sandmann Pedersen  <ssp@redhat.com>

	Advertise SPICE_DISPLAY_CAP_A8_SURFACE

2012-09-06  Christophe Fergeau  <cfergeau@redhat.com>

	build: Add fallback symbol files to EXTRA_DIST

2012-09-05  Uri Lublin  <uril@redhat.com>

	spicy: add --title=<title> command line option

	Revert "spice-common removed"
	This reverts commit 519f118c7786aa0c16cd2a5f216b52cea4ac42d5.

	spice-common removed

2012-09-03  Alexander Larsson  <alexl@redhat.com>

	Fix region leak in gtk2 compat defines
	https://bugs.freedesktop.org/show_bug.cgi?id=54277

2012-09-02  Søren Sandmann Pedersen  <ssp@redhat.com>

	Advertise SPICE_DISPLAY_CAP_COMPOSITE

	Add support for Composite command
	All the real work is done in spice-common, so this is a pretty simple
	change.

	Conflicts:
		spice-common

2012-08-31  Alexander Larsson  <alexl@redhat.com>

	Make region code build with gtk2
	https://bugs.freedesktop.org/show_bug.cgi?id=54277

2012-08-31  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix X11 backend
	The X11 backend allocates the "image" with X11 and needs the widget to
	be realized before calling spicex_image_create().

	https://bugs.freedesktop.org/show_bug.cgi?id=54310

	Update SpiceDisplay:only-downscale documentation

2012-08-31  Alexander Larsson  <alexl@redhat.com>

	Fix flickering regression on some systems
	For some reason the way we remove the "inner" area
	when clearing the background doesn't work on one computer.
	I don't really know why, but the current approach does seems a
	little fragile.

	This replaces it with a solid region operation that works on
	all my machines.

	https://bugs.freedesktop.org/show_bug.cgi?id=54277

2012-08-30  Alexander Larsson  <alexl@redhat.com>

	Add only_downscale property
	When this is enabled we never scale displays larger
	than their actual size.

	https://bugs.freedesktop.org/show_bug.cgi?id=54277

	Centralize scaling handling
	This moves all the handling of scaling calculations and
	positioning of the display inside the widget into one place.

	This makes it easier to later change how scaling works.

	Also, the new scaling only support aspect-ratio-keeping
	scaling.

	https://bugs.freedesktop.org/show_bug.cgi?id=54277

2012-08-30  Christophe Fergeau  <cfergeau@redhat.com>

	Move AM_PROG_AR before LT_INIT call
	The other way round generates warnings:
	configure.ac:14: warning: LT_INIT was called before AM_PROG_AR
	aclocal.m4:1015: AM_PROG_AR is expanded from...

2012-08-29  Alon Levy  <alevy@redhat.com>

	support automate >= 1.12 with new required AM_PROG_AR

2012-08-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update spice-common

2012-08-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	glib-compat: add G_GNUC_DEPRECATED_FOR
	G_GNUC_DEPRECATED_FOR was introduced in glib 2.26

	misc build fix when --disable-smartcard

	widget: differentiate key press & release from press only events
	Until now, Spice clients only sent separate key events for press and
	release. But this may result in unwanted key repetition from guest VM
	side. It seems OSes have various implementations. While MS Windows
	relies on hardware key repeats (which are several sequential press
	events), otoh, X11 uses software key repeat (although not Linux
	keyboard/VT by default).

	We can't easily disable guest side repeaters, as it may be enforced by
	other components (a X11 client can adjust each key individually, or
	the desktop settings may change it etc.). Neither can we rely only on
	guest software repeater as Windows doesn't seem to have one by
	default, so we need to keep sending multiple press events as of today.

	It seems a nice way to improve the situation is to send a single
	"press&release" key event when the user released the key within a
	short delay. If the key is pressed for longer, we keep the existing
	behaviour which has been working pretty well so far, sending separate
	"press", then repeatedly "press", and an ending "release" event.

	v2:
	- fix some commit message spelling spotted by Alon & Christophe
	- simplify a bit the timer handling code after Hans review
	- remove the submodule change (will be updated in earler patch once
	  pushed upstream)

	widget: add keypress-delay property
	The delay before the press event is sent to the server if the key is
	kept pressed. If the key is released within that time, that delay is
	ignored and a single key-press-release event will be sent.

	widget: give more context to send_key()
	- use a more explicit SendKeyType enum
	- if the key is a modifier key, we don't want to delay press event

	v2: fix compilation (remove down usage)

	inputs: add spice_inputs_key_press_and_release()
	If the server is capable of SPICE_INPUTS_CAP_SCANCODE, then we send
	can send a single message with key press and release, to avoid
	unwanted guest side key repeatition due to network jitter.

	If the server is not capable, spice-gtk will use some compatibility
	mode and send the existing DOWN and UP key events seperately.

	util-priv: factor out spice_make_scancode()
	Factor out the keyboard scancode manipulation function, to be reusable
	by newer code.

	Update spice-common

2012-08-28  Yonit Halperin  <yhalperi@redhat.com>

	channel-smartcard: do not attach temporary migration channel to smartcard
	During migration, the smartcard channel that belongs to the temporary
	copied session shouldn't be active.

	migration: copy enable-smartcard/audio/usbredir state to the migrated session
	Otherwise, we will not create smartcard/usb channel on the destination
	side, and we will create audio channels, no matter if they existed
	of didn't exist for the src side.

	seamless migration: don't reset messages data when swapping channels
	When swapping the src and dest channels's, we need to keep
	the xmit_queue and msg serials. Their state is expected to stay the same
	after migration.

	seamless migration: transfer pending msgs to the destination, instead of sending them to the src before FLUSH_MARK
	In order to save migration time, and probably also decrease migration
	data size, we push the flush mark to the src server before any other
	message. All the other pending msgs will be sent later to the
	destination server (see next patch).

	seamless migration: src and dest servers handshake
	Flow:
	(1) *src* main channel coroutine (main_handle_migrate_begin_seamless):
	    handles SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS; yields to the main loop,
	    supplying it the destination information needed for connection.
	(2) main context (migrate_connect):
	    Establishes a new session for connecting to the destination.
	    After all the channels are opened (async), their state, except for
	    the one of the main channel, is modified to
	    SPICE_CHANNEL_STATE_MIGRATING (see migrate_channel_event_cb);
	    no reading is done from the channel during this state.
	    The dest main channel's state is changed to SPICE_CHANNEL_STATE_MIGRATION_HANDSHAKE

	(3) *dest* main channel coroutine: sends to the dest server SPICE_MSGC_MAIN_MIGRATE_DST_DO_SEAMLESS
	    (see spice_channel_recv_auth)
	(4) *dest* main channel coroutine: recevices SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_ACK/NACK.
	     adds main_migrate_handshake_done to the main loop.
	(5) main context: when all the dest session channels are connected, and the main channel handshake
	    is done, we yield to the src main channel coroutine (see
	    migrate_channel_event_cb and main_migrate_handshake_done)
	(6) *src* main channel coroutine: sends to the src server
	    SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECTED_SEAMLESS|CONNECT_ERROR)

	For more details see spice-protocol. commit
	1ad5d259cb4b695ec3106de7ccd082e031e7ae11

	seamless-migration: update spice-common submodule
	Update channel-main as well to support the change made to
	SpiceMsgMainMigrationBegin: it now holds all the destination fields
	inside SpiceMigrationDstInfo.

	channel_main: handle SPICE_MSG_AGENT_CONNECTED_TOKENS

	channel-base: remove bad check of SpiceMsgWaitForChannels validity
	SpiceMsgWaitForChannels is not packed. Comparing the original
	msg size to SpiceMsgWaitForChannels is wrong.

2012-08-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update spice-common

	Release v0.13

2012-08-26  Dunrong Huang  <riegamaths@gmail.com>

	spicy: connect from cli only if hostname and port are provided
	This patch will fix following error:
	$ spicy --spice-debug
	......
	(spicy:21981): GSpice-DEBUG: spice-session.c:1618 new main channel, switching
	(spicy:21981): GSpice-DEBUG: spice-gtk-session.c:811 Changing main channel from (nil) to 0x8534b0
	(spicy:21981): GSpice-DEBUG: spicy.c:1587 new channel (#0)
	(spicy:21981): GSpice-DEBUG: spicy.c:1590 new main channel
	(spicy:21981): GSpice-DEBUG: spice-channel.c:2255 Open coroutine starting 0x8534b0
	(spicy:21981): GSpice-DEBUG: spice-channel.c:2098 Started background coroutine 0x853538 for main-1:0
	(spicy:21981): GSpice-DEBUG: spice-channel.c:2122 connection failed, trying with TLS port
	(spicy:21981): GSpice-DEBUG: spice-channel.c:2126 Connect error
	GSpice-Message: main channel: failed to connect
	......

	When user starts spicy without any command-line arguments, spicy
	should not attempt to connected to server automatically because
	hostname or port are unknown at the moment.

	What this patch changes is to show the dialog window instead of
	connecting to server automatically if no hostname or port are found.

2012-08-10  Christophe Fergeau  <cfergeau@redhat.com>

	Check --spice-disable-effects parameter validity
	When --spice-disable-effects is used, error out unless this is
	the name of one of the effects we can disable.

	Fixes rhbz#818848

	Check --spice-color-depth parameter validity
	When --spice-color-depth is used, error out unless the color depth
	is 16 or 32.

	Fixes rhbz#818847

2012-08-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update spice-common

2012-08-08  Christophe Fergeau  <cfergeau@redhat.com>

	build: make spice-controller.pc installation conditional
	It shouldn't be installed when controller support is disabled.

	build: generate sym-file
	When -Wl,--version-script is not available, we fallback to using
	libtool --export-symbols feature, but the needed sym-file is missing
	from git. This commit adds generation of the sym-file to the
	update-map-file Makefile target, and adds a sym-file to git.
	The linker on OSX Lion doesn't like to have non-existing symbols
	specified in the symbol files it's given, so the symbols need to
	be split in glib symbols and gtk symbols.

2012-08-07  Christophe Fergeau  <cfergeau@redhat.com>

	build: add --enable-smartcard=auto support
	Currently, when running configure with no arguments, smartcard
	support is enabled by default, and configure will fail if it cannot
	find libcacard. This commit adds a --enable-smartcard=auto mode to
	configure which will use automatically enable smartcard support if
	libcacard is available, but it will be silently disabled if libcacard
	is not available. Passing --enable-smartcard will fail if libcacard
	is not available. Passing --disable-smartcard will always disable
	smartcard support and will not test for libcacard availability.

	build: make controller build optional
	Apart from the Vala bindings, this is the only part of spice-gtk
	which requires Vala to be built from git. Since it's only useful
	when spice-gtk is used in conjunction with an oVirt browser plugin,
	letting people disabling it will not necessarily cause issues.

2012-08-05  Matthias Clasen  <mclasen@redhat.com>

	Don't use GDK_THREADS_ENTER/LEAVE
	These macros have been deprecated. The quick fix for now is to just use the
	functions gdk_threads_enter/leave instead. They are deprecated as well, but
	deprecated functions don't cause the build to fail (unless you use -Werror).

2012-07-30  Hans de Goede  <hdegoede@redhat.com>

	Remove "usbredirhost: " prefix from usbredirhost error messages
	libusbredirhost prefixes all its messages with "usbredirhhost: ", which
	is useful when logging to stderr, but not so much when showing the error
	to the user in an error dialog, so remove the "usbredirhost: " prefix
	when we store the message in a GError.

2012-07-28  Hans de Goede  <hdegoede@redhat.com>

	channel-display: Set monitors_max to 1 on init
	This fixes remote-viewer with the new multi monitor support not working
	when connecting to a spice-server without the new multi-monitor support.

	Before this fix remote-viewer would hit the following g_return_if_fail:
	(remote-viewer:24787): remote-viewer-CRITICAL **:
	 virt_viewer_session_spice_display_monitors:
	  assertion `monitors->len <= monitors_max' failed

	spice-widget: release mouse grab on keyboard-grab-inhibit
	The purpose of the keyboard-grab-inihbit mechanism is to allow other apps
	to grab the input while the spice-widget has the focus, mainly when we're
	going to invoke policykit for usb-redirection, as that the policy-kit
	agent may want to grab the input.

	Before this patch we were only inhibitting the keyboard grab, which works fine
	for vms which are in client mouse mode, but is not enough for vms which are
	in server mouse mode.

	This patch also releases the mouse grab on keyboard-grab-inhibit, fixing
	the policykit dialog not showing (and thus usb redir not working) when
	running with server mouse mode. Note that this makes the inhibit-keyboard-grab
	name of the property no longer really cover what it does, but allas it is
	part of our ABI...

2012-07-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Run-time check monitor per display count <= 256
	Limit range of monitors, to avoid potential crashes lead by invalid
	received MonitorConfig values (could be misconfigured or misbehaving
	guest)

	This is a a client-side implementation limitation. Eventually, the
	range could be inscreased (or unlimited == 0) in the future...

2012-07-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Enable the display early when the widget is created
	The  spice_main_set_display_enabled() function  is  used  to mark  the
	display/monitor  config  as  enabled.  In  order  to  simplify  client
	implementation, the widget enables  the matching display automatically
	when the channel mark is received. This is only for legacy reason, and
	my lack  of understanding at  that time. It  could as well  be enabled
	earlier, when the widget is created.  It wasn't really a good decision
	to disable monitor when the mark is off, which can be toggled when the
	primary surface is resize for example, and can cause some races..

	Add SpiceDisplay:ready property
	There are several condition to meet in order to have a widget ready to
	be displayed: the monitor must exist, the area must intersect, and the
	display mark must be reached. This  property will help clients to know
	when the  widget display is  ready. Until now,  it was relying  on the
	channel  mark signal  only,  and had  to  deal with  the  rest of  the
	conditions without much help.

	Handle MonitorsConfig::max_allowed

	main: send monitor config immediately
	The only way this can be called currently is via the main/system
	coroutine. Remove display timer if any.

	Implement simple monitors alignment

	widget: use display monitors configuration
	Use display::monitors property to manage display area. Call
	update_area_monitor() to update the widget area depending on monitor
	configuration

	spicy: disable display when deleting window

	spicy: learn to deal with monitors

	Make-up a MonitorConfig if the server doesn't provide one
	This allows easier compatibility for clients that don't have to
	check and interact differently depending on channel capabilities.

	Handle SPICE_MSG_DISPLAY_MONITORS_CONFIG

	Don't attempt to draw an invalid area
	If we don't intersect, the area is invalid or of size 0.

	Use monitor_id to compute display_id

	Document spice_main_send_monitor_config()

	widget: don't forget to disconnect all signals handlers
	We forgot about display-mark. Use spice_g_signal_connect_object()
	helper, which will disconnect properly in all circunstances.

	spice_channel_connect() success if state >= CONNECTING
	We may have several widget trying to re-connect the channels now.
	It is fine to return successfully if we are already connecting or
	connected.

	widget: add monitor property with ctor

	Claim SPICE_DISPLAY_CAP_MONITORS_CONFIG

	Add spice_display_get_primary()

	display: add readonly monitors property

	glib-compat: add g_clear_pointer
	A helpful macro from glib 2.34

	Change surface_id to a guint32
	That's the correct type used by the protocol.

	widget: add main channel before other channels
	Make sure that the d->main channel member can be referenced when
	adding further channels, when we perform their setup.

	Add missing agent cap description

	display: learn to restrict display to an area
	Each spice widget can now restrict the area of the primary
	surface they show and interact with by setting the private
	area member.

	A nice clean-up would be to seperate an area object that
	would deal with clipping, input translation and color
	conversion, but the resulting code would be similar anyway

	widget: simplify redraw call

	Update spice-common

2012-07-16  Uri Lublin  <uril@redhat.com>

	usb-device-manager: mingw: connect: cleanup device if it's libdev is missing
	For Windows client, when connecting a device to the guest, if a libusb
	device (libdev) does not exist, cleanup and forget about that device.

	Most likely, the device was plugged out at driver installation
	time, and its remove-device event was ignored.

2012-07-12  Yonit Halperin  <yhalperi@redhat.com>

	migration/channel-inputs: reset motion count after migration
	The motion count must stay synchronized with the server, otherwise,
	it is possible that we will stop sending motion events to the server
	after migration.

	rhbz#835997

2012-07-11  Uri Lublin  <uril@redhat.com>

	usb-device-manager: do not try to connect a usb device that was removed
	If a device that is asked to be shared with the guest, is unplugged out
	of the machine before being redirected, then let the user know that
	usbredir of that device failed (and cleanup nicely).

	For Windows client, the time between request and redir is larger, as
	it includes the time it takes to install the libusb driver.

2012-07-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	usbutil: be more explicit about usbids_vendor_count usage
	I introduced a regression in the previous patch, counting the
	usbids_vendor_count from -1 if the previous attempt failed.

	usbutil: fix crash on windows
	vendor_count is the last access index, the actually count is +1.

	On Windows, it crashes later on because of corrupted memory.

	Thanks to valgrind for this precious help:

	==4535== Invalid write of size 2
	==4535==    at 0x40197E: spice_usbutil_parse_usbids (usbutil.c:170)
	==4535==    by 0x401CEC: spice_usbutil_load_usbids (usbutil.c:241)
	==4535==    by 0x4020C6: main (usbutil.c:322)
	==4535==  Address 0x56b740c is 12 bytes after a block of size 348,160 alloc'd
	==4535==    at 0x4A0884D: malloc (vg_replace_malloc.c:263)
	==4535==    by 0x4EAAEBE: g_malloc (gmem.c:159)
	==4535==    by 0x401847: spice_usbutil_parse_usbids (usbutil.c:156)
	==4535==    by 0x401CEC: spice_usbutil_load_usbids (usbutil.c:241)
	==4535==    by 0x4020C6: main (usbutil.c:322)
	==4535==

	usbutil: look up usb.ids under g_get_system_data_dirs() by default
	Simplify a little bit the portability by looking up usb.ids file
	under g_get_system_data_dirs(). This is how most resources are
	found under other OS, looking up files under various places, since
	installation location may vary.

2012-07-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix make distcheck

2012-07-10  Uri Lublin  <uril@redhat.com>

	usb-device-manager: mingw: win driver install callback: add missing ifdef
	This fixes the following compilation error message (without USE_USBREDIR):

	usb-device-manager.c:183:13: error: 'spice_usb_device_manager_drv_install_cb' declared 'static' but never defined [-Werror=unused-function]

	win-usb-driver-install: initialize "req" with memset
	This fixes the following compilation error message:

	../../gtk/win-usb-driver-install.c: In function 'spice_win_usb_driver_send_request':
	../../gtk/win-usb-driver-install.c:187:5: error: missing braces around initializer [-Werror=missing-braces]
	../../gtk/win-usb-driver-install.c:187:5: error: (near initialization for 'req.hdr') [-Werror=missing-braces]

	usb-device-manager: mingw: ignore "remove" udev event when un/installing a driver

	usb-device-manager: mingw: keep driver install/uninstall state of a device
	Currently only driver install/unsinstall is of interest, such that
	extra udev events can be ignored.

	usb-device-manager: add 'state' field to SpiceUsbDeviceInfo
	To be used on Win32 to ignore extra udev events
	received during driver install/uninstall.

	Win32/mingw: win-usb-dev: skip hubs
	also skip devices with bad (0) device-address.

	Win32/mingw: usb-device-manager: uninstall win usb driver upon device disconnect

	win-usb-driver-install: add capability to remove (uninstall) a win usb driver

	Windows mingw: usb: Dynamically install a libusb driver for USB devices
	- Added win-usb-driver-install.[ch]
	- Added win-usb-clerk.h

	Operation (on Windows, spice-gtk point of view):
	- After some sanity checks, just before redir'ing a USB device
	  a libusb driver needs to be installed (before libusb can open the device)
	- A connection (NamedPipe) is established with usb-clerk, a libusb
	  driver installation service, and a request for driver installation
	  is sent.
	- Installation status is asynchronously read from the pipe, and
	  spice_usb_drv_install_finished() is called.
	- Upon a successful intallation, usbredir continues.

	Linux operation is not changed.

2012-07-10  Arnon Gilboa  <agilboa@redhat.com>

	Windows mingw: usb: implement GUdevDevice & GUdevClient for windows
	- Added win-usb-dev.[ch]
	- Added GUdevDevice and GUdevClient like classes
	- Added uevent signal based on WM_DEVICECHANGE

2012-07-10  Uri Lublin  <uril@redhat.com>

	Make SpiceUsbDevice a box for SpiceUsbDeviceInfo, instead of a box for libusb_device
	Note that this change may affect performance a bit, as sometimes there is
	a need to find the libusb_device or the SpiceUsbDevice. Likely it's negligible.

	Introduce SpiceUsbDeviceInfo to be kept instead of a libusb_device
	For Windows, it's better not to keep references for libusb_devices
	that are not used.
	So instead of makeing SpiceUsbDevice a box for a libusb_device
	it is going to be a box for a SpiceUsbDeviceInfo.

	Windows mingw: usb: configure.ac: do not require GUDEV for USBREDIR
	For windows GUDEV is not required
	For Linux GUDEV is checked as a part of USBREDIR block, but
	as a separate check.

	usb-device-manager: mingw: add_dev: ignore already known devices
	Sometimes on a Windows client, udev events are received while
	the driver is being un/installed. so just ignore it

	usb-device-manager: add a helper function to find a usb device <bus, addr>
	And use it in spice_usb_device_manager_remove_dev

	spice_usb_device_get_description: use device-descriptor only to get <vid,pid>
	In preparation for a different SpiceUsbDevice.

	With the new SpiceUsbDeviceInfo, <vid,pid> will be provided by
	SpiceUsbDevice, and not by the device_descriptor (from libusb)

	spice_usb_device_manager_device_error: replace SpiceUsbDevice with libusb_device
	Its only user is channel-usbredir, which needs the libusb_device.

	In preparations for a different SpiceUsbDevice.

	spice_usb_device_manager_auto_connect_cb: use type SpiceUsbDevice for "device"
	Currently SpiceUsbDevice is a BOX for libusb_device.
	In preparation for a different SpiceUsbDevice.

	spice_usb_device_manager_add_dev: use type SpiceUsbDevice for "device"
	Currently SpiceUsbDevice is a BOX for libusb_device.
	In preparation for a different SpiceUsbDevice.

	Renamed the libusb_device variable to libdev. Needed when
	asking usbredir to check the filter.

	spice_usb_device_manager_add_dev: check auto_ok before freeing libusb device list
	In preparation for a different SpiceUsbDevice.

	spice_usb_device_manager_remove_dev: use type SpiceUsbDevice for "device"
	Currently SpiceUsbDevice is a BOX for libusb_device.
	In preparation for a different SpiceUsbDevice.

	controller/test.c: mingw: fix compiler bad param warning for ReadFile
	It seems that ssize_t is int, while DWORD is long

	Compiler warning (some whitespaces where added for readability):
	  ../../../gtk/controller/test.c: In function 'read_from_pipe':
	  ../../../gtk/controller/test.c:108:5: warning: passing argument 4 \
	       of 'ReadFile' from incompatible pointer type [enabled by default]
	  In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:70:0,
	                   from ../../../gtk/controller/test.c:27:
	  /usr/i686-w64-mingw32/sys-root/mingw/include/winbase.h:1426:29: note: expected \
	       'LPDWORD' but argument is of type 'ssize_t *'

	usb-device-manager: warn if a device to remove was not found
	Also changed a bit the warning text on device-add to differentiate the two.

	spicy: more informative presentation of usb devices in menu
	Using the default format.

2012-07-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controller: async flush read/write
	Windows namedpipes behave a bit differently from Unix socket, and may
	return incomplete read/write. By using 2 read/write() helpers, try to
	complete the operation before returning. Since the IO operation may be
	splitted over several call, we make sure the buffer pointer is on the
	heap. We use exception for EOF or BROKEN_PIPE condition, which also
	simplifies the code.

	To really work with namedpipe, the giowin32streams need to be fixed as
	well to handle concurrent read & write properly, see for details:
	https://bugzilla.gnome.org/show_bug.cgi?id=679288

	Remove mandatory generation of vala debug C
	Use make VALAFLAGS=-g if you need it instead

2012-07-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix mingw build
	printf is redefined by glib/gi18n.h

	In file included from ../spice-common/common/spice_common.h:29:0,
	                 from ../spice-common/common/ring.h:23,
	                 from spice-channel-cache.h:23,
	                 from spice-session-priv.h:26,
	                 from desktop-integration.c:29:
	../spice-common/common/log.h:49:17: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]
	../spice-common/common/log.h:56:16: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]
	In file included from ../spice-common/common/canvas_base.h:25:0,
	                 from decode.h:23,
	                 from spice-session-priv.h:27,
	                 from desktop-integration.c:29:
	../spice-common/common/lz.h:22:5: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]
	../spice-common/common/lz.h:23:5: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]
	../spice-common/common/lz.h:24:5: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]

	unused variable 'self' if !USE_USB
	CC     spice-widget-enums.lo
	desktop-integration.c: In function 'spice_desktop_integration_dispose':
	desktop-integration.c:175:30: error: unused variable 'self'
	[-Werror=unused-variable]

2012-07-06  Hans de Goede  <hdegoede@redhat.com>

	spice-widget: Don't change usbredir/automount settings while redirecting
	The keyboard focus may change while usb-device-manager is in the process of
	redirecting a usb-device (as this may show a policykit dialog). Making
	autoredir/automount setting changes while this is happening is not a good idea!

	Since usb-device-manager already sets keyboard_grab_inhibit when it is
	redirecting to allow the policykit dialog to show, we can use that to
	inhibit usb-autoredir setting changes.

	spice-gtk-session: hookup automount inhibiting
	Inhibit automounting when usb-autoredirection is active.

	Add a desktop-integration helper class
	We need to integrate closely with the desktop environment of the user in
	several cases. Some examples are disabling auto-mounting when auto-usbredir
	is active (rhbz#812972), and disabling the screensaver when fullscreen
	(fdo#34793).

	Unfortuntely these kinds of things require desktop environment specific
	handling. Therefor this patch introduces a desktop-integration helper class,
	which is to server as a container for all sort of desktop environment specific
	functions.

	For now it just supports disabling automounting under Gnome, but this will be
	extended in the future.

2012-06-28  Yonit Halperin  <yhalperi@redhat.com>

	agent: fix mishandling of SPICE_MSG_MAIN_AGENT_TOKEN
	Add the given tokens instead of overriding the existing ones.

2012-06-26  Hans de Goede  <hdegoede@redhat.com>

	spice-gtk-session: rename update_keyboard_focus to request_auto_usbredir
	To better reflect what then function does, also rename the tracking variable
	inside spice-gtk-session to match.

	spice-gtk-session: Fix keyboard focus tracking
	This patch changes the "do we have focus?" tracking, to keeping a counter with
	how many widgets have focus. The reason for this is that sometimes multiple
	spice-widgets can have focus at the same time, yes really! Sometimes (rarely,
	hard to reproduce) the focus in event for one window arrives before the
	focus out of the other window.

	spice-gtk-session: Only update usb "auto-connect" when doing "auto-usb-redir"
	Only update the UsbDeviceManager's "auto-connect" property when
	"auto-usb-redir" is set, otherwise leave it as is. This allows apps to
	control UsbDeviceManager's "auto-connect" directly, without it getting reset
	on every keyboard focus change.

2012-06-24  Uri Lublin  <uril@redhat.com>

	Move "err" variable definition to beginning of the function
	This fixes the following compilation error:
	channel-usbredir.c: In function 'spice_usbredir_channel_connect_device_async':
	channel-usbredir.c:313:9: error: jump skips variable initialization [-Werror=jump-misses-init]

2012-06-13  Christophe Fergeau  <cfergeau@redhat.com>

	Fix build when usbredir is disabled
	I broke it with my leak fixes

	Fix various memory leaks
	==25063== 12,827 (2,032 direct, 10,795 indirect) bytes in 127 blocks are definitely lost in loss record 9,477 of 9,502
	==25063==    at 0x4A0884D: malloc (vg_replace_malloc.c:263)
	==25063==    by 0x3DE384D2BE: g_malloc (gmem.c:159)
	==25063==    by 0x3DE38616B1: g_slice_alloc (gslice.c:1003)
	==25063==    by 0x3DE38346B0: g_error_new_valist (gerror.c:393)
	==25063==    by 0x3DE3834A8C: g_set_error (gerror.c:560)
	==25063==    by 0x3DE4871108: g_socket_receive_with_blocking (gsocket.c:2513)
	==25063==    by 0x5B708E8: bio_gsocket_bread (bio-gsocket.c:56)
	==25063==    by 0x61AEBD8: BIO_read (bio_lib.c:212)
	==25063==    by 0x5ECAC5B: ssl3_read_n (s3_pkt.c:238)
	==25063==    by 0x5ECBD3D: ssl3_read_bytes (s3_pkt.c:318)
	==25063==    by 0x5ECD6CF: ssl3_get_message (s3_both.c:426)
	==25063==    by 0x5EC5AFB: ssl3_get_new_session_ticket (s3_clnt.c:1822)

	==25063== 90 bytes in 3 blocks are definitely lost in loss record 7,354 of 9,502
	==25063==    at 0x4A0884D: malloc (vg_replace_malloc.c:263)
	==25063==    by 0x3DE384D2BE: g_malloc (gmem.c:159)
	==25063==    by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356)
	==25063==    by 0x5B961B5: spice_usb_device_manager_set_property (usb-device-manager.c:306)
	==25063==    by 0x3DE40148FB: g_object_constructor (gobject.c:1352)
	==25063==    by 0x3DE4015D70: g_object_newv (gobject.c:1713)
	==25063==    by 0x3DE401655F: g_object_new_valist (gobject.c:1830)
	==25063==    by 0x3DE485924D: g_initable_new_valist (ginitable.c:224)
	==25063==    by 0x3DE4859348: g_initable_new (ginitable.c:148)
	==25063==    by 0x5B97330: spice_usb_device_manager_get (usb-device-manager.c:770)
	==25063==    by 0x52D8C6B: spice_gtk_session_update_keyboard_focus (spice-gtk-session.c:845)
	==25063==    by 0x52D6DC1: spice_gtk_session_set_property (spice-gtk-session.c:238)

	==25063== 120 bytes in 3 blocks are definitely lost in loss record 8,448 of 9,502
	==25063==    at 0x4A06F18: calloc (vg_replace_malloc.c:566)
	==25063==    by 0x68BB2E5: usbredirfilter_string_to_rules (usbredirfilter.c:54)
	==25063==    by 0x5B96123: spice_usb_device_manager_set_property (usb-device-manager.c:293)
	==25063==    by 0x3DE40148FB: g_object_constructor (gobject.c:1352)
	==25063==    by 0x3DE4015D70: g_object_newv (gobject.c:1713)
	==25063==    by 0x3DE401655F: g_object_new_valist (gobject.c:1830)
	==25063==    by 0x3DE485924D: g_initable_new_valist (ginitable.c:224)
	==25063==    by 0x3DE4859348: g_initable_new (ginitable.c:148)
	==25063==    by 0x5B97330: spice_usb_device_manager_get (usb-device-manager.c:770)
	==25063==    by 0x52D8C6B: spice_gtk_session_update_keyboard_focus (spice-gtk-session.c:845)
	==25063==    by 0x52D6DC1: spice_gtk_session_set_property (spice-gtk-session.c:238)
	==25063==    by 0x3DE40148FB: g_object_constructor (gobject.c:1352)

	==25063== 11,959 (72 direct, 11,887 indirect) bytes in 1 blocks are definitely lost in loss record 9,475 of 9,502
	==25063==    at 0x4A06F18: calloc (vg_replace_malloc.c:566)
	==25063==    by 0x3459C92DDC: XkbGetKeyboardByName (XKBGetByName.c:59)
	==25063==    by 0x52DF000: vnc_display_keymap_gdk2xtkbd_table (vncdisplaykeymap.c:153)
	==25063==    by 0x52D9FA6: spice_display_init (spice-widget.c:389)
	==25063==    by 0x3DE402FA05: g_type_create_instance (gtype.c:1892)
	==25063==    by 0x3DE40147A7: g_object_constructor (gobject.c:1849)
	==25063==    by 0x52DA07B: spice_display_constructor (spice-widget.c:412)
	==25063==    by 0x3DE4015D70: g_object_newv (gobject.c:1713)
	==25063==    by 0x3DE401655F: g_object_new_valist (gobject.c:1830)
	==25063==    by 0x3DE4016893: g_object_new (gobject.c:1545)
	==25063==    by 0x52DE746: spice_display_new (spice-widget.c:1924)
	==25063==    by 0x41D6C3: virt_viewer_display_spice_new (virt-viewer-display-spice.c:219)

2012-06-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	misc: use g_value_dup_object

	Fix incorrect format string

	Fix video playback with GStreamer backend
	The playback audio delay is not correctly adjusted, we should take
	min_latency, set by gst_bin_do_latency_func ().

	Deprecate spice_channel_set_capability()
	This was initially public to eventually let a derived class
	implement more capabilities. Even though it is technically
	doable to derive and tweak exisiting channels, there is a
	lack of support in spice-gtk for doing that.

	Allow to disable specific capabilities at runtime
	Capability BAR for channel FOO can be disabled at runtime by setting
	the SPICE_FOO_CAP_BAR environment variable to '0'
	Disabling capabilities is useful for testing purpose.

2012-06-11  Christophe Fergeau  <cfergeau@redhat.com>

	spice_channel_coroutine: fix function exit in error path
	spice_channel_coroutine returns a void *, but one of its error path
	is doing 'return FALSE'. This commit replaces this return with a
	'goto cleanup' since this is what is done in the other error paths.

	spice_channel_coroutine: emit signals in all error cases
	There are several very unlikely failures where no signal is emitted
	to indicate the failure. Since applications rely on these signals
	to detect spice-gtk connection failures, it's important to emit
	one in all error cases.

2012-06-10  Christophe Fergeau  <cfergeau@redhat.com>

	Emit SPICE_CHANNEL_ERROR_TLS when certificate can't be found
	When trying to start remote-viewer with SPICE over TLS with
	--spice-ca-file with a wrong filename, the connection fails
	but remote-viewer keeps displaying the "Trying to connect"
	message. The only hint that something went wrong is:
	(remote-viewer:12924): GSpice-WARNING **: loading ca certs from a/home/teuf/foo.crt

	This patch makes sure we emit a SPICE_CHANNEL_ERROR_TLS before
	giving up on channel creation to inform the application that
	an error happened.

2012-06-07  Christophe Fergeau  <cfergeau@redhat.com>

	build: allow building with newer glibc-headers and -O0
	Fix copied from libvirt, commit by Eric Blake.

	glibc 2.15 (on Fedora 17) coupled with explicit disabling of
	optimization during development dies a painful death:

	/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]

	Work around this by only conditionally defining _FORTIFY_SOURCE,
	in the case where glibc can actually use it.  The trick is using
	AH_VERBATIM instead of AC_DEFINE.

2012-06-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Update spice-common

2012-06-04  Hans de Goede  <hdegoede@redhat.com>

	spicy: Change 'OK' button to 'Close' button in USB device selection
	The USB device selection applies immediately, so the dialog should be using
	'Close' instead of 'OK' for its primary button.

	This patch syncs spicy with virt-viewer wrt the USB device selection dialog.

2012-05-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: disconnect session_inhibit_keyboard_grab_changed
	There is one handler we forgot to disconnect on dispose()
	that may cause a crash.

	I am thinking of generalizing usage of
	spice_g_signal_connect_object()..

	Should fix:
	https://bugzilla.redhat.com/show_bug.cgi?id=823570

2012-05-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Clipboard clean-up and fixes for Windows client
	The Windows client was getting in the way of guest copy-paste,
	because when the guest was taking the clipboard grab, the agent
	notifies the client, it takes the grab too, and in return
	receives clipboard notification of new ownership from the client
	clipboard.

	Though we had a hack to check if this new client clipboard event
	is caused by us, the Windows Gtk clipboard is giving 2 notifications
	for some reasons.

	It turned out there is a much better way than the "selfgrab" hack,
	by setting ownership of the clipboard. Problem solved, and cleaner
	code!

	https://bugzilla.redhat.com/show_bug.cgi?id=822688

2012-05-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: correctly track main channel
	The main channel can change when we are reconnecting to the server,
	for example, when querying the password to the user. From there,
	the old main channel is destroyed, but we don't track properly the
	new main channel.

	This fix migration crashing later on, because of missing main channel:
	https://bugzilla.redhat.com/show_bug.cgi?id=823874

2012-05-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Reset grab-sequence on match
	This avoids triggering the grab event on consecutive
	matches, such as ctrl+alt (match) then ctrl+alt+foo
	(match again) that would prevent the longer combination
	from being sent.

	If grab sequence is matched, still send modifier keys
	If the last key pressed from the grab sequence is a modifier
	key, let send it to the guest too.

	This solves the issue of default grab-sequence being ctrl+alt
	and preventing ctrl+alt+del from working.

2012-05-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Running out of reserved space, break ABI
	The change abc56811de978ad336a651924a21b920cfe677f0 actually added
	a field in a public struct while changing overall struct size, the
	fields were also reorder, all of this breaks ABI.

	However, we are running out of free space in SpiceChannelClass
	struct. And since the SPICE_RESERVED_PADDING was 44 bytes, that is
	quite limited on 64bits (only 5 pointers fit).

	I propose we break ABI during this cycle. This means that programs
	using spice-gtk will need to be recompiled to use the new library.
	(the old library should be parallel installable though). This let us:
	- use a better SPICE_RESERVED_PADDING based on pointer size, since
	  it is what is usually added for virtual methods
	- reset the amount taken from the padding in the various struct
	- reorder fields a little
	- add some missing "priv" pointers
	- whatever I am missing that we can still change before next release

	Please comment if I am missing something, or correct me

	session: correctly set and unset ssl-verify flags
	If no cert-subject or pubkey is provided, we should unset the corresponding flags.

2012-05-17  Yonit Halperin  <yhalperi@redhat.com>

	record channel: reseting channel caps

	playback channel: reseting channel caps

	display channel: reseting channel caps

	main channel: reseting channel caps

	Fix not setting channel specific capabilities upon channel reset
	Related: rhbz#821795

	The capabilities have been zeroed after channel reset, which have lead to
	publish the wrong caps when both port and tls-port are given, and the
	channels are secured (first attempt to connect the channel with "port"
	has failed; the channel got reset, and then reconnected with "tls-port"
	and bad caps). Specifically, the bug causes semi-seamless migration not
	to work when part of the channels are secured.

2012-05-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	python: fix Spice.Audio binding
	The spice_audio_new() function is not correctly generated h2def.py
	anymore because of the surrounding #ifdef and macros. Add it in
	the manual.defs instead.

	Avoid API breakage:
	2012-05-10 01:56:48,884 (cli:83): Uncaught exception:
	Traceback (most recent call last):
	  File /usr/share/virt-manager/virtManager/console.py, line 475, in
	_channel_new_cb
	    self.audio = spice.Audio(self.spice_session)
	TypeError: GObject.__init__() takes exactly 0 arguments (1 given)

	https://bugzilla.redhat.com/show_bug.cgi?id=820335

2012-05-03  Yonit Halperin  <yhalperi@redhat.com>

	display: video streaming: add support for frames of different sizes
	rhbz #815426

	When playing a youtube video on Windows guest, the driver sometimes sends
	images which contain a video frame, but also other parts of the
	screen (e.g., the you tube process bar). In order to prevent glitches, we send these
	images as part of the stream, using SPICE_MSG_DISPLAY_STREAM_DATA_SIZED.

2012-05-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix parsing URI query
	Do not depend on uninitialized "len" variable to set the query string.

	https://bugzilla.redhat.com/show_bug.cgi?id=818169

2012-04-27  Christophe Fergeau  <cfergeau@redhat.com>

	g_getenv returns a const string
	When switching from getenv to g_getenv, 'doms' declaration
	wasn't changed from char * to const char *, which causes
	a gcc warning.

2012-04-27  Daniel P. Berrange  <berrange@redhat.com>

	Fix annotations for GrabSequence class
	The default transfer mode is wrong for spice_display_get_grab_keys.
	The array parameter for spice_grab_sequence_new needs explicit
	annotation

2012-04-26  Daniel P. Berrange  <berrange@redhat.com>

	Replace getenv/setenv with g_getenv/g_setenv for Win32 portability

2012-04-25  Daniel P. Berrange  <berrange@redhat.com>

	Fix --spice-debug flag on glib >= 2.31
	With glib >= 2.31 no debug messages are ever printed out by
	default, which makes the --spice-debug flag useless. This
	fix explicitly turns on the appropriate log domain when
	debug is requested. It takes care to preserve the users
	own existing log domain requests

2012-04-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.12

	Lower a few warnings when migration fails

2012-04-24  Daniel P. Berrange  <berrange@redhat.com>

	Fix multiple problems with URI parsing
	The URI parsing was not correctly skipping over the path component
	if a port number was specified using the traditional URI scheme,

	eg

	   spice://somehost:5900/

	would result in failed parse due to the trailing '/'

	The URI parsing was also not considering that the authority
	component is allowed to contain '[' and ']' around the hostname.
	This is used when specifying raw IPv6 addresses to remove the
	parsing ambiguity wrt ':'.

	eg

	   spice://[::1]:5900/

	Various stages of parsing also failed to report errors.

2012-04-23  Uri Lublin  <uril@redhat.com>

	setsockopt: check for ENOTSUP only if defined
	For windows (mingw32) ENOTSUP is not defined.

	Related to 3bfadb8587f59a74d373e26385d348a105c2e425

2012-04-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Allow to disable CELT at runtime
	We might want to make it a property, but having an environemnt variable
	is useful too, to override behaviour.

	build-sys: pyparsing req. moved to spice-common

2012-04-19  Daniel P. Berrange  <berrange@redhat.com>

	Fix callback signature for --spice-debug option handling
	The callback for option handling should return TRUE otherwise the
	option parser will think parsing failed. The current 'void' return
	type meant it was non-deterministic whether --spice-debug actually
	worked or not

2012-04-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Clear cache and glz dictionnary on switch-host
	If we don't clear the glz dictionnary, this might lead to
	corrupted/invalid dictionnary and invalid memory allocation due
	unbounded increase of dictionnary size

	Set new cert-subject when switching host
	https://bugzilla.redhat.com/show_bug.cgi?id=802574

	gtk: scroll event are not received with recent gtk+
	Add explicit scroll event mask to make it work again.

2012-04-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix cursor hide not hiding in some cases
	cursor_set() didn't un-hide correctly by setting "show_cursor" to
	NULL.

	The code is simplified a bit in server mode case, where the new cursor
	will be invalidated and shown during cursor move only, instead of
	twice (checked no regression with dual-head server mode)

2012-04-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix crash when closing while recording
	First notify about disconnection before resetting the channel data.
	An audio recording task might expect the channel to be in a ready
	state otherwise, for example.

	https://bugzilla.redhat.com/show_bug.cgi?id=810247

2012-04-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	agent: avoid use of alloca for sending large msg
	Instead of allocating unbounded memory and doing extra copy on the
	stack, let's just improve our helper function to send messages in
	various pieces.

	See also: https://bugzilla.redhat.com/show_bug.cgi?id=809145

2012-04-04  Christophe Fergeau  <cfergeau@redhat.com>

	autogen.sh: default to --enable-vala when building from git
	People using autogen.sh are likely to be building from git, so may
	get updates to vala files at any time. Checking for the presence of
	controller.vala.stamp to decide whether vala should be enabled or not
	is not very accurate since it doesn't reflect if a .vala file needs
	to be regenerated or not.
	It's better to always pass --enable-vala to configure, it's always
	possible to disable it by using --disable-vala as an autogen.sh argument.

	controller: handle USB redirection messages

	autogen.sh: log configure command line
	Since --enable-vala may or may not be passed to configure, seeing
	the actual command line that was used is helpful.

2012-04-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	fix build with glib < 2.32
	Reported and verified by Nicolas Prochazka

2012-04-03  Hans de Goede  <hdegoede@redhat.com>

	SpiceDisplay: Fix rounding of mouse motion events with GTK-3.0
	Before this patch we were assuming that the GdkEventMotion value we receive
	are always whole (integer) numbers, which is not the case with GTK-3.0.

	SpiceDisplay: Don't try to scale mouse coordinates when we're not scaling
	Often (when not resized by the user) even though scaling is enabled, we are
	not actually scaling. In this case it is not necessary to scale the
	mouse coordinates, and sometimes it is even harmful.

2012-04-03  Yonit Halperin  <yhalperi@redhat.com>

	controller: add support for DISABLE_EFFECTS and COLOR_DEPTH
	rhbz #787449

2012-03-31  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Handle grab-broken event
	This fixes the pointer being "trapped" in the center of the screen in
	server-side mouse mode. It also correctly inform the client that the
	pointer/keyboard is no longer grabbed so it can adjust its UI state
	accordingly (remote the "press ctrl+alt to ungrab" messages etc).

	I can reproduce only with RHEVM22 host, and a RHEL6 guest, when
	switching consoles.

	widget: fix invalid memory ref after channel is distroyed
	When the display channel is destroyed, we disconnect all signals
	handlers, but we don't remove the reference on the primary surface
	data, and that can lead to crashes in a later expose event, reusing
	the canvas surface (ex, if scaling is disabled). Call
	primary_destroy() when disconnecting the channel from the widget.

	We now keep the primary surface during channel reset (right after
	disconnect for example), so the primary surface can be eventually
	recycled, and the widget still holds a valid reference until the
	signal is received. The primary surface is ultimately destroyed during
	finalize, or if the new primary surface size doesn't match.

	Program received signal SIGSEGV, Segmentation fault.
	__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:2130
	2130		lddqu	-68(%rsi), %xmm0
	Missing separate debuginfos, use: debuginfo-install gtk2-engines-2.20.2-2.fc15.x86_64 libusb1-1.0.9-0.3.rc1.fc16.x86_64 p11-kit-0.6-1.fc16.x86_64
	(gdb) bt
	    at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:2130
	    srclen=<optimized out>, srcinc=4096, destinc=68, height=<optimized out>,
	    half_order=0) at /usr/include/bits/string3.h:52
	    dest_bits_per_pixel=32, req_yoffset=<optimized out>, req_xoffset=0,
	    image=0x7fffffffb9a0, req=<optimized out>, dpy=0x64a630) at PutImage.c:821
	    req_height=<optimized out>, req_width=<optimized out>, y=<optimized out>,
	    x=0, req_yoffset=<optimized out>, req_xoffset=0, image=0x7fffffffb9a0,
	    gc=0xa817e0, d=33554452, dpy=0x64a630) at PutImage.c:870
	    req_xoffset=0, req_yoffset=<optimized out>, x=0, y=26, req_width=17,
	    req_height=20, dest_bits_per_pixel=32, dest_scanline_pad=32)
	    at PutImage.c:908
	    image=0x7fffffffb9a0, req_xoffset=0, req_yoffset=0, x=0, y=26,
	    req_width=17, req_height=20) at PutImage.c:1027
	    image=<optimized out>, src_x=0, src_y=0, width=17, height=20, dst_x=0,
	    dst_y=26) at cairo-xlib-surface.c:1357
	---Type <return> to continue, or q <return> to quit---c
	    height=20, width=17, dst_y=26, dst_x=0, src_y=<optimized out>,
	    src_x=<optimized out>, pattern=0x7fffffffc6b0, op=CAIRO_OPERATOR_OVER,
	    surface=0xb9a650) at cairo-xlib-surface.c:2403
	    dst_y=26, dst_x=0, mask_y=0, mask_x=0, src_y=26, src_x=0,
	    abstract_dst=0xb9a650, mask_pattern=0x0, src_pattern=0x7fffffffc6b0,
	    op=CAIRO_OPERATOR_OVER) at cairo-xlib-surface.c:2452
	    src_pattern=0x7fffffffc6b0, mask_pattern=0x0, abstract_dst=0xb9a650,
	    src_x=0, src_y=26, mask_x=0, mask_y=0, dst_x=0, dst_y=26, width=17,
	    height=20, clip_region=0x0) at cairo-xlib-surface.c:2415
	    src=0x7fffffffc6b0, mask=0x0, dst=0xb9a650, src_x=0, src_y=26, mask_x=0,
	    mask_y=0, dst_x=0, dst_y=26, width=17, height=20, clip_region=0x0)
	    at cairo-surface.c:1802
	    traps=0x7fffffffbee0, src=0x7fffffffc6b0, op=CAIRO_OPERATOR_OVER,
	    dst=0xb9a650) at cairo-surface-fallback.c:762
	    op=CAIRO_OPERATOR_OVER, dst=0xb9a650, traps=0x7fffffffbee0,
	    antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x0, extents=0x7fffffffc600)
	    at cairo-surface-fallback.c:812
	---Type <return> to continue, or q <return> to quit---bt
	    op=CAIRO_OPERATOR_OVER, source=0x7fffffffc6b0, clip=0x0)
	    at cairo-surface-fallback.c:935
	    source=0x7fffffffc6b0, op=CAIRO_OPERATOR_OVER, surface=0xb9a650)
	    at cairo-surface.c:2027
	    source=0x7fffffffc6b0, clip=0x7fffffffc7b0) at cairo-surface.c:1993
	    at cairo-gstate.c:1049
	    at spice-widget-cairo.c:104
	    expose=0x7fffffffceb0) at spice-widget-cairo.c:133
	    expose=0x7fffffffceb0) at spice-widget.c:885
	    return_value=0x7fffffffca60, n_param_values=<optimized out>,
	    param_values=0x7fffffffcad0, invocation_hint=<optimized out>,
	    marshal_data=<optimized out>) at gtkmarshalers.c:86
	    return_value=0x7fffffffca60, n_param_values=2,
	    param_values=0x7fffffffcad0, invocation_hint=<optimized out>)
	---Type <return> to continue, or q <return> to quit---c
	    at gclosure.c:777
	    detail=0, instance=<optimized out>, emission_return=0x7fffffffccb0,
	    instance_and_params=0x7fffffffcad0) at gsignal.c:3584
	    signal_id=<optimized out>, detail=0, var_args=<optimized out>)
	    at gsignal.c:3305
	    signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3351
	    event=0x7fffffffceb0) at gtkwidget.c:4999

	mjpeg: fix blue-tinted video stream with old server
	The major == 1 uses RGB colorspace for mjpeg streams.

2012-03-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	session: take pubkey reference in setter
	The session assumed it owned a reference to it.
	But it didn't get it, and that lead to invalid memory access.

	Fixes:  https://bugzilla.redhat.com/show_bug.cgi?id=802574

	Be more tolerant on NULL arrays
	2 places where we should be more carreful with NULL arrays, and we can
	avoid potential crashes.

2012-03-29  Hans de Goede  <hdegoede@redhat.com>

	usb-device-widget: Call set_active on the toggle_button, not the alignment
	Since the gnome HIG-ifying of usb-device-widget.c, the vbox contains
	alignments, which in turn contain a toggle_button, so calling
	gtk_toggle_button_set_active directly on the vbox-containers childdren is
	wrong.

2012-03-29  Uri Lublin  <uril@redhat.com>

	usb-acl-helper: add a missing "break"

2012-03-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: move codegen & proto to spice-common
	With this iteration, all the spice_codegen.py/proto/marshaller
	generation has been moved to spice-common.

	The spice-common directory will ship spice-protocol, since it's needed
	there too to build libspice-common.

	Again, make distcheck passes. Build with mingw & fedora linux.

2012-03-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Always release shm of primary surfaces
	Always remove shared memory segment of primary surfaces when
	destroying its canvas.

2012-03-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controllers: signal when a client is connected

	controller: handle SEND_CAD message as a property

	Fix cursor not being shown in client mode in some cases
	The following seems to happen:
	- cursor-hide (for all cursor/display channels)
	- cursor-set (for all cursor/display channels)

	All cursor/display channels receive cursor-set events when the cursor
	is changed, however, only current display cursor should be drawn in
	server-mode. How to know which display?

	So it will wait until cursor-move to draw it in server-mode on the
	right display.

	In the case of client-mode cursor, it doesn't matter since it will
	depend on which client display the pointer is, so it can be changed
	immediately.

2012-03-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: fix make distclean going twice in vapi dir
	Don't use DIST_SUBDIRS, it's not needed anyway.

	build-sys: fix compilation of bindings
	Hide symbol from API to fix pygobject.

	Also vapigen chokes on "record" typename

	SpiceClientGtk-3.0.gir:32.55-32.55: error: The type name `Gtk.BoxClass' could not be found <type name="Gtk.BoxClass" c:type="GtkBoxClass"/>

	This seems to be a bug in symbol lookup in vapigen. Using a struct
	typedef solves it.

	doc: gtk-doc cleanup
	Fix all the unused symbols and a few warnings (a lot left)

	Add SPICE_DISABLE_DEPRECATED guard

	build-sys: improve maintainer clean

	build-sys: use new git.mk

2012-03-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Hide cursor when it is on a different screen in server mode
	When the cursor shape is changed, all the cursor channels are
	updated. The current code assumed that the "set" of the shape should
	show the cursor, but it should stay hidden instead.

	Also, when the cursor is hidden, we must invalidate its current
	region to redraw display.

	Fix: https://bugzilla.redhat.com/show_bug.cgi?id=804308

2012-03-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Do not grab display widget
	We used to gtk_grab_add() after mouse grab to limit the mouse events
	to the display. But it isn't necessary if the display has its own
	window, since gdk_pointer_grab() will be limited to it.

	Note the widget has the keyboard focus & is focused, so this doesn't
	affect keyboard events.

	However, this allows application to keep global accelerators
	functionning if they want to (like virt-viewer with custom key
	bindings).

	Notify agent-connected property change

	Improve spice_main_set_display_enabled()
	Check given display id is within the range of array.
	Allows to be call with -1 to turn set all displays.

	Fix non-semi-seamless migration in spicy
	The windows are destroyed during non-semi-seamless migrations, but the
	gtk session and connected handlers remains. When a property changes
	again on it, it will signal a destroyed window and lead to a crash.

	The signal handler should be disconnected when the window is
	destroyed. Since we have N numbers of handlers, it's easier to use
	spice_signal_connect_object() helper to handle this for us by turning
	spice_window structure into a basic GObject.

	That GObject code could be improved, but that wasn't the goal of this
	patch.

	Use given color depth in monitor configuration
	The main channel only relied on
	VD_AGENT_DISPLAY_CONFIG_FLAG_SET_COLOR_DEPTH to set color depth when
	connecting to a guest. However, that doesn't seem to be
	enough. Instead send given color depth with monitor configuration.

	Fix --spice-color-depth option not "apparently" working.

2012-03-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build-sys: if stow is installed, default prefix to it
	This is going to make life easier for stow users, including myself.

	build: fix build with glib < 2.32
	Using GMutex as a static mutex is only possible since 2.32.

	Add a G_GNUC_NORETURN to a function that exits

2012-03-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	use common submodule

	Fix incorrect array size check

2012-03-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Move undef FORTIFY below config.h
	It used to be below, then was moved on top of all, but now it's
	defined in config.h. Hopefully below config.h is the right
	place. config.h should never have direct includes anyway.

2012-03-14  Hans de Goede  <hdegoede@redhat.com>

	buildsys: Disable some warnings
	Mostly so that they don't turn into errors when building from source:
	-Wno-missing-field-initializers:
	Because this has to be close to the most stupid warning gcc has ever produced
	-Wno-deprecated-declarations
	Because we use some deprecated functions to avoid #ifdef hell while maintaining
	compat with older gtk / glib versions

	usbredir: Check for existing usb channels after libusb init
	Currently trying to view a usbredir enabled vm from virt-manager causes
	virt-manager to crash. This crash is caused by the following happening:

	-virt-manager sets up the session, including connecting all the channels
	-a spice-gtk internal code path calls spice_usb_device_manager_get()
	-spice_usb_device_manager_get calls channel_new on all already connected
	 usb channels
	-channel_new does:
	 spice_usbredir_channel_set_context(SPICE_USBREDIR_CHANNEL(channel),
	                                    self->priv->context);
	-But self->priv->context has not been set yet (so is NULL) -> segfault!

	This patch fixes this by moving the iterating over already connected
	usb channels to after the setting of self->priv->context. Note this means
	that the channels will no longer get checked when there is no USB_REDIR
	support. That is not a problem since spice_usb_device_manager_initable_init
	will return FALSE in that case anyways.

2012-03-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Use GTK_DISABLE_DEPRECATED to avoid inclusion of problematic headers
	/usr/i686-w64-mingw32/sys-root/mingw/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]

	Fix 'libintl_printf' is an unrecognized format function
	../common/lz.h:18:5: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]

	Remove deprecation warnings

2012-03-14  Daniel P. Berrange  <berrange@redhat.com>

	Disable -Wwrite-strings for Python binding
	The code generator for the python binding generates code which
	throws away const-ness on strings. Disable the -Wwrite-strings
	warning to avoid failing on this auto-generated code.

2012-03-13  Daniel P. Berrange  <berrange@redhat.com>

	Replace %02hhx with %02x in UUID format
	Use of 'hh' in the UUID format string is not required. Furthermore
	it causes errors on Mingw32, where the 'hh' modifier is not supported

	Import GNULIB's GCC warning macros
	GNULIB has a helpful module 'manywarnings' which makes it easy
	to turn on every single GCC warning. The general goal is that
	every possible GCC warning should be enabled, except for certain
	blacklisted warnings.

	This imports the GNULIB m4 macros, and updates configure.ac to
	use this new capability. As & when new GCC warnings are created,
	the 'manywarnings.m4' can be refreshed from upstream GNULIB

	* m4/manywarnings.m4, m4/warnings.m4: GNULIB warning macros
	* configure.ac: Remove custom compiler warning checks
	* m4/spice-compile-warnings.m4: Decide what GCC warnings to enable

	Avoid 'goto' jumping over variable initialization
	When a goto statement jumps over a variable declaration with an
	initializer, the state of that variable is undefined. Move the
	declaration further up, so that the goto doesn't jump over it.
	This lets the compiler then warn, if the goto jump results in
	use of undefined values.

	Fix no-arg functions declared () to use (void)
	* common/quic.h, common/rop3.h, common/sw_canvas.h: s/()/(void)/

	Add missing includes & make some functions static
	A number of functions were used without prior declaration. In
	some cases this was due to missing include files. In other cases
	the functions should have just been static.

	Ideally this would allow -Wmissing-declarations to be enabled, but
	the files generated by spice_codegen.py will still trip up on this.

	Ensure all no-args methods are declared (void) not ()
	* common/quic.c, common/rop3.c, common/sw_canvas.c,
	  gtk/spice-client-glib-usb-acl-helper.c: s/()/(void)/

	Add printf format annotations to all '...' functions
	To allow the compile to detect incorrect printf formats, any
	var-args function should have a format annotation

	* common/macros.h: Helper to define ATTR_PRINTF for code
	  which can't depend on glib
	* common/canvas_base.c, common/lz.h, common/macros.h: Annotate
	  some var-args methods

	Replace duplicated header declarations
	The usb-helper-acl.h header file duplicated some declarations
	already present in usb-device-manager.h

	The channel-display.c file declared the object init function
	which is already done by the GObject helper macros

	* gtk/channel-display.c: Remove duplicate decl of init function
	* gtk/usb-acl-helper.h: Remove duplicate decls

	Remove arithmetic on void* pointers
	Arithmetic on void * pointers is undefined by the C standard.
	Convert the one case of this to use guint8 instead.

	* gtk/channel-main.c: s/void */guint8 */

	Fix some integer range checks which always evaluate false
	There are some integer range checks which always evaluate false
	due to use of unsigned integer types. One of these would prevent
	detection of encoding errors from celt. The others are simply
	no-ops.

	* gtk/channel-record.c: Make 'frame_size' signed to allow detection
	  of celt encoding errors
	* gtk/spicy.c: nkeys is an unsigned type, so checks for nkeys < 0 are bogus
	* common/pixman_utils.c: SpiceROP is an enum & thus unsigned

	Avoid warnings about empty conditional statement bodies
	Add extra {} braces around if/else statements which only
	call SPICE_DEBUG to avoid:

	../common/ssl_verify.c: In function 'verify_pubkey':
	../common/ssl_verify.c:87:50: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
	../common/ssl_verify.c: In function 'verify_hostname':
	../common/ssl_verify.c:254:53: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
	../common/ssl_verify.c: In function 'verify_subject':
	../common/ssl_verify.c:381:41: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]

	Fix deprecation warning handling
	Various methods are deprecated by using the G_GNUC_DEPRECATED_FOR
	macro. Unfortunately this macro was placed in the .c file impl,
	instead of the .h file decl. Thus applications building against
	SPICE-GTK would never see the deprecation warnings. At the same
	time, building SPICE-GTK itself would trigger some of the warnings
	preventing use of -Wdeprecated-declarations to detect use of
	deprecated GTK functions.

	The fix is in multiple parts

	 * Replace calls to G_GNUC_DEPRECATED_FOR with SPICE_DEPRECATED_FOR
	 * Move macros from .c to .h files
	 * Turn SPICE_DEPRECATED_FOR into a no-op if SPICE_NO_DEPRECATED
	   is defined
	 * Define SPICE_NO_DEPRECATED when building

	Fix old style declaration where 'inline' came after return type
	Fix a case of 'static int inline' to be 'static inline int'

	Fix const-correctness of functions & add explicit casts
	Some functions should be declared to take const char * instead
	of plain char *. In other places we intentionally cast away
	const-ness, so we should add explicit casts to stop compiler
	warnings

	Remove non-existant include directories from CFLAGS

	Don't delete gtk-doc.make in distclean
	gtk-doc.make is created by autogen.sh, therefore it should
	not be deleted in distclean, only maintainerclean

2012-03-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.11

	Update since annotation for some session properties

2012-03-08  Hans de Goede  <hdegoede@redhat.com>

	channel-usbredir: Handle some more usbredirhost_read_guest_data errors

2012-03-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Do not warn when starting spicy if usbredir is disabled

	sasl: sasl authentication failure results in disconnection
	When SASL auth failure happen, the Spice server disconnects the
	client. Sadly, this is not easily distinguishable from an IO error.
	However, since it happens during authentication phase it is better to
	error out an authentication error.

	sasl: lower visibility of normal debug message
	Those two g_critical() can happen when collecting credentials for the
	first time. It is not something to be warned about, but merely useful
	for debugging

	build: move @SPICE_GLIB_REQUIRES@ to Requires.private
	The libraries listed in Requires aren't needed during build time, they
	are library depedencies. And since this is only needed if linking
	statically, we can safely move them to Requires.private.

	Succesfully tested change with compilation against virt-viewer.

	Later, this will also help fixing bug rhbz #799112.

2012-03-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix semi-seamless migration handling
	SPICE_MSGC_MAIN_MIGRATE_END was dropped because the main channel was
	xmit_queue_blocked. When we swap the channels, we should also swap
	xmit_queue.

2012-03-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Warn if a message is dropped (before connection or after reset)
	Since c2ba62666beaee526e1b4288f9bd66976ce780ef messages can be ignored
	when a channel is reset. A warning can help explain why some messages
	are dropped.

	Support name & uuid
	Allows a client to identify the server it is connected to.

2012-02-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add a spice-controller-dump testing tool
	By default, start a controller listener.
	If ran with --menu, start a foreign-menu listener.

	Add controller foreign menu support

	Fix a few warnings on windows build

	Allow open_fd() to be called with -1
	In this case, a valid fd will be requested via the
	SpiceChannel::open-fd signal.

2012-02-24  Hans de Goede  <hdegoede@redhat.com>

	buildsys: Don't link glib-compat.o into libspice-client-gtk.so
	glib-compat.c was added to SPICE_GTK_SOURCES_COMMON since with the
	new SpiceUsbDeviceWidget libspice-client-gtk now also uses G_TYPE_ERROR
	and when compiling with an older glib this gets defined in glib-compat.o

	However doing this turns out to be a very BAD idea, since having
	glib-compat.o linked into 2 different libraries, each defining there
	own private spice_error_get_type, leads to the "GError" type getting
	registered twice with glib, which it does not like.

	So instead of linking glib-compat into 2 different libraries, put it only
	in libspice-client-glib and export spice_error_get_type from
	libspice-client-glib (this is ofcourse intended for libspice-client-gtk
	private use only).

	Fix building with policykit < 0.101

2012-02-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.10

	use :glz-window-size not :glz_window_size

	build: fix build with recent mingw64
	Christophe did similar patches for common/ directory in spice.  Some
	day, we should try to sync and move common/ to a spice-common
	project...

2012-02-22  Hans de Goede  <hdegoede@redhat.com>

	usbredir: Add awareness of host/guest side filtering

	usbredir: Add a spice_usb_device_manager_can_redirect_device function
	Add a spice_usb_device_manager_can_redirect_device function and use this
	in SpiceUsbDeviceWidget to check if redirection is available.

	usb-device-widget: Use an info_bar for error messages
	And in general gnome-hig-ify usb-device-widget:
	* Use spacing instead of padding so that there is no padding at the
	  outside/border of the widget, allowing the user to control the border size.
	* Use multiple of 6 as spacing / indentation values
	* Show the label left justified and bold, show the checkboxes (and the info
	  bar) 12 pixels indented from the label

	configure: Fix "USB redirection support" summary on --disable-usbredir
	When running "./configure --disable-usbredir" the
	"USB redirection support" line in the summary at the end of ./configure
	would be empty after "support" instead of ending with yes or no.

	usbredir: Treat the user cancelling the policykit dialog as a cancel
	Rather then treating it as any other error. This avoids showing an error
	dialog after the user pressed cancel in the policykit dialog.

	usbredir: Add device rejected errors

2012-02-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	RFC: Use spice protocol as a submodule
	Spice protocol contains only headers. We would like to be able to use
	a protocol update without having to wait for the release, a git
	submodule works well for this purpose.

2012-02-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix make distcheck

2012-02-20  Hans de Goede  <hdegoede@redhat.com>

	usbredir: Shrink the usb device selection dialog when devices are unplugged

	usbredir: make channel lifetime equal to session lifetime

	usbutil: Add support for getting strings from usb.ids
	Unfortunately not all device makers go to the "trouble" of adding device
	identification strings to a device's descriptors. This patch makes spice-gtk
	translate vid/pid into strings if the device lacks the strings.

	usbutil: Add a spice_usb_util_get_device_strings helper function

	usb: Move various helper functions into usbutil.[c,h]

2012-02-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add controller ENABLE_SMARTCARD message

2012-02-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: fix mouse wrapping failing when the window is outside
	Use a anchor mouse position after every move, similar to spicec to
	avoid reaching transparent border on the screen.

	We try to move to the center of the screen, but
	gdk_display_warp_pointer () will move the cursor within the grabbed
	window (so it still receives mouse events even on Windows)

	Tested with Linux and Windows clients.

	Fixes bug: https://bugs.freedesktop.org/show_bug.cgi?id=45595

2012-02-13  Nicolas Prochazka  <prochazka.nicolas@gmail.com>

	Set keepalive on channel socket
	Without keepalive on each connection(channel), channel is destroyed
	after ip_conntrack_tcp_timeout_established timeout.

	https://bugs.freedesktop.org/show_bug.cgi?id=45899

2012-02-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Use an openssl BIO stream using GSocket
	Until now, the BIO object used by openssl to read & write was using
	the socket fd directly. But the mainloop integration is done with
	GSocket.

	On Windows, the read/write events are cleared after
	g_socket_send()/receive() with private function
	_win32_unset_event_mask. If the glib functions aren't cleared, glib
	source will keep notifying of data available in or out. On Windows,
	this causes a busy loop when doing SSL_read() for example (glib
	POLL_IN data condition is reached and SSL_read() return needs data).

	Instead, openssl should read/write using GSocket methods.

2012-02-09  Daniel P. Berrange  <berrange@redhat.com>

	Don't warn if setsockopt(TCP_NDELAY) fails with errno==ENOTSUP
	If connecting to a UNIX domain socket, it is expected that the
	setsockopt(TCP_NDELAY) call will fail with errno=ENOTSUP, so don't
	issue a warning in that case

2012-02-08  Christophe Fergeau  <cfergeau@redhat.com>

	Link with usbredirparser
	spice-gtk uses usbredirfilter_string_to_rules which is defined
	in usbredirparser but does not link with it. This causes link errors
	on some distributions. Fixes fdo bug #45761.

2012-02-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Lower or silence some harmless debug messages

2012-02-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	widget: allow defining a zoom-level
	Add a "zoom-level" property. Maintain the given scaling ratio when
	scaling is enabled.

	If scaling is disabled, this property is ignored.

	For example at 50%, this allows to fit a 640x480 desktop in a 320x240
	widget and when resizing it to 640x512 to have a 1280x1024 desktop.

	(this feature is required by virt-viewer)

	widget: factor out update_size_request() and scaling_updated()
	Factor out and simplify a little the code to allow easier addition of
	zoom-level property.

	The "set_display" parameter for recalc_geometry() seems to be useless,
	since the code was apparently trying to set the guest to the given
	d->width and d->height, but reseting it to the current value, which
	cancel the effect.

	We should fix the problem of setting the guest resolution at
	display-init time in a follow-up patch since it probably never worked
	with spice-gtk.

2012-01-31  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Report the scaling is 1.0 if the widget isn't realized yet
	To avoid a few warnings in some corner cases.

	Do not grab/release the clipboard on guest without clipboard support
	Add an agent capability check before calling those functions from
	gtk-session. Avoid extra warnings.

2012-01-31  Hans de Goede  <hdegoede@redhat.com>

	Release 0.9

	Add a USB device selection widget
	This patch adds a SpiceUsbDeviceWidget which apps can use to easily
	add an UI to select USB devices to redirect (or unredirect).

	See spicy for an example usage.

2012-01-30  Hans de Goede  <hdegoede@redhat.com>

	usb-device-manager: Cleanup USB manufacturer and product strings
	The strings returned by devices sometimes can benefit from some clean-up.

2012-01-28  Hans de Goede  <hdegoede@redhat.com>

	spice-client-glib-usb-acl-helper: Fix mention of Lesser in license header

	spice-client-glib-usb-acl-helper: ensure we set the acl on a chardev
	Josh Bressers has been so kind to review the usb-acl-helper for possible
	security issues. One of his recomendations was to ensure that the file
	we're setting the acl on is a chardev.

	spice-client-glib-usb-acl-helper: Fix memleak
	Not really important given the short livedness of the process, but
	still should be fixed.

	configure: Add an option for building the acl helper as PIE
	Josh Bressers has been so kind to review the usb-acl-helper for possible
	security issues. One of his recomendations was to harden the usb-acl-helper
	by building it as a Position Independent Executable.

	configure.ac: s/x"$have_foo"/"x$have_foo"/
	configure.ac was using 2 slightly different styles for have_foo tests:
	if test x"$have_foo" = "xyes"; then
	and:
	if test "x$have_foo" = "xyes"; then

	Switch to the latter style everywhere for consistency.

	configure.ac: Cleanup policykit checks
	* No need to set AM_CONDITIONAL WITH_POLKIT from the enable_usbredir tests, it
	  get sets from the enable_polkit tests in all paths
	* Improve the help text: mention auto as option, policykit -> PolicyKit,
	  not yes but auto is the default
	* Warn when building with usbredir support but not building the acl helper

2012-01-24  Christophe Fergeau  <cfergeau@redhat.com>

	Add check for Perl::Text::CSV
	This check is only added to configure.ac contrary to the pyparsing
	patch.

	Add check for pyparsing
	Check both in configure.ac (after checking if we need to rebuild
	the marshalling files) and in the python script using pyparsing
	(for people modifying .proto files in tarballs)

	Use PKG_CHECK_EXISTS for g-i has_symbol_prefix check
	GOBJECT_INTROSPECTION_CHECK will alread test for the presence of
	gobject-introspection. The PKG_CHECK_MODULES(GOBJECT_INTROSPECTION)
	call only needs to set the has_symbol_prefix variable, so we can
	use PKG_CHECK_EXISTS here, and let GOBJECT_INTROSPECTION_CHECK do
	the rest of the work.

	Autodetect usbredir and PolicyKit by default
	Currently, usb redirection and policykit are enabled by default,
	and configure will error out if the required dependencies cannot
	be found. This commit changes the default behaviour, by default
	usb redirection/policykit support is automatically enabled/disabled
	depending on the availability of the needed dependencies. Passing
	--enable-usbredir will error out if the dependencies for usb
	redirection cannot be found, ditto for policykit. This should make
	things nicer for people running configure or autogen.sh with no
	argument.

2012-01-24  Yonit Halperin  <yhalperi@redhat.com>

	Add command line options for setting the cache size and the glz window size
	This options will help us tune and find the optimal values.

	Change the setting of the images cache size and the glz window size
	Set the default sizes to be the same as in the old linux spice client.
	cache_size=20M pixels (instead of 32M), window_size=8M pixels for a 64MB
	dev ram (instead of 16M pixels).

2012-01-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix vapigen error and warnings
	Thanks to Jeremy Bicha for the bug report and testing solution.

	https://bugs.freedesktop.org/show_bug.cgi?id=45154

2012-01-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	controller: use a controller listener abstraction
	Add a wrapper file for named pipe and socket listener, so we can release
	tarball with code compatible with windows and unix.

	build: use AM_GLIB_GNU_GETTEXT
	For some unknown reason, this set DATADIRNAME='share' on Windows,
	which is what is expected.

	Although some people say only IT_PROG_INTLTOOL is necessary, it gets
	the path wrong in this case too.

2012-01-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk-session: weak reference the session for clipboard cb
	It seems Gtk is lacking a way to cancel a gtk_clipboard_request_*().

	Although it seems like gtk_selection_remove_all() would solve that
	problem, it will have nasty effect of destroying other pending
	requests from others..

	Let's make use of an extra weak reference object that will be nulled
	when the session is destroyed.

	This should help solving the follwing bug:
	https://bugzilla.redhat.com/show_bug.cgi?id=743773

	gtk-session: ignore destroy of outdated main channel
	This solves clipboard sharing not working with a password protected
	server, since new main channel are created for each connection
	attempt.

2012-01-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: allow out-of-tree building of python bindings

2012-01-17  Hans de Goede  <hdegoede@redhat.com>

	spice-channel: Allow calling spice_msg_out_send from any context
	spice_msg_out can be not only called from system context and usb event
	handling thread context, but also from co-routine context. Calling from
	co-routine context happens when a response gets send synchronously from
	the handle_msg handler for a certain received packet. This happens with
	certain usbredir commands.

	This triggers the following assert in the coroutine code:
	"GSpice-CRITICAL **: g_coroutine_wakeup: assertion `coroutine !=
	 g_coroutine_self()' failed"

	This patch fixes this by making spice_msg_out_send callable from any
	context and at the same time changing the code to not do unnecessary
	wakeups.

2012-01-16  Hans de Goede  <hdegoede@redhat.com>

	gtk/display: Get rid of old FSF address in copyright headers
	rpmlint pointed this out while I was checking the new spice-gtk-0.8 package
	for Fedora.

2012-01-16  Christophe Fergeau  <cfergeau@redhat.com>

	Handle spice_audio_new failures
	spice_audio_new can return a NULL pointer when there's a failure
	during the initialization of the audio system. When this happens,
	we shouldn't keep initializing the spice audio channel as if nothing
	happened, but just stop the connection.
	This can be tested by forcing the "self" variable to NULL in
	spice_audio_new
	This should fix https://bugzilla.redhat.com/show_bug.cgi?id=772118

2012-01-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release 0.8

	Generate ChangeLog and ship it in the tarball

	Send grab-key signal even in mouse client mode

2012-01-15  Hans de Goede  <hdegoede@redhat.com>

	usbredir: Add support for filtering out devices from auto-redirection
	Note this patch adds a default filter filtering out HID devices, since
	redirecting ie a mouse plugged into a laptop is usually not what the user
	wants. Also sometimes usb keyboards/mice may experience a glitch causing
	them to temporarily drop of the bus. If this happens when the spice-client
	has focussed it used to redirect them to the vm when they re-appeared,
	not good!

2012-01-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix compilation on mingw/windows

	Warn if windows keyboard hook failed

	Don't release images after the tail gap
	This fix a hang on an image lookup that has already been remved.  It
	only happens in multihead, when stressing a bit the displays.

	The decoder assumed that the last added images is the tail of the
	window. However, there are "gaps" in the window that will be filled by
	other channels. Instead of taking the last added image as the current
	up to date tail, let's take the reference to the last image before the
	first gap as the up to date tail, and release from there.

	The spicec code does things differently, perhaps it needs slightly
	less memory at the cost of added complexity by maintaining list of
	missing images and much more conditions/synchronization.

	Grab focus before grabing keyboard
	Make sure the display has the focus before grabing the keyboard for
	the application.

2012-01-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	wait for cached images that haven't been added to the cache yet
	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Log if condition wait got cancelled
	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Make g_coroutine_condition_wait() cancellable
	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Remove the non-interruptible version g_io_wait()
	Use the common g_coroutine_socket_wait()

	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Create a GCoroutine, get rid of wait_queue
	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Hide g_condition_wait_source, use GLib style convention
	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Lower connection error from warning to debug, it's normal to fail
	We try several connections, so it's normal to fail for some.
	No need to warn.

	https://bugs.freedesktop.org/show_bug.cgi?id=44570

	Lower our gtk+ requirement to 2.18, as we claim
	Needed to build on RHEL6

	Lower polkit requirement to 0.96

	Lower our glib requirement to 2.22, as we claim
	Required to build on RHEL, even upcoming 6.3

2012-01-11  Yonit Halperin  <yhalperi@redhat.com>

	migration: swap serials and mini header support when swapping peers.

	Add support for SPICE_COMMON_CAP_MINI_HEADER
	Don't send/receive serial and sub_list when the server supports the
	above cap.

2012-01-10  Yonit Halperin  <yhalperi@redhat.com>

	spice-channel:  support SPICE_MSG_LIST

	configure: spice-protocol >= 0.10.1 (support mini header)

2012-01-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Wait for channels before invalidating images
	https://bugs.freedesktop.org/show_bug.cgi?id=44179

	Implement SPICE_MSG_WAIT_FOR_CHANNELS
	https://bugs.freedesktop.org/show_bug.cgi?id=44179

2012-01-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	add optional format string to spice_usb_device_get_description()

2012-01-07  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build: oops, fix previous commit

2012-01-06  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build: fix compilation with --disable-usbredir

2012-01-05  Alon Levy  <alevy@redhat.com>

	spice-session: support uri with colon
	With this patch if you use:
	 spice://<host>:<port>

	it will be treated the same as:
	 spice://<host>?port=<port>

	You will also get a warning for the following double port definitions:
	 spice://<host>:<port1>?port=<port2>
	 spice://<host>:<port1>:<port2>

	(similar to the double key warnings introduced in the previous commits)

	spice-session/spice_uri_parse: fail if a key is seen twice

2012-01-04  Hans de Goede  <hdegoede@redhat.com>

	Makefile: Ensure the acl helper is installed before making it suid root
	On my system when running make install, after installing the libraries it
	first executes install-binPROGRAMS:

	  /bin/sh ../libtool   --mode=install /usr/bin/install -c spicy snappy spicy-st
	libtool: install: /usr/bin/install -c .libs/spicy /usr/bin/spicy
	libtool: install: /usr/bin/install -c .libs/snappy /usr/bin/snappy
	libtool: install: /usr/bin/install -c .libs/spicy-stats /usr/bin/spicy-stats

	Then the install-exec-hook:

	make  install-exec-hook
	make[6]: Entering directory `/home/hans/projects/spice/spice-gtk/gtk'
	chown root /usr/bin//spice-client-glib-usb-acl-helper
	chmod u+s  /usr/bin//spice-client-glib-usb-acl-helper

	And only then does it install the actual helper by executing
	install-aclPROGRAMS:

	  /bin/sh ../libtool   --mode=install /usr/bin/install -c spice-client-glib-usb
	libtool: install: /usr/bin/install -c spice-client-glib-usb-acl-helper /usr/bin

	Which means that the install-exec-hook runs too early, either there is no
	spice-client-glib-usb-acl-helper for it to make suid root, or if there is it
	will later get overwritten and its rights will get reset.

	The problem is that install-fooPROGRAMS gets run as part of install-data,
	not install-exec. So we can fix this by changing the code to make the helper
	suid root run from install-data-hook.

	usbredir: Don't directly use g_mutex_foo()
	In glib <= 2.30 g_mutex_foo() are macro's so dereferencing them directly
	does not work.

2012-01-03  Hans de Goede  <hdegoede@redhat.com>

	usbredir: Don't call spice_usbredir_channel_disconnect on channel reset
	channel_reset gets called from spice_channel_disconnect, and
	spice_usbredir_channel_disconnect calls spice_channel_disconnect
	(so as to disconnect the channel when a usb device gets disconnected).

	So calling spice_usbredir_channel_disconnect from channel_reset leads to
	undesirable recursion. More over calling spice_usbredir_channel_disconnect
	disconnects / closes both the channel and *the usb device* and closing the
	usb device on migration is not what we want.

	Note that currently migration of usbredir channels does not work, and this
	patch does not fix this, but it does fix a regression when disconnecting
	usb devices normally (by unplugging them for example).

	usbredir: Give devices a user friendly description
	Before this patch devices were described like this to the user:
	USB device at 2-14
	After this patch the description is:
	SanDisk Cruzer Blade [0781:5567] at 2-14

	usbredir: Drop our embeddied GUsb copy
	No that we no longer use GUsbSource we're hardly using any code from GUsb,
	so drop our embeddied GUsb copy and do the last few things (device
	enumeration through gudev) ourselves.

	usbredir: Remove spice_usb_device_manager_get main_context argument
	Now that we no longer use a GUsbSource this is no longer needed.

	Note this is a change to our public API, but that is ok since we have not
	yet done an official release with usbredir support.

	usbredir: Handle usb events from a thread
	This solves various latency issues with USB handling.

	usbredir: Add locking callbacks for libusbredirhost
	This is a preparation patch for handling usb packet completion in a
	separate thread.

2011-12-22  Hans de Goede  <hdegoede@redhat.com>

	usbredir: Create USB event source on demand
	This is a preparation patch for handling usb packet completion in a
	separate thread.

	usbredir: Use new libusbredirhost write flush callback
	The new (in usbredir-0.3.2) usbredirhost_open_full()
	function allows us to be notified whenever usb packets completing
	result in data to be send to the host. This removes the need for using
	g_usb_source_set_callback and seeing if there is data to write on
	any of the usb channels each time some usb event happens.

	This also bumps the minimum needed libusbredirhost version to 0.3.2

	usbredir: USB channels can not be read only
	A usbredir channel must always be bi-directional. spice-server
	allows only one client to connect even when in multi-client mode. Since
	usually there are multiple usb channels available, it is allowed for one client
	to use one channel, while another client uses another usb channel.

	usbredir: Stop setting private data explictly to NULL on init
	This is not necessary and as we get more private data it becomes
	unyieldly.

	spice-channel: Allow spice_msg_out_send to be called from multiple threads
	This is a preparation patch for handling usb packet completion in a
	separate thread.

	spice-channel: setsockopt TCP_NODELAY
	spicec does this for all channels, and it seems like a good idea to do the
	same in spice-gtk.

2011-12-22  Christophe Fergeau  <cfergeau@redhat.com>

	Disable vala bindings unless --enable-vala is used
	Currently, building vala bindings from a tarball is broken because
	spice-client-glib-2.0.deps is missing from the tarball. This commit
	adds it to EXTRA_DIST and also makes sure the vala bindings don't
	get built/installed unless --enable-vala has been passed to configure.
	This means vala must be installed to build the vala bindings from a
	tarball. Fixes fdo bug #44000.

	Revert previous vala-related commits
	They were work in progress and not meant to be committed, apologies
	for the noise :-/

	Only install vala bindings when using --enable-vala

	More distcheck fixes

2011-12-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: ship vala files & fix make distcheck
	Disable usbredir, since it wants to install file in /.

	Disable vala for distcheck for 2 reasons: not needed after dist and
	binding build issue.

	Ship with spice-gtk-3.0 vala bindings

	https://bugs.freedesktop.org/show_bug.cgi?id=44000

2011-12-22  Christophe Fergeau  <cfergeau@redhat.com>

	Make path to the USB ACL helper configurable
	It's currently installed in $bindir, but this patch makes it possible
	for distros like fedora to install it in $libexecdir/spice/

2011-12-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: remove unused common/win/my_getopt

2011-12-22  Jani Välimaa  <wally@mageia.org>

	build: string format fix
	https://bugs.freedesktop.org/show_bug.cgi?id=44019

2011-12-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: depends on spice-protocol 0.9.1

	Support semi-seamless migration
	Yonit Halperin described the flow, that I followed:

	(1) when client_migrate_info is called SPICE_MSG_MAIN_MIGRATE_BEGIN is
	sent to the client.

	Then, the client should link to the target server (SpiceLinkMess),
	i.e., connect all the channels, but it shouldn't poll from the target,
	only from the source. You can refer to RedClient::Migrate class.  The
	connection id in the link message should be the id of the connection
	to the source server.

	(2) The client sends to the source server
	SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECT_ERROR)

	(3) When migration completes  SPICE_MSG_MAIN_MIGRATE_(END|CANCEL) is
	sent to the client.

	(3.1) In case of SPICE_MSG_MAIN_MIGRATE_CANCEL, the client closes the
	connections to the target.

	(3.2) In case of SPICE_MSG_MAIN_MIGRATE_END, the client should reset
	all the data that is related to the connection to the source and
	complete the transition to the target server (without sending
	ATTACH_CHANNELS, and without guest display initialization via agent).

	Then, the client sends SPICE_MSG_MAIN_MIGRATE_END to the target.

	main: Handle semi-seamless MIGRATION_BEGIN

	display: try to reuse exisiting primary surface

	Add channel_reset method
	This new private method is to reset the channel to its initial state,
	used by semi-seamless migration

	gio-coroutine: add a few more run-time checks

	Update protocol and messages for semi-seamless migration

2011-12-19  Marc-André Lureau  <marcandre.lureau@gmail.com>

	windows: initialize co->ret to not randomly release fiber

2011-12-18  Frédéric Péters  <fpeters@0d.be>

	add explicit links against libraries that are directly used

2011-12-16  Hans de Goede  <hdegoede@redhat.com>

	spice-channel: cleanup, remove spice_channel_send_msg()
	There are only 2 callers, both of which want it to do a different thing,
	making the callers do this directly allows us to remove
	spice_channel_send_msg(); and gets rid of the weirdness where we've a
	function which can be called in both co-routine and system context.

	spice-channel: Move read only check to spice_channel_write_msg()
	This is a preparation patch for removing spice_channel_send_msg().

	Note that this means that buffered writes won't get checked until they are
	actually send by the co-routine.

	spice-channel: Move setting of header->size to spice_channel_write_msg()
	Just a small cleanup patch.

	spice-channel: replace the xmit buf by a queue of SpiceOutMsg-s
	This has a number of advantages:
	-It significantly simplifies the code
	-It avoids memcpy-ing all the write data one more time
	-It avoids malloc / realloc / free of the xmit buffer
	 (this gets replaced by gslice alloc / free for the queue elements)

	Make sure spice_channel_iterate_write() always flushes *all* pending writes
	This patch changes 1 line, and fixes 2 bugs in this one line:
	1) We keep the xmit_buffer around for reuse (re-filling) later, so checking
	   if we've a xmit_buffer to determine wether we should do a write is wrong,
	   instead we should check if the xmit_buffer has data in it.
	2) If the write blocks, and we switch to another co-routine context, this
	   context may queue more writes, we check for this and throw away the
	   buffer we've been consuming when this happens, since the other context
	   will then have allocated a new buffer. But when this happens, we do *not*
	   consume the new buffer. So the queued data will not get transmitted
	   until the co-routine gets woken up by either another write, or by
	   receiving data to read.
	   This patch fixes this by changing the if to a while.

	Note that the code in question gets completely removed by the next patch in
	this series. As I noticed this while rewriting the code in question, still
	I decided to do a separate patch to fix this to:
	1) Document this issue in the old code
	2) Otherwise the move from the if to the while will happen in the new code
	   which may confuse readers of that patch.

	spice_msg_out[_send_internal]: Take ownership of the passed SpiceMsgOut
	All callers of spice_msg_out[_send_internal] unref the message immediately
	after calling spice_msg_out[_send_internal]. This patch changes the
	semantics so that spice_msg_out[_send_internal] takes ownership and it
	is responsible for unref-ing the passed in SpiceMsgOut.

	This is a preparation patch for changing the buffered write code
	to use a queue of SpiceMsgOut-s, rather then memcpy the message contents
	into an intermediate buffer.

	channel-smartcard: unref in flight messages as soon as they are sent
	This is a preparation patch for making spice_msg_out_send() take ownership
	of the passed in msg.

2011-12-15  Hans de Goede  <hdegoede@redhat.com>

	smartcard_message_complete_in_flight cleanup error checking
	smartcard_message_complete_in_flight should never get called if there
	is no message in flight (priv->in_flight_message != NULL).

2011-12-14  Hans de Goede  <hdegoede@redhat.com>

	spice-channel: cleanup, get rid of wait_interruptible variable
	The private wait_interruptible channel variable is not used anywhere,
	except in one test, which is useless since it never gets set.

	Disable mouse accelleration when grabbing the mouse (in server mode)
	Otherwise accel will be applied twice, once by the client and then once
	more by the guest. Unfortunately there seems to be no gdk / gtk API for this
	so this patch uses direct libX11 calls.

2011-12-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	windows: fix broken left shift
	On Windows, the received key when pressing left shift is VK_SHIFT 0x10

	Wrap in window, because windows doens't receive mouse events outside it

	windows: clip pointer when grabbed, so it stays inside widget

2011-12-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix crash on mouse server mode grab with gtk2
	With gtk3 gdk_cursor_unref = g_object_unref. But not with older
	version. Let's be consitent with the rest of the code and use
	cursor_unref().

	build: add missing smartcard manager in python binding
	Probably broken since the manually edited defs files have been removed

2011-12-10  Hans de Goede  <hdegoede@redhat.com>

	spice-widget: rename mouse_update to update_mouse_mode.
	We already have update_mouse_pointer and update_mouse_grab, so having
	a mouse_update function without specifying what "part" of the mouse handling
	it exactly updates is confusing, rename it to update_mouse_mode to reflect
	what it does and to match the other names.

	spice-widget: cleanup mouse handling.
	Some background on this patch, we currently behave
	as follows in server mouse mode:

	1) When spicy first connects, a frozen guest cursor is shown
	 (no mouse events are send to the guest) and the client cursor
	 is set to the standard right pointer,

	2) When one clicks on / inside the spice-widget, the mouse is
	 grabbed, the client cursor is hidden and the guest pointer
	 becomes alive (gets events).

	3) On ungrab we move back to state 1)

	Which is fine, but the code implementing it is somewhat convoluted.
	We have update_mouse_pointer(), which does more then just update the mouse
	pointer, it also calls try_mouse_grab(), and we've update_mouse_grab(),
	which calls update_mouse_pointer() rather then try_mouse_grab().

	* I. lets look at what we currently have in update_mouse_pointer(): *

	    case SPICE_MOUSE_MODE_SERVER:
	        if (!d->mouse_grab_active) {
	            if (gdk_window_get_cursor(window) != NULL)
	                gdk_window_set_cursor(window, NULL);
	        } else {
	            try_mouse_grab(display);
	        }
	        break;

	Now lets invert the test to make it more readable:

	    case SPICE_MOUSE_MODE_SERVER:
	        if (d->mouse_grab_active) {
	            try_mouse_grab(display);
	        } else {
	            if (gdk_window_get_cursor(window) != NULL)
	                gdk_window_set_cursor(window, NULL);
	        }
	        break;

	Hmm, so if we're grabbing the mouse, we try to grab the mouse
	-> does not make sense, esp not since try_mouse_grab() has:

	    if (d->mouse_grab_active)
	        return;

	So we can drop the else block.

	But why the if? Well that would be because when we're grabbing
	the windows should have a blank cursor. But where does that get set?

	The blank cursor gets set in do_pointer_grab(), by specifying a blank
	cursor as the cursor to show as long as the grab is active.

	Since that cursor will be active as long as we're grabbing, so we can
	drop the if (!d->mouse_grab_active) check as well.

	And with the mouse_grab_active check gone, we no longer need to call
	update_mouse_pointer() from try_mouse_ungrab().

	* II. lets look at update_mouse_grab() *

	So currently when the mouse should be grabbed according to the
	mouse-grab and disable-inputs properties, update_mouse_grab() calls
	update_mouse_pointer(), which as discussed above does nothing with the grab,
	as the code path calling try_mouse_grab() is dead code. The right thing to do
	would of course be to have update_mouse_grab() call try_mouse_grab() in this
	case.

	But, that would mean that as soon as the property is changed the cursor will
	get torn away from whereever it is and get grabbed, which may not always
	be desirable. To fix this this patch also moves the mouse_have_pointer
	and keyboard_have_focus checks from mouse_update() to try_mouse_grab()


	foo

2011-12-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix build issue because of double declaration
	Patch based on Mageia, provided by Olav Vitters.

	https://bugzilla.freedesktop.org/show_bug.cgi?id=43457

2011-12-09  Michael Chudobiak  <mjc@avtechpulse.com>

	use "connection" instead of "connexion"

2011-12-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Take the grab when mouse switching to client mode
	Only when the widget has the focus and the pointer is over the widget

	Do not send ungrab key sequence to the server

	Don't leak cursor shape objects

	Refresh mouse shape/visibility when changing mouse mode
	This fixes the dynamic mode changing when running/quitting the agent.

	Correctly hide client pointer (in server mode)
	The hide cursor event happen when the widget is not yet
	realized. Forcing realize may fail if the widget is not yet embedded
	for example. Instead, let's update the cursor whenever there is a
	draw().

	v2: do not call gdk_window_set_cursor() with the same cursor

	Document the pointer ungrab for drag-n-drop in multihead

	Draw mouse with cairo in server mode

	Ignore the first mouse click when taking the grab

	Grab on the display too
	Without this additional grab, the pointer grab was effective for the
	whole application

	Add a get_blank_cursor() helper

	Use the border margin from recalc_geometry()

	Do not send pointer motion of 0x0

	Warn with the connect connect socket error

	Fix controller with newer vala

2011-12-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: vapi bindings only available if HAVE_INTROSPECTION

	controller: use SPICE_XPI_NAMEDPIPE first

2011-12-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: do not clean spice-client-glib-2.0.deps

	build: fix linking with -Wl,--as-needed -Wl,--no-undefined etc..
	Mageia is using linker flags and miss symbols when linking.
	The error can be reproduced with:

	make LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags"

	Based on patch by Christophe Fergeau.

	https://bugs.freedesktop.org/show_bug.cgi?id=43416

2011-12-02  Hans de Goede  <hdegoede@redhat.com>

	usb-device-manager: Don't g_warning on autoconnect failure
	We already emit a signal for this, either the app using spice-client-glib
	listens to this signals and does something with it, or it is not interested
	in this happening, at which point logging a g_warning for it is not really
	useful.

	spicy: Don't show an error dialog on a cancelled device open
	If for example the user plugs in a new device, then gets the policykit agent
	authentication dialog and then unplugs the device, spice-gtk will cancel
	the acl-helper request, which in turn will dismiss the policykit agent
	authentication dialog. Which is all a nice and smooth user experience,
	except that when this happens spicy throws a dialog with an error
	that the open was cancelled. Since a cancel usually is done deliberately
	(such as on the user unpluging the device) no error dialog should be thrown
	for it.

	channel-usbredir: Call the acl helper without first trying to open the device
	Normally opening the USB device without first calling the helper will fail,
	except when the process using spice-gtk is running as root.

	So the current code which first tries to open the USB device before calling
	the helper is optimizing for an exception rather then for the default code
	path. More over it also causes libusb to print the following errors to stderr:
	libusb:error [op_open] libusb couldn't open USB device /dev/bus/usb/002/017: Permission denied.
	libusb:error [op_open] libusb requires write access to USB device nodes.

	So this patch changes things to first call the helper and only then try
	to open the device node.

	This patch also modifies the helper to not call policykit when called by
	a root process, since the set_facl which it will do, if policykit says it
	is ok, is a no-op for root anyways. Instead it directly returns a success
	status without doing anything when called by a root process.

2011-12-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	string formatting fixes
	Patch based on Mageia, provided by Olav Vitters.

	https://bugs.freedesktop.org/show_bug.cgi?id=43456

2011-12-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Move auto-connect logic in Audio base class

	Make UsbDeviceManager main-context a boxed property

2011-11-26  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Fix get_type() with --disable-smartcard
	It's quite a bad hack, but I can't think of anything really better

	Without this patch, g-ir-scanner introspection hangs with:
	GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion `boxed_copy != NULL' failed

	GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

	GLib-GObject-WARNING **: gsignal.c:1585: parameter 1 of type `<invalid>' for sig
	nal "SpiceSmartcardManager::reader_added" is not a value type

2011-11-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Do not send specific messages in read-only

	Check if msg are permitted to be sent in read-only

	Add read-only property on sessions
	It is useful to have a way to prevent sending commands in read-only
	sessions (think of multi-client)

	No clipboard sharing allowed in this case in gtk-session.

	Add disable-inputs on Spice widget

	cleanup: the try_grab() functions should take a SpiceDisplay

	Fix a few g-ir-scanner warnings

	Export spice_g_signal_connect_object
	The helper needs to be accessible from spice-client-gtk too.

	Regenerate map-file correctly
	We should use update-map-file instead of modifying it manually

2011-11-21  Hans de Goede  <hdegoede@redhat.com>

	Release our keyboard grab when we're going to invoke the usb acl helper
	The usb acl helper asks policykit, which may want to interact with the
	user through the policykit agent, which wants to grab the keyboard, if
	we then have the keyboard grabbed, the agent says authentication has failed,
	policykit rejects the helper opening up the acl and usbredir won't work.

	Unfortunately the only way to work around this is to temporarily release our
	own keyboard grab, not pretty but as discussed on irc, this is the "best"
	solution.

2011-11-16  Hans de Goede  <hdegoede@redhat.com>

	Add a suid root helper to open usb device nodes
	spice-client needs to be able to open the device nodes under /dev/bus/usb
	to be able to redirect a usb device to the guest. Normally opening these
	nodes is only allowed by root. This patch adds a suid root helper which
	asks policykit if it is ok to grant raw usb device access, and if policykit
	says it is ok, opens up the acl so that the spice-client can open the device
	node.

	As soon as spice-client closes the stdin of the helper, the helper removes
	the extra rights. This ensures that the acl gets put back to normal even if
	the spice client crashes. Normally the spice-client closes stdin directly
	after opening the device node.

	channel-usbredir: Make spice_usbredir_channel_connect async
	With the (upcoming) introduction of the usb device node acl helper, which
	uses policykit, spice_usbredir_channel_connect() may take a long time as
	it will be waiting for the helper, which will be waiting for policykit which
	may be interacting with the user -> Make spice_usbredir_channel_connect() async

	Note that this patch only changes spice_usbredir_channel_connect's
	API to use the standard GIO async API, it is not actually async after this
	patch since it does not yet call the acl helper.

	usb-device-manager: Make spice_usb_device_manager_connect_device async
	With the (upcoming) introduction of the usb device node acl helper, which
	uses policykit, spice_usbredir_channel_connect() may take a long time as
	it will be waiting for the helper, which will be waiting for policykit which
	may be interacting with the user. So spice_usbredir_channel_connect() will
	need to become async, and since spice_usb_device_manager_connect_device
	calls spice_usbredir_channel_connect it thus also needs to become async.

	Note that this patch only changes spice_usb_device_manager_connect_device's
	API to use the standard GIO async API, it is not actually async after this
	patch since spice_usbredir_channel_connect is not yet async.

	channel-usbredir: Move usb device opening into a helper function
	This is a preparation patch for adding the usb device node acl helper

	channel-usbredir: Do disconnect from dispose instead of from finalize

	channel-usbredir: Fixup and simplify #ifdef USE_USBREDIR handling
	glib does not like it when objects have a private data size of 0, so don't
	declare any private data when compiling without USE_USBREDIR set.

	Correct Since tag for SpiceSession:enable-usbredir:
	This was introduced post 0.7, and given the major changes done in git
	sofar the next release will be 0.8 rather then 0.7.1

2011-11-09  Christophe Fergeau  <cfergeau@redhat.com>

	Use correct GLib macros

2011-11-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Mark deprecated props/signals/functions

	Remove g_object_{set,get}_data() usage
	This is not really clean, as it may conflict with client usage

	Drop useless memset
	Private data in GObject's is initialized to 0's upon constuction

	Use G_PARAM_CONSTRUCT for property initial value

2011-11-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add missing include of spice-audio

	Add session enable-audio property
	Create audio channels only if enable-audio is TRUE

	SpiceAudio stream name default to get_application_name()

	Add spice_audio_get()
	We are going to deprecate spice_audio_new()
	some day. There are a few know problems:
	- SpiceAudio is an abstract class,
	  so it can't have a ctor
	- SpiceAudio should be a singleton,
	  associated with the session lifetime
	- SpiceSession should have a enable-audio property,
	  internal code should be able to access the audio object

	That way of getting the audio object is similar to the smartcard manager and usb manager.

2011-11-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Return NULL if taking screenshot fails
	It can happen if the display is not yet ready.
	This change just removes a couple of warnings.

	Fix package `SpiceClientGLib-2.0' not found

2011-11-02  Tiziano Müller  <tiziano.mueller@stepping-stone.ch>

	Correctly parse RFC-conform URIs separating the host and the arguments by a '/'
	Little patch to make spice-gtk accept RFC-conform URLs of the form
	"spice://host/?port=5901".

	I didn't add '/' to the list of the other characters to ignore (?;&)
	by intention since an URL like spice://host/?port=5901/somotherstuff
	should not be valid, resp. the password may contain '/' because the
	string is already unescaped at that point.

	Unfortunately glib does not seem to have functions to 'explode' an URI
	which would be really helpful.

	Cheers,
	Tiziano

2011-11-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk-session: add more checks

2011-10-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add missing spice-gtk-session.h in spice-widget.h

2011-10-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add vapi bindings generation

2011-10-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Fix missing dispose() chain-up

2011-10-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	do not segfault if link message header size is set to 0
	https://bugs.freedesktop.org/show_bug.cgi?id=41988

2011-10-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Add SPICE_NOGRAB environment variable for debugging

	gtk: channel-event emit an enum
	This doesn't break ABI, as int and enum are compatible at glib level.

	gtk: warn if argument is invalid instead of crash

2011-10-10  Hans de Goede  <hdegoede@redhat.com>

	Add spice-gtk-session-priv.h to make dist output
	Brown paper bag bug number 2 wrt spice-gtk-session-priv.h, sorry about this.

	Add missing spice-gtk-session-priv.h file
	This file was missing from the previous commit, my bad.

	Make auto-usbredir a session setting rather then a per display setting

	spicy: Stop using SpiceDisplay's deprecated clipboard methods

	SpiceDisplay: mark clipboard properties and functions as deprecated
	The SpiceGtkSession ones should be used instead.

	SpiceDisplay: Don't set auto-clipboard on construction
	The auto-clipboard setting now lives in the SpiceGtkSession, if that
	was changed to FALSE (from the default of TRUE) and later a SpiceDisplay
	was created for this session that would change it back to TRUE again because
	it would set it to its default from its constructor. This patch fixes this.

	Remove auto-generated .gitignore files from git
	Auto-generated files do not belong in git. Having these in git causes
	changes to them accidentally ending up in other commits.

	Fix compilation of python bindings
	This was broken by the addition of SpiceGtkSession.

2011-10-07  Hans de Goede  <hdegoede@redhat.com>

	decode-glz: Handle needing glz images before they have arrived
	With multi monitor guests, it is possible for a glz-image to refer to
	bits from another glz-image which has not arrived yet! This can happen
	because each monitor has its own display channel, and thus its own socket,
	but they share the glz dict. Thus things can arrive out of order, with a
	glz-image on display 1 arriving before the glz-image on display 2 which it
	refers too.

	This triggers the:
	g_return_val_if_fail(w->images[slot]->hdr.id == id - dist, NULL);

	In glz_decoder_window_bits(), which is what caused me to debug this, once
	the out order thing was clear, so was the fix.
	If w->images[slot]->hdr.id == id - dist is not true, we need to wait for the
	correct image to arrive.

	The out of order issue with multiple monitors can also trigger the
	g_warn_if_reached() in glz_decoder_window_resize(), so remove that.

	SpiceDisplay: Pass on notify signal from GtkSession for GtkSession properties
	Since some SpiceDisplay properties are now just a pass through to the
	equivalent SpiceGtkSession property, we also need to pass on the notify
	signal for these, so interested users can get notified of them changing.

	Use this in spicy to ensure that changes to SpiceGtkSession (and thus per
	session rather then per window) properties get reflected in all windows for
	a multimonitor guest.

	usb-device-manager: One instance per session instead of a singleton
	Since usb device manager keeps track of which usb channels there are and
	if they have usb devices attached there should be one usb-device-manager
	instance per session, rather then one global singleton.

	Tying the usb-device-manager to the session also allows us to get rid of
	spice_usb_device_manager_[un]register_channel and the need for SpiceDisplay
	to call these.

2011-10-06  Hans de Goede  <hdegoede@redhat.com>

	SpiceDisplay: Add a constructor and construction properties
	With SpiceDisplay now passing through auto-clipboard settings to
	SpiceGtkSession, it needs to have its SpiceSession and SpiceGtkSession
	private members initalized at construction time, as
	spice_display_set_property() gets called at construction time.

	Currently its SpiceSession and SpiceGtkSession are NULL when that
	happens leading to the g_object_set() calls in spice_display_set_property()
	triggering g_return_if_fail statements inside glib and rightly complaining
	loudly.

	This patch fixes this by making the SpiceSession and channel ID construction
	properties and passing them to the g_object_new call in spice_display_new.

	Move clipboard handling to SpiceGtkSession
	This fixes copy and paste with multi-monitor guests. There still is
	one small issue left with this patch, changing the setting for auto-clipboard
	in one spicy window, does not get reflected in the Options menu of the
	other spicy windows.

	This can be fixed by listening to the notify signal, this also requires
	SpiceDisplay to listen to property changes on its SpiceGtkSession and
	then do a g_object_set on itself to update its own property (and also
	emit its own notify signal.

	I'll write a separate patch for this.

	Add a SpiceGtkSession Class
	This initial commit of the SpiceGtkSession Class only adds the empty
	class and the 1:1 linkage to SpiceSession through 2 new private methods
	added to SpiceSession: spice_session_{get|set}_gtk_session.

	The following commits will move things which are currently per SpiceDisplay,
	but which really should be global, such as the clipboard, over to
	SpiceGtkSession.

2011-10-04  Hans de Goede  <hdegoede@redhat.com>

	Fixup some headers so that they include headers the depend up on.
	Otherwise they cannot be included unless other headers are included
	first (and in the right order).

2011-09-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: Add missing <package> and <c:include> in gir
	This is required for source-level binding, such as Vala.

2011-09-30  Hans de Goede  <hdegoede@redhat.com>

	spice_codegen: Always write a channels entry for an ifdef-ed channel
	Before this patch, if a channel is defined conditionally in spice.proto
	(because it depends on external headers like the smartcard channel),
	spice_codegen would write an entry to the channels array in
	spice_get_*_channel_parser which would only take up a place in the array
	if the ifdef condition is true, thus moving up all other intializers
	one place when it is not true. This was causing issues (crashes) when building
	spice-gtk with the combination of usbredir support enabled and smartcard
	support disabled.

	This patch fixes this by adding #else { NULL, 0 }, to the generated code.

	Thanks to coolper chen <lixin.chen@saicocch.com> for reporting this!

2011-09-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: move G_DEFINE_BOXED in glib-compat.h and fix build with old glib

	pulse: use spice_g_signal_connect_object
	Disconnect all handlers when either emitter or observer is gone.
	That should help https://bugzilla.redhat.com/show_bug.cgi?id=737202

	util: add spice_g_signal_connect_object
	This is a copy of telepathy-glib tp_g_signal_connect_object.

	That function allows to connect object's signals without
	having to worry much about emitter/observer lifetime.

	It handles automatic disconnection for us, no need to track
	all the handlers id. Nice!

2011-09-02  Hans de Goede  <hdegoede@redhat.com>

	gtk/Makefile.am: Better explicit deps fro autogenerated files
	Auto-generated files need explicit deps on them to ensure things
	are build in the right order when doing things like make -j200:
	1) We had an explicit deps on spice-marshal.h, but only for spice-channel.c,
	   but others need it to
	2) autogen.c files need autogen.h, note this is done in a separate make
	   statement, since the deps of the actual build rule are used during the
	   generation!
	3) Group all the autogen explicit deps together

	configure.ac: Update minimum required spice-protocol to 0.9.0
	This is needed for usbredir support.

	gtk/continuation.c: undef _FORTIFY_SOURCE earlier
	We need to undef _FORTIFY_SOURCE before our first include, so as to
	avoid the extra checks it does on longjmp which don't play well with
	our coroutine stuff.

	gtk/controller/Makefile.am: Add explicit rules for autogenerated files
	The autogenerated files are part of make dist, without these explicit
	rules doing "./autogen.sh && make dist" on a clean git checkout
	will fail because it wants them but does not know how to build them.

	gtk/Makefile.am: Remove a bunch of .c files from EXTRA_DIST
	automake is smart enough to add _SOURCES files to make dist's result even
	if there compilation is depending on an AM conditional, and we are already
	depending on this for the smartcard / usb files, so lets depend on it for
	the other ones too.

	gtk/Makefile.am: Don't include auto-generated files into make dist tarbal
	We have various files which are auto-generated which currently get included
	into the tarbal, yet they are part of CLEANFILES, so the first make clean
	removes them, which is rather weird. Use nodist_foo_SOURCES to make them
	not end up in the tarbal.

	generated_[de]marshallers[1].c, are special as autogenerating those on
	end user builds would mean requiring the end user to have pyparser installed,
	so we add them to EXTRA_DIST and remove them from CLEANFILES. It may seem
	weird to have them in nodist_... and then add them to EXTRA_DIST,
	but this patch also adds an explict depenency on the autogenerated files
	to the non autogerated ones:
	$(libspice_client_glib_2_0_la_SOURCES): spice-glib-enums.h

	Leaving generated_[de]marshallers[1].c in libspice_client_glib_2_0_la_SOURCES,
	would cause it to get a dep on autogenerated files, and thus get regenerated
	itself no matter what, defeating the purpose of having them in dist in the
	first place.

2011-09-01  Hans de Goede  <hdegoede@redhat.com>

	spice_usb_device_get_description fixups
	1) Fix spice_usb_device_get_description compilation when building without
	   usb support
	2) Don't return "Unknown" when the device param is NULL, the caller should
	   g_free the returned string, so we cannot return a const string
	3) Fix the existing callers to actually g_free the result of
	   spice_usb_device_get_description. To avoid code duplication this patch
	   makes usb-device-manager prefix the error it gets from the usbredir-channel,
	   so that users of the auto-connect-failed signal can use the error as is.

	usbredir: provide out own libusb_strerror for now
	libusb_strerror is not going upstream because of i18n worries, provide
	our own for now.

	usb-device-manager: Add a auto-connect-failed signal
	And use it in spicy to inform users of auto redirect failures (usually due
	to insufficient rights on the /dev/bus/usb device nodes).

	usb-device-manager: Add a spice_usb_device_get_description() method
	This is just a place holder for now. A better implementation requires
	gusb changes, and I hope there will be an official gusb release by the
	time I get around to fixing this up.

	Drop VOID:BOXED user marshaller
	We were generating a user marshaller for VOID:BOXED, but there is a standard
	marshaller for that, use that instead.

2011-08-31  Marc-André Lureau  <marcandre.lureau@redhat.com>

	doc: various improvements

	doc: update to include USB redirection

2011-08-30  Hans de Goede  <hdegoede@redhat.com>

	Remove spice-client-gtk.defs from git (as it is auto-generated)
	spice-client-gtk.defs gets autogenerated (but only when building for
	gtk2). Having it in git means having to keep it in sync with the public
	API manually, which requires doing a gtk2 build before committing each
	time one makes changes to the public API.

	As with any autogenerated files, this really does not belong in git,
	removing it from git removes the need for the manual syncing.

	Also add it to make clean, and change gtk/Makefile.am so that
	the contents on EXTRA_DIST don't depend on how ./configure was run
	making "make dist"-s result depend on ./configure flags is not a good idea.

	Remove gtk/.gitignore
	gtk/.gitignore gets autogenerated and thus should not be part of git.

	It currently being part of git is esp. annoying since depending on
	wether you're building for gtk2 or gtk3, lines like:
	/SpiceClientGtk-2.0.gir
	/SpiceClientGtk-2.0.typelib
	/libspice-client-gtk-2.0.la

	Keep disappearing from it, leading to these changes accidentally
	getting included into whatever commit your working on.

	spice_gstaudio: s/SpiceGstAudio/SpiceGstaudio
	We should either have SpiceGstAudio && spice_gst_audio or
	SpiceGstaudio && spice_gstaudio, not SpiceGstAudio && spice_gstaudio
	like we have today. This patch fixes this by replacing SpiceGstAudio
	with SpiceGstaudio. We can do this since this is only used internally.

	Rename my_foo private datatypes to MyFooPrivate
	We were using the gobject standard notation of MyFooPrivate everywhere
	except for 3 places, this brings these 3 into sync, with what we do elsewhere.

	Add auto_usbredir property to spice-widget

	spice-session: at a spice_session_has_channel_type method

	Add an USB device manager

	Add an usbredir channel

	Add a private copy of gusb
	While working on usb redirection support for spice-gtk I needed some
	code to integrate libusb into glib's mainloop amongst other things. I ended
	up borrowing code from colord for this. Richard (the colord author) and I
	quickly agreed that doing generic glib bindings for libusb is a good idea,
	akin to the gudev bindings for libudev we've called our WIP on this gusb:
	https://gitorious.org/gusb

	Since this very much is a WIP, the API is nowere near stable, so for now
	we bundle a copy of this code with spice-gtk. When gusb has an official
	release out the door with a stable API we should switch to that.

	spice.proto: Add usbredir channel

	spice-channel: Reset SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION on disconnect
	Our disconnect handler clears the common_caps array so that a new
	connection starts with a clean slate. But in our constructor we set
	the SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION in common_caps as starting
	cap. Do the same on disconnect, so the behavior of a re-using a channel
	after disconnect is the same as using a fresh channel.

2011-08-17  Hans de Goede  <hdegoede@redhat.com>

	spice-channel: fix writing a byte twice when a write blocks
	When a write blocks, and thus ret == -1 (and the gerror matches EAGAIN) we
	still do offset += ret, causing the last written byte to be send twice.
	Lets not do that :)

	spice-widget: release_keys on focus out
	This fixes alt getting stuck in the guest when the user alt-tabs away from the
	spice-widget (thus making it see the alt press but not the release) and then
	closing it without giving it the focus back (by using the windows close button
	for example).

	Note that doing this on focus out (when we know we may be missing key releases
	afterwards) makes a lot more sense then doing this on focus in, and with
	the release_keys on focus out I don't really see a reason any more to do it
	on focus in. But I'm leaving it in on focus in just in case, it certainly
	cannot hurt there.

	spice-widget: remove keyboard_grab_count / keyboard_grab_time hack
	With the filtering of focus in / out events caused by grabs we should no
	longer need this.

	spice-widget: ignore focus in / out events caused by keyb ungrab/grab
	As documented in XGrabKeyboard(3): "The XGrabKeyboard function actively grabs
	control of the keyboard and generates FocusIn and FocusOut events."

	Note that for some reason this only happens when we call XGrabKeyboard
	from our enter_event / leave_event callbacks and not from our focus_in /
	focus_out callbacks? Either way we still need to filter these out.

	Filtering these out fixes 4 issues:
	1) keyboard_have_focus now no longer gets unset when the keyboard is grabbed,
	   making USB auto redirection when focussed actually work
	2) Before this patch, if you pressed alt and then (accidentally) moved the
	   cursor out of the spice-widget window before pressing a second key,
	   the focus in event would clear the keyboard status causing the guest to no
	   longer see alt as pressed and register the second key press as a regular
	   keypress rather then as alt-foo.
	3) It allows us to remove the keyboard_grab_count / keyboard_grab_time hack
	   from try_keyboard_grab, although since we are no longer doing an
	   ungrab on focus out, this likely could have been removed before.
	   I will do this in a separate patch for easier reverting if necessary.

	spice-channel: Fix a possible race triggered by spice_channel_iterate_write
	Fix a race between spice_channel_buffered_write and
	spice_channel_iterate_write.

2011-08-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	data: fix spicy.nsis.in to include right libraries

	build: fixes build with gtk3 on win32

	build: warn and instruct if valac is missing

	gtk: implement coroutines using Windows fibers

2011-08-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	use _setjmp/_longjmp to speed up coroutine switching
	As described in http://www.1024cores.net/home/lock-free-algorithms/tricks/fibers

2011-07-29  Christophe Fergeau  <cfergeau@redhat.com>

	mjpeg: don't leak last stream image
	When a stream is destroy, the memory allocated to handle the mjpeg
	decoding is freed by calling stream_mjpeg_cleanup. However, the
	memory allocated to contain the last uncompressed stream image
	wasn't freed.

	mjpeg: remove wrong g_return_if_fail
	After calling jpeg_read_scanlines, spice-gtk checks that we read
	the amount of lines we expected, and if not, it returns early.
	This is doubly wrong:

	* jpeg_read_scanlines is documented as returning at most the number
	of lines requested, but it also warns that an application shouldn't
	rely on getting exactly the number of scanlines requested. In this
	case, if rec_outbuf_height is bigger than 1, we'll get a short read
	on the last line of odd-sized images, thus triggering the
	g_return_if_fail

	* returning from this function without calling jpeg_abort will cause
	libjpeg to abort next time we use it because jpeg_start_decompress
	was called before

	This commit removes this check and early return.

	mjpeg: restrict use of i and j
	Using i and j as variable names that are used from one loop to the
	other isn't really readable, and makes the code more fragile than
	it could be. This commits adds a "lines_read" variable which is more
	expressive than "j", restricts "j" lifetime to the loop where it's
	used, and it removes the "i" variable and uses counters provided
	by libjpeg to iterate all the image lines.
	It also has the side-effect that if jpeg_read_scanlines returns a short
	read (less lines than expected are read), "dest" won't go out of sync but
	will be set to the right place at the end of the loop.

	mjpeg: properly abort decompression in error path
	spice-gtk jpeg decompression code honors libjpeg's recommended size
	for its output buffer to improve performance. However, when this
	recommended size is too big, it just gives up on the decompression
	process by returning early from the function. But since
	jpeg_start_decompress has been called to compute this recommended
	size, the decompression must be aborted before returning, otherwise
	libjpeg will get in an inconsistent state and will abort next time
	we try to use it.
	This commit also moves the check that the recommended size isn't
	too big out of the decompression loop because it shouldn't changed
	during decompression.

2011-07-28  Christophe Fergeau  <cfergeau@redhat.com>

	fix integer marshalling helpers on big endian
	They were trying to convert the destination pointer to an integer before
	trying to dereference it. The initial conversion was meant to be a cast
	to a pointer of the right size, not to an integer.

	fix typo in big endian code path
	uint63_t should be uint64_t

2011-07-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix libtool versionning
	As pointed out by Daniel P. Berrange:
	"Arrggh !  There's a typo there. You want '-version-info' not
	'-version-number'.   The latter directly sets the major/minor
	soname values hence why you keeping seeing incompatible versions :-("

2011-07-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Release v0.7

	build: update library version
	client-glib interfaces have been changed or added, but binary compatibility has been preserved, change to current+1:0:age+1

	client-gtk updated code, same API: increment revision.

	build: fix make distcheck

	build: fix introspection warnings
	The only one left is related to GOptionGroup, which is not boxed.

	gtk/controller: fail if SPICE_XPI_SOCKET is not provided
	Instead of trying to connect to a '(null)' socket.

2011-07-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: snappy/spicy-stats move connection option to main group

	gtk: update spicy to use new option API

	gtk: add spice_get_option_group()

	gtk: add color-depth and disable-effects options

2011-07-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add spice_strv_contains in util-priv.h

	build: fix .pc Requires

2011-07-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: avoid doing GdkWindow operations if widget is not realized

	gtk: honour CURSOR_FLAGS_NONE by hiding cursor

	gtk: comment channel_new() returns a weak reference
	And add a few sanity checks.

	gtk: add glz_decoder_window_clear, to recycle decoder

2011-07-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: rework widget destroy/dispose()
	Make sure to remove handlers during dispose.
	Destroy is purely a gtk+ thing, so let the widget do the job.

	This solves a refcount/crash issue found with virt-manager.

2011-07-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/doc: improve the generated gtk-doc a bit

	Merge remote-tracking branch 'teuf/master'

2011-07-13  Christophe Fergeau  <cfergeau@redhat.com>

	document SpiceSession properties

	smartcard: add smartcard API doc

2011-07-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/spicy: remove false warning

2011-07-12  Daniel P. Berrange  <berrange@redhat.com>

	gtk: remove double symbol definition

	gtk/pulse: fix memory leak

2011-07-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/spicy: allow setting color depth

	gtk/spicy: add disable-effects option

2011-07-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/smartcard: make smartcard init async

	gtk: add SPICE_CLIENT_ERROR

	gtk/debug: put package version in session_init

2011-07-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: remove surface cache, why do we need it?

2011-07-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/channel-cursor: refcount display_cursor, make explicit the life of rgba

	gtk/smartcard-manager: remove useless trailing ;

2011-07-05  Christophe Fergeau  <cfergeau@redhat.com>

	cursor: don't leak uncached cursors
	When the cursor channel creates a new cursor, if the message
	indicates not to cache it, the cursor is leaked after being used.
	This commit fixes that, though I'm not really satisfied with it.

	==22568== 378,432 bytes in 162 blocks are definitely lost in loss record 7,699 of 7,699
	==22568==    at 0x4A0649D: malloc (vg_replace_malloc.c:236)
	==22568==    by 0x4E624CF: spice_malloc (mem.c:88)
	==22568==    by 0x4E4F1C4: set_cursor (channel-cursor.c:323)
	==22568==    by 0x4E4FA29: cursor_handle_set (channel-cursor.c:469)
	==22568==    by 0x4E4FD19: spice_cursor_handle_msg (channel-cursor.c:548)
	==22568==    by 0x4E30292: spice_channel_recv_msg (spice-channel.c:1641)
	==22568==    by 0x4E3062A: spice_channel_iterate_read (spice-channel.c:1776)
	==22568==    by 0x4E307F9: spice_channel_iterate (spice-channel.c:1820)
	==22568==    by 0x4E30EE4: spice_channel_coroutine (spice-channel.c:1968)
	==22568==    by 0x4EE48A2: coroutine_thread (coroutine_gthread.c:77)
	==22568==    by 0x302E4683A5: g_thread_create_proxy (gthread.c:1955)
	==22568==    by 0x302C807AF0: start_thread (pthread_create.c:305)

2011-07-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: s/SmartCard/Smartcard/g

	gtk: total-read-bytes is ulong
	As pointed out by Christophe on the ML.

2011-07-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: remove warning if !USE_SMARTCARD

	Merge commit 'refs/merge-requests/16' of ssh://gitorious.org/spice-gtk/spice-gtk into merge-requests/16

2011-07-02  Alon Levy  <alevy@redhat.com>

	gtk: add spicy-stats test app

	spice-channel: add property total-bytes-read

	spice-channel: export spice_channel_type_to_string

2011-07-01  Christophe Fergeau  <cfergeau@redhat.com>

	prepend smartcard cmdline options with --smartcard
	This is consistent with what spicec does, and is also less
	confusing since other certificates can be passed on the command
	line (for client/server host authentication).

	add --smartcard option to spicy
	People starting spicy will not always want their smartcard data
	to be forwarded to the guest they're connecting to. Currently,
	smartcard events are unconditionnally forwarded to the server if
	spicy was compiled with smartcard support. This commit adds a
	--smartcard option that must be used in order to enable smartcard
	support in the client. By default, smartcard data won't be forwarded
	to the server unless this option is specified.

2011-06-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/smartcard: make cacard dependency optional without breaking API

2011-06-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/smartcard: remove g_assert

2011-06-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	TODO: update

	build-sys: fix disable-smartcard broken earlier

2011-06-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/smartcard: add a couple of debug

	gtk/smartcard: simplify a little spice_smartcard_manager_init_libcacard

2011-06-23  Christophe Fergeau  <cfergeau@redhat.com>

	use new @ifdef directive for smartcard messages
	We don't want to conditionally compile the smartcard messages
	depending on whether USE_SMARTCARD is set or not, we can now use
	the @ifdef attribute for that.

	handle @ifdef on messages and channels

	allow attributes on channel elements in .proto files
	We want to be able to add an @ifdef annotation to optional messages
	For example, we want to compile in the smartcard messages only if
	libcacard is available

	add ifdef/endif methods to spice code generator
	These methods will be needed to be able to make some fields optional
	in spice.proto

	fix compilation when libcacard isn't installed

	set menu actions sensitivity for software smartcards
	Make sure menu actions are only sensitive when we are using a
	software smartcard reader, and properly update the sensitivity
	depending on the presence or not of a software smartcard in the
	software reader.

	add smartcard actions to spicy
	Add code to add/remove a software smartcard in spicy UI. These
	2 entries were added as items in the Input menu. They are not
	grayed out for now if there is no software reader available.

	add software smartcard reader support

	use user-provided certificates when init'ing libcacard

	read certificate information from command line
	When using a software card reader, one needs to pass 3 certificates
	to be used to simulate the smartcard (and optionnally the path to
	a certificate database). This commit adds support for --certificates
	and --certificate-db command line options to do that.

	add smartcard properties to SpiceSession
	To handle software smartcards, we need to be able to pass the
	certificates to use for the smartcard as well as the database where
	these certificates can be found. This commit adds "certificates"
	and "certificate-db" properties to make this possible.

	handle smartcard channel in SpiceWidget

	handle smartcard channel in spice_channel_new

	initialize libcacard

	don't always serialize messages sent to the server
	The communication between spice clients and servers on the smartcard
	channel can be initiated either by the client or by the server.
	It's initiated by the client for smartcard reader events (reader
	hot(un)plug, card insertion/removal), or it can be initiated by the
	server when it wants to query the certificates available on the
	smartcard.
	When communication is initiated by the client, we want to serialize
	the messages we sent, ie we don't want to send a message if we
	haven't received yet the answer to the previous message.
	However, when it's the server which initiates the communication,
	we don't want to use this serializing mechanism.

	This commit adds a "serialize_msg" boolean to be able to disable
	message sending serialization as needed.

	forward APDU requests from server to smartcard reader
	These requests are sent by the server when trying to read the
	certificates from the smartcard.

	handle messages from spice server

	serialize sending of smartcard channel messages
	Messages sent to the spice server by the smartcard channel have to
	be serialized: before sending a message, the channel has to wait
	for the server answer to the previous message. Add a GQueue to be
	able to queue several messages to the server while we wait for the
	answer to an earlier message.
	I think the reason why that serialization is needed is to be able
	to deterministically assign IDs to readers on reader addition. We
	have no way to match a message from the spice server with the
	message to the server that triggered this reply, which means that
	if we could send several reader additions to the server without
	waiting for answers, when the server answers, we wouldn't know
	which reader it's trying to assign an ID to.

	send messages to spice server on reader/card events

	add basic callbacks for smartcard events
	Now that the smartcard manager sends event for smartcard readers,
	the smartcard channel has to do something with them. For now, we just
	add basic callbacks which don't try to forward these events to the
	spice server. However, we start adding the glue needed to handle
	the fact that plugging of smartcard readers and creation of these
	readers in the spice server will be asynchronous.
	After receiving a "reader addition" command, the spice server sends
	back an ID to identify this reader which must be used in all other
	requests (card insertion, removal and reader removal) to identify
	this reader. However, if the server is slow to send back this ID,
	there's a window when we can get additional events for the reader
	that is being added that we can't send right away to the server
	because we don't know the ID to use. That's why we add the various
	pending_* hashes in this commit, to be able to keep track of the
	requests that will have to be sent once the spice server has
	assigned an ID to the reader.

	add smartcard bits to spice.proto

2011-06-22  Christophe Fergeau  <cfergeau@redhat.com>

	emit signals in reaction to libcacard events

	add signals for smartcard events
	Add signals which will be emitted when a reader appears/disappears,
	or when a smartcard is inserted/removed.

	add boxed type for VReader
	VReader is a type defined in libcacard which contains all the
	information we need ot handle card readers. Since it's refcounted,
	we can make it a boxed type for use in signals.

	add smartcard monitor GSource
	This source gets events from libcacard and inserts them into
	a regular glib mainloop. The smartcard manager will then emit
	signals in reaction to the events it got from libcacard.

2011-06-22  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build-sys: some minor cleanup

2011-06-22  Christophe Fergeau  <cfergeau@redhat.com>

	add --enable-smartcard configure flag

	add smartcard channel and smartcard manager skeletons

	improve debug log on coroutine start

	factor base message handling in SpiceChannel
	Currently, every channel has to define all the server messages it
	handles, including the "generic" ones. Since it's error prone (easy
	to forget the handling of default messages in new sources), it's
	better to move this handling to the base channel class, and to call
	the parent method when the message is unknown in the ::handle_msg
	method.

	On top of this, another factoring that can be done is to make the
	message handling function generic instead of reimplementing it in
	every class. Each class would only have to register its own
	(class-specific) set of handlers.

	Conflicts:

		gtk/channel-playback.c
		gtk/channel-record.c

	display more options in default --help
	When running spicy --help, very few options are shown. I didn't
	notice at first that it was possible to specify the spice server
	host/port/... showing them in the default help output should make
	these options more obvious.

2011-06-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: get rid of duplicated channel_desc table

	gtk/gstaudio: add volume control support

2011-06-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/audio: announce volume capability

	add git .mailmap

	gtk/pulse: add volume control support

	common: add volume messages

	spice.proto: updated with volume messages

	playback/record: add audio volume properties

2011-06-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/controller: add accel menuitem property

	gtk/controller: change namespace to SpiceCtrl

2011-06-17  Christophe Fergeau  <cfergeau@redhat.com>

	gtk/spicy: fix buttons in connect dialog
	Use proper button order (confirmation should be bottom right) and
	use a "Connect" button instead of "Ok".

2011-06-14  Alon Levy  <alevy@redhat.com>

	channel-display: destroy_stream: fail if streams is NULL

2011-06-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/controller: fix connection events on namedpipe
	Strangely, Wine was working fine with the NamedPipe handle itself.

	But WinXP wants the Event handle, obviously.

2011-06-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/controller: build win32 controller pipe name

2011-06-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: rule out clicks in outside region
	Not so great change: we should have a grab on the pointer when
	pressing, to receive the release event even if outside the
	region. Unfortunately, grabs are single widget for now.

	gtk: oops, forgot to put signal detail first

2011-06-08  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk/widget: keep a ref on the session
	This is to make more explicit that the session isn't owned by the
	widget display, but rather shared.

	Also, it makes it easier to deal with dispose() since there is
	explict referencing.

	gtk/session: allow spice_session_disconnect() to be called several times

	gtk/channel: add more runtime check, and make sure any pending idle associated are removed

2011-06-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Merge commit 'refs/merge-requests/14' of ssh://gitorious.org/spice-gtk/spice-gtk into merge-requests/14

2011-06-07  Christophe Fergeau  <cfergeau@redhat.com>

	add really basic GDK GnomeRR backend
	It doesn't know about available resolutions, nor about clones,
	rotations, ..., it can't trigger resolution changes, but hopefully
	it will be enough for basic GnomeRR support in the mac port.

	configure.ac: add defines for windows and osx
	Check for gtk+-win32/gtk+-osx to know when we should define
	HAVE_WINDOWS/WITH_DISPLAY_WINDOWS and HAVE_QUARTZ/WITH_DISPLAY_QUARTZ

	This is better than the old scheme that blindly tried to detect
	libx11, and chose between x11/windows depending on only this
	test.
	We probably should check that only one of windows/x11/quartz is
	enabled at once.
	NB: for now the QUARTZ defines are not used since we will be
	using a generic GnomeRR backend instead of having our own
	OSX backend.

	configure.ac: only check for X11 libs on X11 builds
	No need to try to detect xrandr or xkb headers when we won't be
	doing an X11 build. This is even detrimental on Mac OSX when
	we want to attempt a native build but have the xkb headers installed.

	configure.ac: simplify --with-x11 processing a bit

	configure.ac: improve X11 detection
	Use gtk-x11-[23].0.pc to detect whether we want an x11 build or
	not. Don't AC_SUBST X11_CFLAGS and X11_LIBS since they are unused.

	configure.ac: group all X11 checks
	Gather all x11 related checks in the same place

2011-06-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/win32: interecept low level keys - fix alt-tab and such

	gtk: improve gstaudio backend
	Do not timestamp gst audio buffers, since they are continuous anyway
	and it fixes directsoundsink stuttering

	Also, add a new SPICE_GST_AUDIOSINK environment variable to play with
	sink parameters

	build/win32: they broke libjpeg again

2011-06-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/win32: gtk maps LAlt & LCtrl to Alt and Ctrl keycode, but they are missing from keymaps.csv

2011-06-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: update spicy.nsis installer

2011-06-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix windows build with recent mingw64

2011-06-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: remove unused c++ check

	gtk/spicy: add rudimentary grab-sequence configuration setting

2011-05-28  Christophe Fergeau  <cfergeau@redhat.com>

	fix miscellaneous memleaks
	Fix various memleaks that were reported by valgrind.

	plug a memleak in ChannelMain::_channel_new
	ChannelMain::_channel_new was leaking memory in an error path.
	Unconditionnally free the used memory, which has the added benefit
	of making the code simpler.

2011-05-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: load ca-file if SPICE_SESSION_VERIFY_SUBJECT
	Fix SSL verify to work like spicec, not sure what I am doing there, but it works.

	gtk: update python binding generated file

	gtk: log spice-gtk version when creating a session

2011-05-25  Christophe Fergeau  <cfergeau@redhat.com>

	fix make distcheck

	make perl-Text-CSV optional for tarball builds
	Ship the files generated using perl-Text-CSV in the tarball so that
	end-users (as in "people compiling from a tarball") won't need to
	have perl-Text-CSV installed.

2011-05-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/spicy: free some more objects when quitting

2011-05-25  Zeeshan Ali (Khattak)  <zeeshanak@gnome.org>

	Connect on recent connection item activation
	Now (commit 27df918) that we already gather connection information when
	user (single)-clicks a recent connection item, we can safely use the
	selected recent connection when user activates (double-clicks) it.

	RecentChooser should act on single-click
	Fill-in the connection dialog fields as soon user selects a recent
	connection.

	Minor coding-style fix
	Don't use mix of tabs and spaces.

	Get rid of redundant argument

	Minor clean-up
	Prefer 'if/else' over 'switch' when dealing with only 2 possibilities.

2011-05-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Merge branch 'merge-requests/11'

2011-05-25  Christophe Fergeau  <cfergeau@redhat.com>

	sync protocol files with spice

	remove duplicate headers from Makefile.am
	Headers needed for map-file generation were listed twice, once in
	libspice_client_glibinclude_HEADERS and once in _SOURCES. It's ok
	to only have them in _HEADERS. Order channel names alphabetically
	while I'm touching this part of Makefile.am

	remove G_GNUC_CONST from get_type functions
	These functions call g_type_register_* the first time they are
	called which is not G_GNUC_CONST so this attribute can't be used
	here. This had the side effect of making these functions not appear
	in sym-file after running make update-sym-file.

2011-05-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add SSL ciphers session property

	THANKS: update

	Merge commit 'refs/merge-requests/10' of ssh://gitorious.org/spice-gtk/spice-gtk into merge-requests/10

2011-05-23  Christophe Fergeau  <cfergeau@redhat.com>

	add const to arrays in marshalling functions

	fix copy & paste error in ptypes.py

	remove duplicate #include

	fix wrong comment in spice_spice_channel_send_msg

	s/interruptable/interruptible

2011-05-23  Daniel P. Berrange  <berrange@redhat.com>

	Fix missing OS-X keymapping for letter 'A'
	The keymap-gen.pl script was not correctly distinguishing
	keycodes with a value of '0', from undefined keycodes. All
	were skipped. This meant that the mapping for OS-X ANSI_A
	key was lost (since it has value 0).

	For similar reasons the XQuartz mapping for the letter A
	was also lost.

	* src/keymap-gen.pl: Fix handling of 0 vs undef for keycodes
	* src/keymaps.csv: Remove bogus 0x0 entry in OS-X keymap

	Add missing keytable entry for KEY_KATAKANAHIRAGANA
	* src/keymaps.csv: Add XT code for KEY_KATAKANAHIRAGANA

2011-05-23  Christophe Fergeau  <cfergeau@redhat.com>

	include stddef.h in continuation.h
	It uses size_t so it needs it to get a definition for this type.
	If it's not there, this causes build breakage on OS X

2011-05-23  Attila Sukosd  <attila.sukosd@gmail.com>

	define MAP_ANON as MAP_ANONYMOUS if needed
	Mac OS X doesn't have MAP_ANONYMOUS, only MAP_ANON, so use MAP_ANON
	when MAP_ANONYMOUS isn't defined.

2011-05-23  Christophe Fergeau  <cfergeau@redhat.com>

	ssl_verify: include <string.h>
	ssl_verify.c is using memcmp which comes from string.h, this was
	breaking compilation with -Werror -Wall on Mac OS X

	link with gthread when appropriate
	The corouting gthread code and spicy are using gthread functions
	but were no linked against the gthread library. This causes build
	failures on older glibs where gthread isn't mandatory when using
	glib.

	gnome-rr: use g_object_notify instead of g_object_notify_by_spec
	The latter was added in glib 2.26, and we only require glib 2.22

2011-05-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	display: fix build error GLib <2.26
	https://bugs.freedesktop.org/show_bug.cgi?id=37443

2011-05-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/controller: correctly close namedpipe after calling close()

	gtk/controller: add some missing clean up of namedpipe

	gtk/controller: forgot to dispose stream as well

	controller: stick to 2.22 API

2011-05-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix build with latest mingw

2011-05-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/controller: got NamedPipe basic working

2011-05-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/controller: start NamedPipe support (compile with mingw32)

2011-05-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: restore correctly UI elements visibility state

2011-05-10  Zeeshan Ali (Khattak)  <zeeshanak@gnome.org>

	gtk: some code cleanup

2011-05-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: spicy - leave fullscreen when grab sequence is pressed
	Workaround since accels are now disabled.. Ideally we either have a
	different key sequence or we use Vinagre UI

	gtk: fix spicy grab key sequence

	gtk: warn on invalid key sequence

	gtk: add grab-keys-pressed signal

	gtk: don't ungrab keyboard on focus-ous
	Mainly to avoid the crazy loop:
	focus-in > grab -> focus-out -> ungrab -> focus-in
	on kde & gnome-shell.

	gtk: keyboard handling improvements
	- spicy: disable accels/mnemonics when grabbed

	gtk: extra check only compiled if !NDEBUG

2011-05-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: get rid of a useless warning

	gtk: return RGB -> BGRX color conversion for non-turbo jpeg

2011-05-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: use faster jpeg decompression by default

2011-05-08  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk: warn if received invalid frame timestamp

2011-05-07  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk: speed up mjpeg decompression
	Remove custom rgb->argb functions, and remove fancy post-proc (which I
	don't think were applied, but we now do the same as spicec)

	gtk: sync audio with gst backend

2011-05-06  Marc-André Lureau  <marcandre.lureau@gmail.com>

	build: update README with depedencies

	gtk: warn unsupported channel type with a description

2011-05-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: adjust overall playback latency to 100ms
	The previous parameters didn't adjust overall latency.  Adjusted to
	100ms overall latency lower cpu load, and improve video flickering

	(damn /me suck at PulseAudio client-side...)

2011-05-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix SASL auth failed
	Signal correctly to the client that AUTH failed.

	Before, we only had a IO error on channel disconnection.

2011-05-03  Zeeshan Ali (Khattak)  <zeeshanak@gnome.org>

	configure.ac: Use gtk+ 3.0 be default
	Hi Zeeshan!!

2011-05-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	TODO: fix wrong mouse ungrabbing for dragndrop

2011-04-27  Christophe Fergeau  <cfergeau@redhat.com>

	configure.ac: remove setting default C(XX)FLAGS
	automake/autoconf already set them for us to -g -O2 if there are
	no flags defined.

	configure.ac: use AC_LANG_SOURCE
	Recent autoconf complains when AC_COMPILE_IFELSE is used without
	using AC_LANG_SOURCE to generate the code snippet to compile. Add
	the missing AC_LANG_SOURCE call to SPICE_CC_TRY_FLAG to make it
	quiet.

	configure.ac rework introspection detection
	When running autogen.sh without having gobject-introspection, this
	should give a slightly nicer error message. It currently errors out
	with
	gtk/Makefile.am:450: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL

	After the patch the error will be
	checking for GOBJECT_INTROSPECTION... yes
	./configure: line 21307: syntax error near unexpected token `0.6.7'
	./configure: line 21307: `GOBJECT_INTROSPECTION_CHECK(0.6.7)'

2011-04-18  Christophe Fergeau  <cfergeau@redhat.com>

	spicy: disable Ctrl+W/Close keyboard shortcut
	The keyboard shortcut for the Close gtk action isn't disabled,
	which leads to spicy closing when trying to use Ctrl+W in the guest.
	All other problematic shortcuts are disabled, but in this case the
	disabling was commented out. Reenable it to prevent people from
	accidentally closing spicy when pressing ctrl+w

	spicy: fix keyboard shortcuts in comments
	The various action entries have a comment about the keyboard
	shortcut that is being disabled. However, all these comments were
	copied from the "Quit" action and were all referring to Ctrl-Q.
	This commit puts the right keyboard shortcuts in the comments

	spicy: remove non-needed keyboard shortcut disabling
	GTK_STOCK_CONNECT doesn't have an associated keyboard shortcut
	so there is no need to explicitly disable it.

2011-04-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	NEWS: update for v0.6

	TODO: update

	gtk/display: move some RANDR code to X11 file

	build: fix make distcheck

2011-04-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Merge commit 'refs/merge-requests/6' of git://gitorious.org/spice-gtk/spice-gtk into merge-requests/6

	gtk/map-file: fix spice_main_send_monitor_config function name

2011-04-11  Marc-André Lureau  <marcandre.lureau@gmail.com>

	gtk/controller: fix build with non-default arguments

2011-04-11  Christophe Fergeau  <cfergeau@redhat.com>

	gtk: fix "set but not used" gcc 4.6 warnings
	Since we are compiling with -Werror, this was breaking compilation.

2011-04-11  Alon Levy  <alevy@redhat.com>

	python_modules/codegen.py: fix indent error in an unused function

	demarshaller/marshaller fix gcc 4.6.0
	python_modules/demarshal.py and marshal.py fixes for gcc 4.6.0
	warning about set but unused variables. The fixes disable creating
	of variables mem_size when they are not used (demarshall) and
	declaring a src variable when the message doesn't use it (marshal).

	You need to touch *.proto after applying this (should add a Makefile
	dependency).

	codegen: avoid creating out if not used (fix gcc 4.6.0 warning)

	mingw32 build: python_modules/marshal: use unsigned for for_loop index variable

2011-04-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/spicy: do not show again toolbar when going full-screen, if mark received

	gtk: calling connect() on a connecting channel is fine
	This avoid problems where different display shares the same input
	channel and try to connect two times.

	gtk: allow to drag-and-drop between displays / windows

	gtk/controller: install spice-controller library

2011-04-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	common: fix build error of used uninitialized
	  CC     sw_canvas.lo
	cc1: warnings being treated as errors
	../common/sw_canvas.c: In function 'canvas_draw_text':
	../common/sw_canvas.c:1037:16: error: 'pos.x' may be used uninitialized in this function
	../common/sw_canvas.c:1037:16: error: 'pos.y' may be used uninitialized in this function
	make[4]: *** [sw_canvas.lo] Error 1

2011-04-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	TODO: update

	build: fix gtk/controller/Makefile valac line which had custom.vapi

	Merge commit 'refs/merge-requests/5' of git://gitorious.org/spice-gtk/spice-gtk into merge-requests/5

	gtk: don't send MonitorConfig after agent start
	We don't know yet what will be the guest previous configuration.

	Ie, what should we send otherwise? Current hardware configuration?
	This works badly with windowed mode, where we expect the same windows
	to be displayed on reconnection.

	gtk: introduce more complete spice_main_send_monitor_config()
	Since it's unclear yet how MonitorConfig should be used depending on
	use case (full-screen vs windowed) we prefer to make a public api so
	that the client implementation can send it when it is the most
	appropriate time.

	gtk: add disable-display-position

	gtk: remove unnecessary invalidate mark signal

	gtk: send FALSE mark when destroying the primary surface after 1s...
	This is similar to what is done in spicec.

	gtk: hide the cursor after setting it
	So that when we move the cursor again, we can show the right one

	gtk/spicy: hide the display if mark is FALSE

	gtk/spicy: update status of all windows

	gtk/spicy: only show window when we receive the mark

	gtk: not having a window is not critical, if the widget is not yet shown

2011-04-08  Hans de Goede  <hdegoede@redhat.com>

	gtk: fixup clipboard_by_guest tracking
	clipboard_by_guest tracking was used more or less for 2 things, to keep track
	if the agent has clipboard data ready to send, and to see if we have done a
	clipboard_set_with_data on behalf of the guest agent.

	This patch splits the tracking of the 2, fixing several issues:
	1) spice_display_paste_from_guest would not work if since receiving
	   the grab from the agent some other app has copied something to
	   the client clipboard.
	2) We would do a clipboard_clear unconditionally even if we were
	   not the clipboard owner in the client (iow some other app has
	   done a clipboard_set_with_data since out last one).

	This patch changes the meaning of the clipboard_by_guest boolean to just
	track if we've done a clipboard_set_with_data on behalf of the guest
	and are the last one to have a done a clipboard_set_with_data (iow we are the
	client os' clipboard owner). It adds a checks to clipboard_release to
	only call clipboard_clear if we are the current ownerm fixing 1).

	This patch uses nclip_targets to keep track of the agent having data
	available which we could paste, fixing 2).

	gtk: Clear hasdata when we do a clipboard_set_with_data
	When we call gtk_clipboard_set_with_data to set the client clipboard
	to the targets reported as available by the agent, the clipboard no
	longer has data in the sense that it has data which is interesting
	for spice_display_copy_to_guest, so clear clip_hasdata whenever we
	call gtk_clipboard_set_with_data,

	gtk: receiving a grab from the agent implies releasing our own
	By setting d->clip_grabbed[selection] to FALSE when we receive a grab from
	the agent, we can remove the weird "if (!d->clipboard_by_guest[selection])"
	check from clipboard_owner_change, and we fix spice_display_copy_to_guest not
	working in the following case:
	1) autoclipboard share disabled
	2) Copy something to the clipboard in the client
	3) Send it to the guest by calling spice_display_copy_to_guest
	4) Copy something to the clipboard in the guest
	5) Tried to send the client clipboard to the guest again by calling
	   spice_display_copy_to_guest (again).

	5) would not work because d->clip_grabbed[selection] would still be true in
	spice-gtk's view, where as the agent no longer sees the clipboard as grabbed
	by the client since it send a grab itself.

	gtk: use a separate var to keep track of self caused new clipboard owner events
	Also change 0/1 to FALSE/TRUE in touched code. spice-widget seems to be
	using all 3 of: 0/1 false/true and FALSE/TRUE for booleans. The glib convention
	is FALSE/TRUE.

2011-04-05  Hans de Goede  <hdegoede@redhat.com>

	gtk: take selection into account in clipboard_release

2011-04-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: only release clipboard when neither guest nor client own it
	08:55 < hansg> elmarco, this is from vdagent.log with debugging enabled. What is happening is that the last thing done was a primary
	               selection in the client, so vdagent owns the clipboard in the guest (on behalf of spice-gtk), then something gets selected
	               inside the guest, the agent sends a grab to spice-gtk, which then does a gtk_clipboard_set_with_data, this triggers an
	               clipboard_owner_change which sends a release message to the agent
	08:56 < hansg> To which the agent then responds by dropping it, and logging:
	08:56 < hansg> primary: received release while not owning client clipboard
	09:11 < elmarco> hansg: but this bug we are talking about is not related to multi-clipboard right?
	09:11 < elmarco> and it's only a warning in vdagent, things works as expected otherwise, right?
	09:11 < elmarco> the bug was thee before I suppose
	09:12 < hansg> right, they work because vdagent is diligent and sees the client sends a release while it is not owning the clipboard. The
	               diligence is mainly there in case things race though (release on client racing with a grab on guest), not to make things
	               work with buggy clients :)
	09:13 < hansg> wrt: <elmarco> hansg: d->clip_grabbed is only for client-side grab, iirc
	09:13 < elmarco> ok, I think it's just an obscure area of the spec, where basically, we don't define exactly the "state machine"
	09:13 < elmarco> so the client is releasing his last client-side grab, because he had one before, but now, it is a guest grab
	09:13 < hansg> True (not exactly definging the state machine)
	09:14 < hansg> So to try again wrt the  d->clip_grabbed, what happens there (which has the same cause) is:
	09:14 < elmarco> so, what it should do is just don't release the clipboard if it is switching from client-side to guest
	09:15 < hansg> gtk/spice-widget.c: clipboard_grab gets called, and does:
	09:15 < hansg> Hmm, hold on, I see what you mean wrt d->clip_grabbed now
	09:16 < elmarco> to me, it looks like the client made a grab and to complete it's cycle, it should release his grab
	09:16 < elmarco> but the order of things confuse vdagent and we should agree on something and document it
	09:18 < hansg> elmarco, I need some time to take a somewhat closer look at the spice-gtk code in this area, give me 1/2 an hour and I'l
	               get back to you
	09:20 < elmarco> from client 1. grab -> 2. grab <- 3. release -> or 1. grab -> 2. grab <- 3. no release
	09:21 < elmarco> I think state should not be mixed between client grab / release -> and guest grab/release <-
	09:22 < elmarco> so, overriding client grab by guest grab should release client grab
	09:23 < hansg> spicec and the linux agent both assume that after sending a grab they won't get back a release (for that selection). The
	               purpose of the release is to tell the OS that the agent resp,  client no longer own the clipboard (by setting the owner to
	               None under X11), so that other apps can disable their paste menu item, etc. There is no need to do that (and actually
	               doing so would be a bug) if an other app now owns the clipboard. So if the other side claim
	09:23 < hansg> s ownership of the clipboard there is no need to tell it you're releasing your side, since it already assume you have
	09:24 < hansg> Scenarios to keep in mind are:
	09:24 < hansg> Seen from the client side:
	09:28 < hansg> client grabs clipboard
	09:28 < hansg> some app on guest becomes owner, guest sends grab, assume client release
	09:29 < hansg> some app on guest asks agent for clipboard data -> tells it to go away since the client no longer the owner
	09:29 < hansg> If it would not assume the release, there would be a window where it would think the client still owns the clipboard and
	               forward potential request to the client, even though the client no longer owns the clipboard
	09:30 < hansg> The thing to keep in mind is that the delivery of messages is not instant, so there is some window where the 2 sides are
	               out of sync.
	09:30 < hansg> I can see the logic in how you're advocating to do things, but that is not how they are currently done and I'm reluctant
	               to change this
	09:33 < elmarco> hansg: yeah, I don't think one solution or the other affect user experience, for me there is no gap if the client and
	                 agent agrees, it's only protocol/implementation details
	09:33 < elmarco> since there was prior implementation, we can decide to follow it

2011-04-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix multi-head support by sync the display cache
	An image may come later from a different channel, even if it is referenced by another image.

	gtk: add some debugging in glz decoder and avoid crashes

	gtk: display now use the cache from the session

2011-04-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: the caches are shared with the session

	common: get rid of abort() in canvases

	common: remove unnecessary outdated c++ debug

2011-04-01  Christophe Fergeau  <cfergeau@redhat.com>

	configure.ac: remove detection of WARN_UNUSED_RESULT
	spice-gtk configure.ac has some code to detect if the compiler has
	a special attribute to tag some functions so that they generate a
	warning when their return value isn't checked. However, this test
	is broken (the gcc attribute name is "warn_unused_result", not
	"__warn_unused_result__" and WARN_UNUSED_RESULT is unused anyway
	since spice-protocol provides SPICE_GNUC_WARN_UNUSED_RESULT. Thus
	we can just drop that block of code from configure.ac

2011-04-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	adding THANKS

2011-04-01  Christophe Fergeau  <cfergeau@redhat.com>

	configure.ac: remove unused tests
	configure.ac had -fvisibility detection, but it's not used by
	spice-gtk. It also has a --enable-static-linkage flag which isn't
	used anywhere apart from in configure.ac, so remote this too. I
	think the same effect as --enable-static-linkage can be achieved
	using make LDFLAGS="-all-static" since we are using libtool.

2011-03-31  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: correct CLIPBOARD_LAST so that array are sized correctly

	gtk: show cursor when cursor-move

	gtk: fix handling of incoming large clipboard data
	The main fix was probably the agent_msg_pos guin8 -> guint, although I
	modified the code for more clarity

	gtk: multi-clipboard improvements

2011-03-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix make dist

	gtk/controller: add XPI controller code

	build: provide a conditional for WIN32

	build fixup

	build: install spice-protocol.vapi

	build: check for vala if necessary

2011-03-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: remove some debugging, update TODO

2011-03-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Revert "gtk/display: remove unused mode name"
	This reverts commit 33ef5a9368534f7fcb77ef60d8811ae08a707e4f.

2011-03-23  Christophe Fergeau  <cfergeau@gmail.com>

	gtk/display: be more paranoid about potentially NULL pointer
	If things don't go as expected in gnome_rr_config_ensure_primary
	(for example we don't find any usable output), we may end up
	trying to dereference a NULL pointer. It's better to check
	top_left is not NULL before using it.

	gtk: don't attempt to dereference NULL pointer
	In spice_channel_handle_migrate there's an explicit check for
	data being NULL. However, we subsequently dereference it twice
	even when it can be NULL. Add explicit checks to avoid that.

	gtk: remove unused variables
	They were spotted by the clang static analyzer.

2011-03-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/spicy: WIN32 support resolution update

	gtk/spicy: WIN32 GTK icon theme fallback in recentmanager is buggy

	gtk/display: implement windows backend

	gtk/display: remove unused mode name

2011-03-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/display: avoid use of g_assert, we are trying to make a library

	gtk/display: split x11/windows backend
	For better or worse..

2011-03-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/display: start splitting display x11/windows backend

2011-03-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/display: fix build with win32

	TODO: update

	gtk: fix warning when building without sasl

	gtk/spicy: fix win32 build

	build: clean up some unused autoconf.ac

2011-03-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	README: minor sasl dependency update

	gtk/channel: return if pubkey is NULL
	Patch suggested by Alon Levy.

	http://lists.freedesktop.org/archives/spice-devel/2011-March/002943.html

	build: fix a copy&paste typo

	spicy: change current output resolution in fullscreen

	gtk/display: add rr_config_dump

	gtk: import display configuration from gnome-desktop

2011-03-15  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix crash when clipboard_primary owner change
	Clean up handler when destroyed.

	/usr/local/stow/virt-manager/share/virt-manager/virt-manager.py:450: Warning: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
	  gtk.main()

	Program received signal SIGSEGV, Segmentation fault.
	[Switching to Thread 0x7ffff7fd4720 (LWP 19098)]
	0x00007fffe8881ab2 in get_selection_from_clipboard (d=0x0, cb=0x1df8510)
	    at spice-widget.c:996
	996     if (cb == d->clipboard) {
	(gdb) bt
	    at spice-widget.c:996
	    0x30f5750, data=0x1ea3000) at spice-widget.c:1114
	    0x0, n_param_values=2, param_values=0x1e96a90, invocation_hint=
	    0x7fffffffd280) at gclosure.c:767
	    detail=0, instance=0x1df8510, emission_return=0x0, instance_and_params=
	    0x1e96a90) at gsignal.c:3252
	    instance=<value optimized out>, signal_id=<value optimized out>,

	gtk: map-file missig test_common_capability

2011-03-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	TODO: update

	gtk: add display width/height properties

2011-03-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add multiple selection clipboard sharing

2011-02-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add SASL support

2011-02-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix spice-client-gtk-3.0.pc requires

2011-02-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add private spice_session_get_{password,host,cert_subject}()

	gtk: add error block to spice_channel_recv_link_msg()

	gtk: add spice_channel_flush_sasl()

	gtk: add spice_channel_read_sasl()

	build: add --with-sasl build option (from gtk-vnc)

	gtk: share clipboard images

	gtk: split agent msg to VD_AGENT_MAX_DATA_SIZE if required
	Fix clipboard sharing of large objects

	gtk: add spice_channel_set_common_capability()

	gtk: make it easier to debug test_capability

	gtk: s/g_get_monotonic_clock/g_get_monotonic_time

	common: add spice_channel_test_common_capability()

2011-02-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	data: update spicy-for-windows.nsis

2011-02-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk/spicy: add --version option

2011-01-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	release 0.5

	gtk: fix windows build

	common: fix windows build

	gtk: fix hitting wall / real screen borders

2011-01-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add "migration-state" enum to make it easier to track migrations

	gtk: when input channel is not ready, silently drop input events

2011-01-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	common: sync with upstream

	common: spice_memdup could accept NULL

	gtk: spicy: add --host-subject argument

	gtk: move channel verification parameter to session

	gtk: rename s/spice-channel-enums/spice-glib-enums

	gtk: add pubkey verification on migration

	gtk: make use of common/ssl_verify.c

	common: add ssl_verify.c common code

	common: ring.h should include stddef for NULL usage

	gtk: add 'pubkey' and 'cert-subject' properties

2011-01-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add channel certificate 'verify' property

	gtk: spicy: display connection dialog on TLS error

	TODO, README: update

	gtk: implement MIGRATE_CANCEL

	gtk: track switch host idle source

	gtk: add SpiceMainChannel::migration-started
	With this signal, it is possible for the client to provide sockets to
	a migrating session.

2011-01-24  Tiziano Mueller  <dev-zero@gentoo.org>

	Use g_free instead of free in fail codepath as well. Warn if password is provided in the uri. Free allocated unencoded uri string.

2011-01-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: handle seamless migrations

	gtk: handle DISPLAY_RESET

	gtk: add spice_session_new_from_session()
	A light copy constructor for migration.

	gtk: exit coroutine loop of a channel migrating

	gtk: add spice_channel_swap(), swap connection details

	gtk: use a callback to handle spice_channel_recv_msg()

	gtk: add channel_up() helper and SPICE_CHANNEL_STATE_MIGRATING

	gtk: use a session state on disconnection, be reentrant

	gtk: add spice_session_set_port() private API, use it

	TODO: add todo about mouse reaching borders

	gtk: order to clarify what is swapped on migration

	gtk: add private get_channel_{id,type}

2011-01-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: cosmetic, make it look safer session_channel_destroy()
	Although not necessary, this loop rewrite is easier to read, to see
	that the function is safe: the function returns when removing the
	item, so it was safe before but as well...

2011-01-19  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix small mem-leak

	gtk: default construction value in property parameter

2011-01-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: remove scheme parsing, and tidy up the function

	Merge commit 'refs/merge-requests/2' of git://gitorious.org/spice-gtk/spice-gtk

	gtk: support reconnection during channel loop (coroutine regression)
	This is needed for protocol downgrade, and TLS switching.

2011-01-17  Tiziano Mueller  <dev-zero@gentoo.org>

	Add 'password' to recognized parameters in the uri.

	Use glib's URI parse functions to properly identify the scheme and unescape the string.

	Fixed implicitly declared toupper.

2011-01-16  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: stay unconnected until the FD is provided by the client

2011-01-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: fix distcheck

2011-01-14  Daniel P. Berrange  <berrange@redhat.com>

	Fix rendering with GTK3
	In GTK2 world there is an expose_event handler, so a choice
	of the X11 or cairo backends can be used.

	In GTK3 world only the draw_event exists, which must use
	cairo

	Disallow python module and X11 rendering with GTK3
	In GTK3 the python binding is provided via introspection.
	The X11 rendering code is not compatible with GTK3 since
	all GTK3 drawing is cairo based and there is no expose_event
	any more

	Make keyboard code support multiple GDK backends
	Adapt the keyboard code so that it builds with GTK2 and GTK3,
	where the latter has multiple GDK backends

	Fix use of GdkDrawable to be compat with GTK3
	In GTK3, the GdkDrawable class is gone, leaving only GdkWindow.
	The GdkDrawable class can be mostly avoided in Gtk2, thus
	eliminating the compat problems with Gtk3. Only a couple of
	compat calls need to be added to allow compilation on both.

	Adapt build system to allow building with GTK3
	The new configure flag '--with-gtk' can be used to choose
	which GTK version to build against, defaulting to GTK2.
	To enable GTK3 use

	   ./configure --with-gtk=3.0

	The libspice-client-glib-2.0.la library is unchanged, building
	against glib-2.0 at all times.

	The GTK3 build will produce a libspice-client-gtk-3.0.la
	The include files will also live in $prefix/spice-client-gtk-3.0
	and the pkgconfig is called spice-client-gtk-3.0 too.

	This allows for full parallel install of GTK2 and GTK3 builds

	Include ABI version in library names.
	To allow easy parallel install of spice-gtk builds against GTK2
	and GTK3, include the ABI version in the library names.

	 libspice-gtk.la -> libspice-gtk-2.0.la
	 libspice-glib.la -> libspice-glib-2.0.la

	The PyGtk module doesn't change because that is obsolete and
	unused in GTK3 world.

2011-01-14  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: spicy: make recent name similar to a URI without spice://

	gtk: TLS add hostname verification

	gtk: TLS fixes: URI parsing and coroutine regression

2011-01-13  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: spicy: add recent connexions chooser in connect dialog

	gtk: spciy: connect to selected recent item

	gtk: spicy: display recent connexions in chooser list

	data: add spice-mime, and spicy.desktop - disabled for now

	gtk: spicy: correctly unref ui/accel objects

	gtk: warn only if audio playback time is not monotonic

2011-01-12  Marc-André Lureau  <marcandre.lureau@redhat.com>

	common: add ring_get_length() for debugging purposes

	gtk: simplify debugging of coroutine-related path

	gtk: handle MIGRATE_SWITCH_HOST

2011-01-11  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: make channel_disconnect() a vmethod

	gtk: remove useless g_object_get

	gtk: allow calling spice_main_clipboard_release() even if agent is not connected

	gtk: add some DEBUG related to migration

2011-01-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: build x11 keyboard code with cairo backend

	build: replace echo by AC_MSG_NOTICE, that way it's logged

	build: get rid of _DEPENDENCIES and -lspice-client*
	Suggested by Jürg Billeter.

2011-01-08  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: be more careful when accessing GDK_WINDOW_XDISPLAY

2011-01-07  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: emit ERROR_LINK when connecting to non-spice server

	gtk: fix async reading... booo, that was *really* missing

	update NEWS and TODO for v0.4

	gtk: ignore clipboard owner signal when main channel disconnected

	gtk: simplify CHANNEL_CLOSE event handling

2011-01-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add missing set_delay() symbol to map-file

2011-01-04  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: help libtool/koji install client-glib before client-gtk

	gtk: fix reconnection from dialog in spicy
	Closing the session while attempting a new one is a bad idea

	gtk: s/warning/message on failed connect

	build: win32: package libgstdirectsoundsrc.dll as well

	gtk: gstaudio: add recording

2011-01-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: gstaudio: timestamp appsrc buffer to be in sync with audio sink clock
	If buffer are not timestamped with the current running time, they
	arrive too late. GStreamer seems to deal with some compensation of
	buffer jitter, but do not correct clock time. Late buffer are late and
	not heard.

2010-12-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: win32: refix jpeg_boolean to build on mingw
	Same fix made by Alon Levy in spice.

	Merge commit 'refs/merge-requests/1' of git://gitorious.org/spice-gtk/spice-gtk into integration

	build: win32: add spicy-for-windows.exe scripts

2010-12-29  Tiziano Mueller  <dev-zero@gentoo.org>

	jpeg_boolean is a mingw32-libjpeg specific thing. Use a define check rather than a version check.

2010-12-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: win32: clean-up and GSocket quirks

2010-12-28  Marc-André Lureau  <marcandre.lureau@redhat.com>

	build: search for .defs file under $(srcdir)

2010-12-27  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: win32: fallback to g_get_home_dir() if g_getenv() failed

	gtk: win32: channel_new() must be called in main context

	gtk: win32: create a drawing context

2010-12-23  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: pulse: reduce playback latency to 20ms

	gtk: pulse: flush audio buffer on cork

	gtk: synchronize video on mmtime

	gtk: update mm time based on playback time+delay

2010-12-22  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add private spice_channel_get_session()

2010-12-22  Alon Levy  <alevy@redhat.com>

	gtk: handle server sending DRAW_COPY before MARK

2010-12-21  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: spicy use shift+f12 for grab sequence

	gtk: handle SPICE_CURSOR_FLAGS_NONE correctly

	update NEWS, fix distcheck

	gtk: improve mouse support in server mode with scaling enabled

2010-12-20  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix cursor r/b colors being inverted

	gtk: add support for SPICE_CURSOR_TYPE_COLOR{4,16,32}

	gtk: improve 16bits color code, fix rendering glitches

	gtk: fix scaling for x11 backend

	gtk: spicy, save statusbar/toolbar display status
	Fix https://bugs.freedesktop.org/show_bug.cgi?id=31991

	gtk: fix scaling line artifacts

	gtk: add a few precondition checks, and modify debug messages

2010-12-18  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix a dead-lock in clipboard handling
	In some condition (in virt-manager but not with spicy),
	g_main_loop_run() will deadlock.  Use GDK_THREAD_LEAVE () like
	gtk_dialog_run() code.

	Also, turn on clipboard sharing by default.

2010-12-17  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: implement clipboard_paste_from_guest()

	gtk: correctly return empty clipboard request

	gtk: fix invalid memory access on palette cache
	This fixes a valgrind error:

	GSpice-Message: display_handle_stream_create: id 49
	(lt-spicy:23948): GSpice-DEBUG: spice-channel-cache.h:107 cache_add: palette 26704 (1)
	GSpice-Message: display_handle_stream_destroy: id 49
	==23948== Invalid read of size 4
	==23948==    at 0x53C07E9: lz_plt8_to_rgb32_decompress (lz_decompress_tmpl.c:304)
	==23948==    by 0x53C71FA: lz_decode (lz.c:661)
	==23948==    by 0x53231AF: canvas_get_lz (canvas_base.c:834)
	==23948==    by 0x5323747: canvas_get_image_internal (canvas_base.c:1109)
	==23948==    by 0x5323BD0: canvas_get_image (canvas_base.c:1282)
	==23948==    by 0x5325FDB: canvas_draw_copy (canvas_base.c:2196)
	==23948==    by 0x531670A: display_handle_draw_copy (channel-display.c:967)
	==23948==    by 0x53171B5: spice_display_handle_msg (channel-display.c:1130)
	==23948==    by 0x52F3B4D: spice_channel_recv_msg (spice-channel.c:1026)
	==23948==    by 0x52F3E61: spice_channel_iterate_read (spice-channel.c:1140)
	==23948==    by 0x52F3F51: spice_channel_iterate (spice-channel.c:1163)
	==23948==    by 0x52F44F7: spice_channel_coroutine (spice-channel.c:1272)
	==23948==  Address 0x191c067c is 1,132 bytes inside a block of size 1,277 free'd
	==23948==    at 0x4C27187: free (vg_replace_malloc.c:325)
	==23948==    by 0x52F1D03: spice_msg_in_unref (spice-channel.c:363)
	==23948==    by 0x52F3B60: spice_channel_recv_msg (spice-channel.c:1029)
	==23948==    by 0x52F3E61: spice_channel_iterate_read (spice-channel.c:1140)
	==23948==    by 0x52F3F51: spice_channel_iterate (spice-channel.c:1163)
	==23948==    by 0x52F44F7: spice_channel_coroutine (spice-channel.c:1272)
	==23948==    by 0x53CA1C9: coroutine_trampoline (coroutine_ucontext.c:52)
	==23948==    by 0x53C9FBA: continuation_trampoline (continuation.c:43)
	==23948==    by 0x5EED71F: ??? (in /lib64/libc-2.12.90.so)
	==23948==    by 0xE7F2E7F: ???
	==23948==

	The invalid pointer seems to come from an image palette that might not
	be cached or ref'ed correctly:

	    at ../common/canvas_base.c:697
	    0x7fffe45aab88) at ../common/canvas_base.c:705

	gtk: wip gstreamer audio backend

	gtk: wip scaling support

	gtk/spicy: add scaling option

	gtk: add cairo display backend

	build: basic windows build support

	common: add windows.h where required
	This patch should be sent to upstream as well..

	common: sync with upstream

	gtk: make pulse audio backend optional

	gtk: revert 16 bits multi-monitor config
	The Linux vdagent doesn't like multi-monitor configuration.

	build: add map-file in EXTRADIST

	gtk: fix 16bits expose code when black borders >0

	gtk: fix XShm error fallback code
	XDestroyImage is attempting to free(ximage->data). However, data is
	owned by the display channel.

	gtk: avoid spurious set_display() calls

	gtk: add support for 16 bits

	gtk: fix video playback being distorted

	gtk: fix windows qxl rendering and warnings
	Based on experimentation with spicec, it is normal to get
	surface_destroy() with unknown surface id. Also, it should be
	considered as an added refcount when adding an existing image/pixmap
	in the cache.

2010-12-10  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: complete API documentation

2010-12-09  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add g_object_notify_main_context()

	gtk: continue API documentation

2010-12-06  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: hide unwanted public symbols

	gtk: s/vnc/spice/ grab_sequence, break API

	gtk: remove old tcp.c code

	TODO: update

2010-12-05  Marc-André Lureau  <marcandre.lureau@redhat.com>

	Merge branch 'wip/coroutines'

	gtk: first stab at gtk-doc documentation

	gtk: WIP coroutines playback & record

	gtk: WIP coroutines inputs

	gtk: WIP coroutines display

	gtk: WIP coroutines cursor

	gtk: WIP coroutines main channel

	gtk: WIP handle disconnect with coroutines

	gtk: WIP tidy main_context_signal_emit() up
	Add g_signal_emit_main_context() and make use of it

	gtk: WIP make coroutine loop overridable

	gtk: WIP add the support for system -> coroutine write

	gtk: WIP spice-channel documentation

	gtk: WIP enable TLS connection with coroutines

	gtk: WIP use coroutines in spice-channel

	gtk: WIP use coroutines and GSocket to connect

	gtk: add coroutine utilities

	gtk: fix an invalid clipboard memory copy

	gtk: don't grab our own guest grab
	Hack? There might be a better way to do that...

	gtk: fix an invalid clipboard memory copy

	gtk: don't grab our own guest grab
	Hack? There might be a better way to do that...

	build: add .gitignore

	gtk: SPICE_DEBUG glz_decoder_window_resize message

2010-12-03  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: fix crash when spicy configuration is empty

	gtk: fix crash when spicy configuration is empty

	gtk: remove invalid properties warning in spicy

	build: spice-protocol >= 0.6.3 required

	gtk: remove invalid properties warning in spicy

	build: spice-protocol >= 0.6.3 required

2010-12-02  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: visibility option for statusbar/toolbar in spicy

	gtk: delay PA stream creation when context is ready

2010-12-01  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: don't uncork new streams

	gtk: save/restore spicy configuration
	Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31991

	gtk: add CELT recording

	gtk: add CELT playback

2010-11-30  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add {session,channel}_open_fd()

2010-11-29  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add channel.set_capability()

	gtk: put some g_message() under SPICE_DEBUG

	TODO: update

	gtk: add clipboard sharing for text

	gtk: add dispay config

2010-11-26  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: progressive agent message recomposition

	gtk: add jpeg decoder

2010-11-25  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add zlib decoder

	build: fix make -j

	build: re-enable -Wflags, and fix a few warnings

	build: use git-version-gen

	README: add a few missing dependencies

	gtk: disconnect record stream when record_stop()
	This behaviour is different than playback. The main difference is that
	a playback stream will stay active, while the recording stream will be
	removed: that way the GNOME volume control can notice the user there
	is no active recording, by hiding the microphone icon.

	Playback is more frequent (sounds events...) and it would be
	unfriendly if the stream was removed/added every now and then from the
	volume control list.

	build: update build depedencies

	build: update README

	po: add fr translation

	gtk: mark spice-cmdline strings as translatable

	gtk: make snappy translatable

	gtk: remove spice prefix in default signal handler

	gtk: add raw audio recording

2010-11-24  Marc-André Lureau  <marcandre.lureau@redhat.com>

	gtk: add channel_test_capability()

	gtk: add save mm_time in session

	add AUTHORS & TODO

	i18: add basic support - mark translatable spicy strings

	gtk: read remote caps

	gtk: add a couple of new TODO

	gtk: handle agent token

	gtk: add SPICE_MSG_DISCONNECTING handler

	gtk: don't send inputs before the channel is ready, or else it will eof

	gtk: expose Audio object in python

	gtk: fix MainChannel python bindings

	gtk: ensure we sync key locks after connection

	gtk: move audio stuff in client-glib

	gtk: fix make distcheck

	gtk: fix out of dir build

	gtk: add missing copyright headers

	README: move from gtk/ to /

	build: install gtk and glib headers in different dirs
	And various improvements

	gtk: current code is blocking - remove O_NONBLOCK

	gtk: add padding on common base classes: channe/session/widget

	gtk: send the channel caps

	gtk: uncomment some agent string-msg table entries
	I don't know why it was commented.

	gtk: sync keyboard lock (X11 only)

	gtk: release keys on disconnect

	gtk: fix getpixbuf colorspace

	gtk: make spice_session_disconnect() reentrant

	gtk: a channel own a ref on a session
	This fix calling session_disconnect() in a main_channel_event() callback for instance.

	gtk: add a couple of warning on invalid arguments in public methods

	gtk: use sane default values for spice_audio_new()

	gtk: passing seems wrong, it should be the context

	gtk: adapted to be a working C library

	gtk: handle display-mark

	gtk: hack to handle scrolling

	gtk: implement cursor_reset and plug a memleak

	build: fix a few warnings reported by clang

	gtk: add a flag to turn debug off, SPICE_DEBUG=1 to override

	gtk: don't dereference NULL pointers in destroy
	On some error conditions, that happens.

	gtk: add get_pixbuf() for 8/8/8 surfaces

	gtk: add display_send_keys() again, adapted from gtk-vnc..

	gtk: signal keybard-grab status
	Perhaps we should have grab/ungrab signals, instead of an int...

	gtk: add support fro grab keys, based on gtk-vnc code

	gtk: track when mouse/keyboard grab fail
	Avoid sending mouse-grab true if the grab failed.

	gtk: python module, register enums

	gtk: untabify

	gtk: use SPICE_DEBUG_CURSOR=1 for debugging

	gtk: allow key repeatition

	gtk: get rid of the remaining assert()

	gtk: make more build silent

	gtk: python module - add manualy defined bindings

	gtk: fix a few gcc warnings

	gtk: add pygtk module

	gtk: remove spice_channel_id() function
	The value can be retrieved by property

	gtk: remove spice- prefix in signal name

	gtk: remove spice-event
	The abstraction was not really useful, a bit buggy, and a bit more restrictive

	gtk: get rid of asserts, they are not good in libraries

	gtk: use g_log functions instead of fprintf and custom handler

	gtk: make spice_msg_out private

	gtk: GObject Introspection support

2010-11-23  Gerd Hoffmann  <kraxel@redhat.com>

	fix channel cleanup (unbreaks tls)

	spicy: quit on connect failure

	cursor tweaks

	widget: server mouse fixups.

	spicy: use uri for recent entries.

	session: add uri property.

	sound: add recording [not finished yet]

	display: release cursors

	drop+improve debug messages. make protocol a session not a channel property.

	handle partial link message reads

	display: release streams

	display: release glz window bits

	display: release surfaces

	display: release cached palettes and images

	move resize timer from widget to display channel

	more object destruction fixes

	misc object destruction fixes

	spicy cleanup fixes

	display: move IPC_RMID to avoid shm leaking

	spicy: allocate all state storage

	inputs fixups

	spicy: use modifier signal, improve status line.

	inputs: add modifier signal.

	stream regions

	spicy: use grab-mouse signal, set initial kbd focus

	spice widget: some agent bits, add mouse-grab signal

	some more agent bits

	main channel signal fixup.

	auit when the connect dialog is canceled.

	handle VD_AGENT_ANNOUNCE_CAPABILITIES

	mouse and agent interface tweaks.

	connect dialog windup

	spicy: started working on a fancy connect dialog.

	switch snappy to glib command line parsing, factor out common spice options.

	make option menu more verbose

	switch spicy to glib command line parsing

	add audio init wrapper, move pulse bits into gtk lib.

	make spice_session_get_channels return a glist

	rename spice_msg get/put functions to ref/unref

	more clipboard bits

	early cut+paste bits

	zap sub-message debug printfs

	display: handle inval-list message, fix image cacheing.

	spice-channel: Handle incoming sub messages.

	Add glib objects + gtk widgets for spice.

2010-11-23  Marc-André Lureau  <marcandre.lureau@gmail.com>

	Initial import from SPICE
