libweston-desktop: Fix weston crash when lost the shsurf
requested to merge wujiansun/weston:bugfix/Segfault-when-opening-a-program-by-pressing-a-stylus-on-a-launcher into main
The shell_surface may disappear when keyboard lost focus, then the shsurf will be NULL. Have an ahead check for shsurf before calling the callback in weston_desktop_surface_foreach_child.
Fixes #811 (closed)
Tested-by: Erkai Ji erkai.ji@nxp.com Signed-off-by: Wujian Sun wujian.sun_1@nxp.com Signed-off-by: Marius Vlad marius.vlad@collabora.com
Edited by Wujian Sun