configure.ac: Use wayland_version macro in bug url
client: Check reference count only for destroyed proxies

The llvm static analyzer tool reported "Use of memory after it is freed"
in dispatch_event() because the proxy is used after being freed if the
reference count reaches zero without the destroyed flag being set. This
would never happen in practice because the owner of the proxy object
always holds a reference until calling wl_proxy_destroy() which would
also set the destroyed flag.

Since this is the case, it is safe to do the reference count check only
if the destroyed flag is set, as it can never reach zero if not.

This commit doesn't change the behavior of the function, but makes the
static analyzer more happy.

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

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
client: Invoke new_id closure arguments as pointers instead of integers

This commit adds a flags parameter to wl_closure_invoke(). The so far
added flags are ment to specify if the invokation is client side or
server side. When on the server side, closure arguments of type 'new_id'
should be invoked as a integer id while on the client side they should
be invoked as a pointer to a proxy object.

This fixes a bug happening when the address of a client side 'new_id'
proxy object did not fit in a 32 bit integer.

krh: Squashed test suite compile fix from Jason Ekstrand.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
protocol: Add minimize/maximize protocol

In order for clients to notify the compositor that they wish to be minimized, a
minimize request is needed. This can be used to minimize the surface when a
user clicks a minimize button for example.

The compositor needs a way to tell clients to maximize and unmaximize their
surfaces. The desktop shell client can ask the compositor to send a surface
an (un)maximize event, in response to a panel button for example.

The compositor can minimize and unminimize surfaces but clients can only
request that its surface is minimized. The client doesn't need to be involved
in a minimize action, unlike (un)maximize, it only needs a way to track its
minimize state and request to be minimized. This patch adds minimize and
unminimize protocol events for this purpose.

Further, the term minimize is relatively subjective and defined by the
implementation. Clients should not expect that minimized means the surface
will be invisable to the user. There are several use cases where displaying
minimized surfaces will be useful. Clients might want to change input handling
or pause when minimized but nothing should change with regards to submitting
surface buffer updates.
README: Update for next branches
Merge branch 'next' of github.com:soreau/wayland into next