wayland-server: Listen for pointer current surface destruction
authorRob Bradford <rob@linux.intel.com>
Wed, 3 Apr 2013 14:20:49 +0000 (15:20 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 3 Apr 2013 16:46:57 +0000 (12:46 -0400)
commitdb19b443cc8d3179df31cb96b9c45527ad403fef
tree84bb0e6583dd2c9c633176b910dc6bf9fca42e0e
parent858fcbde59cfd2b42644c43bf481ffd70b30d5be
wayland-server: Listen for pointer current surface destruction

Add a destroy listener so that when the current surface associated with the
pointer is destroyed we can reset the pointer to the current surface. In order
to achieve this add a wl_pointer_set_current() which handles assigning the
surface and creating the listener.

This resolves a use-after-free error triggered with nested popup surfaces

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=696946
src/wayland-server.c
src/wayland-server.h