clients: Remove the window / user parameters from the menu function

We want the ability to create a detached menu.
diff --git a/clients/terminal.c b/clients/terminal.c
index cc603e9..eb133cd 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2680,9 +2680,10 @@
 }
 
 static void
-menu_func(struct window *window, struct input *input, int index, void *data)
+menu_func(void *data, struct input *input, int index)
 {
-	struct terminal *terminal = data;
+	struct window *window = data;
+	struct terminal *terminal = window_get_user_data(window);
 
 	fprintf(stderr, "picked entry %d\n", index);