+static void desktop_change_callback(ObClient *c, gpointer data)
+{
+ ObMenuFrame *frame = data;
+ if (c == frame->client) {
+ /* the client won't even be on the screen anymore, so hide the menu */
+ menu_frame_hide_all();
+ }
+}
+
+static void show_callback(ObMenuFrame *frame, gpointer data)
+{
+ client_add_desktop_notify(desktop_change_callback, frame);
+}
+
+static void hide_callback(ObMenuFrame *frame, gpointer data)
+{
+ client_remove_desktop_notify(desktop_change_callback);
+}
+