desktop-shell: Unset the shell surface owner when it goes away
authorJonas Ådahl <jadahl@gmail.com>
Fri, 26 Feb 2016 06:02:06 +0000 (14:02 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 22 Apr 2016 02:31:21 +0000 (10:31 +0800)
commitd3a3ee980d58d826c0c0122f9661066cd760a77e
tree20c8deb9cc1e935060bdaeeba861e948860a4469
parent3c53094e2413050617dcae400d117449a800c50e
desktop-shell: Unset the shell surface owner when it goes away

On client destruction, the shell object may be destroyed before the
shell surface objects. If this happens to two surfaces of the same
client, and one surface being destroyed results in the focus being
switched to the other, this would trigger a ping event.

The ping event sending function relies on having a valid owner, and if
the shell would be destoryed prior to the shell surface, we'd crash in
this function.

Solve this by unsetting the owner pointer when the shell client goes
away and early out in the ping event sending function if the owner is
gone.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
desktop-shell/shell.c