shell: Only assign focus on click if there is a pointer focus surface
If we don't have a background image from the desktop-shell client or the
pointer for some other reason doesn't have a focus we trigger a
segfault as we try to deref the seat->pointer->focus NULL pointer.
https://bugs.freedesktop.org/show_bug.cgi?id=73066
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 7981099..e22c97f 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4216,6 +4216,8 @@
{
if (seat->pointer->grab != &seat->pointer->default_grab)
return;
+ if (seat->pointer->focus == NULL)
+ return;
activate_binding(seat, data, seat->pointer->focus->surface);
}