shell: Make sure we still have touch or pointer focus when moving/resizing

Graphics / Wayland / Weston - Kristian Høgsberg [bitplanet.net] - 9 January 2014 17:43 UTC

It's possible to touch a surface to move it and let go before we get to common_surface_move(), in which case we don't have a touch focus when we get there. For pointers, we could click a surface, but have the surface go away before we get to common_surface_move(), in which case the button count is non-zero, but we don't have a surface.

In either case we crash, so let's add a check to make sure we still have a focus surface before we try to move it.

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73448

70f2901 shell: Make sure we still have touch or pointer focus when moving/resizing
desktop-shell/shell.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

Upstream: cgit.freedesktop.org


  • Share