window: Don't crash when window with focus_widget is destroyed

We would try to deliver a leave event to a widget in a destroyed window.
diff --git a/clients/window.c b/clients/window.c
index 1356c75..7ba6a22 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -974,6 +974,9 @@
 			input->pointer_focus = NULL;
 		if (input->keyboard_focus == window)
 			input->keyboard_focus = NULL;
+		if (input->focus_widget &&
+		    input->focus_widget->window == window)
+			input->focus_widget = NULL;
 	}
 
 	if (window->frame)