From c9974a0796fe2934299f10dc3a879d29c7045859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 3 Jul 2013 19:24:57 -0400 Subject: [PATCH] shell: Dont set grab cursor if desktop-shell client died If we don't have a desktop-shell helper client, don't try to send events to it. https://bugs.freedesktop.org/show_bug.cgi?id=65961 --- src/shell.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/shell.c b/src/shell.c index 3b6ac42ce..bbc3d05bf 100644 --- a/src/shell.c +++ b/src/shell.c @@ -335,9 +335,13 @@ shell_grab_start(struct shell_grab *grab, grab->pointer = pointer; weston_pointer_start_grab(pointer, &grab->grab); - desktop_shell_send_grab_cursor(shell->child.desktop_shell, cursor); - weston_pointer_set_focus(pointer, shell->grab_surface, - wl_fixed_from_int(0), wl_fixed_from_int(0)); + if (shell->child.desktop_shell) { + desktop_shell_send_grab_cursor(shell->child.desktop_shell, + cursor); + weston_pointer_set_focus(pointer, shell->grab_surface, + wl_fixed_from_int(0), + wl_fixed_from_int(0)); + } } static void