Add cancel function to grab interfaces
authorJonas Ådahl <jadahl@gmail.com>
Fri, 25 Oct 2013 21:18:05 +0000 (23:18 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 28 Oct 2013 21:44:06 +0000 (14:44 -0700)
commit1ea343e1be49160bd00d97eb776d3641c10de1b1
treec83b9d9b61450d512ac21e3ff656a6ef20d1bb5d
parent1c6e63e880d1d4afef4dc3b009007c11ecc436ad
Add cancel function to grab interfaces

A grab can potentially allocate memory and would normally end the grab
itself, freeing the allocated memory in the process. However at in some
situations the compositor may want to abort a grab. The grab owner still
needs to free some memory and abort the grab properly. To do this a new
function 'cancel' is introduced in all the grab interfaces instructing
the grabs owner to abort the grab.

This patch also hooks up grab cancelling to seat device releasing and
when the compositor looses focus, which would potentially leak memory
before.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
src/bindings.c
src/compositor.h
src/data-device.c
src/input.c
src/shell.c
src/text-backend.c