diff --git a/include/menu/menu.h b/include/menu/menu.h
index 2a28cd82..8f688c5c 100644
--- a/include/menu/menu.h
+++ b/include/menu/menu.h
@@ -25,6 +25,7 @@ struct menu {
char *id;
char *label;
bool visible;
+ struct menu *parent;
struct wlr_box box;
struct wl_list menuitems;
struct server *server;
diff --git a/src/menu/menu.c b/src/menu/menu.c
index 83b38524..5b3337fe 100644
--- a/src/menu/menu.c
+++ b/src/menu/menu.c
@@ -27,6 +27,7 @@
static bool in_item;
static struct menuitem *current_item;
+static int menu_level;
static struct menu *current_menu;
/* vector for