If you open "Send to desktop" submenu of the client menu, and select the new desktop after the client has been closed, (for example it was a video player that finished playing) a crash happens. The same is true for "Layer" submenu. The fix is easy:
diff --git a/openbox/client_menu.c b/openbox/client_menu.c
index 4a3b286f..f1bd6005 100644
--- a/openbox/client_menu.c
+++ b/openbox/client_menu.c
@@ -216,7 +216,8 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
{
gulong ignore_start;
- g_assert(c);
+ if (!c)
+ return;
if (!config_focus_under_mouse)
ignore_start = event_start_ignore_all_enters();
@@ -288,7 +289,8 @@ static gboolean send_to_menu_update(ObMenuFrame *frame, gpointer data)
static void send_to_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
ObClient *c, guint state, gpointer data)
{
- g_assert(c);
+ if (!c)
+ return;
client_set_desktop(c, e->id, FALSE, FALSE);
if (f && c->desktop != screen_desktop && c->desktop != DESKTOP_ALL)
Note that client_menu_execute already does this. (see 0cd6f4e)
If you open "Send to desktop" submenu of the client menu, and select the new desktop after the client has been closed, (for example it was a video player that finished playing) a crash happens. The same is true for "Layer" submenu. The fix is easy:
Note that
client_menu_executealready does this. (see 0cd6f4e)