gtk: avoid use gtk+ 3.0 only API
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
build-sys: fix out-of-tree build with vala
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.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
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.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
channel-main: Add support for VD_AGENT_CAP_SPARSE_MONITORS_CONFIG (rhbz#881072)

Signed-off-by: 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.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
build-sys: missing sys/types.h in gtk/channel-display.c
build-sys: Use a portable variable assignment in configure.ac
build-sys: generate THANKS at dist time