shell: Allow ending of popup grabs from within the starting of the grab
authorRob Bradford <rob@linux.intel.com>
Wed, 26 Jun 2013 18:49:11 +0000 (19:49 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 3 Jul 2013 23:06:25 +0000 (19:06 -0400)
commitdfe310512b4ed8f5dd591611b61a5dfd114403b0
tree41f0fc6fc78cc4f311af6660ccec2af35d6e2138
parent6e2c12496bbef3cc913cfe9d5f0aeb4d8b23b368
shell: Allow ending of popup grabs from within the starting of the grab

Calling weston_pointer_start_grab can lead to a code path (in this case
when the shell surface is unresponsive) that can try and remove the
popup grab to setup a shell grab.

Ending the popup grab requires removing the surface from the grab's
surfaces list - however the grab had not yet been fully setup so the
grabbed surface was not yet in this list.

With this change we ensure we add the surface to the list before setting
up the pointer grab.

https://bugs.freedesktop.org/show_bug.cgi?id=66167
src/shell.c