From: Dana Jansens Date: Mon, 23 Apr 2007 23:11:33 +0000 (+0000) Subject: focus_client was becoming invalid if the focused client was unmanaged. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b4eecc51b55509a0b9c8b5f8cdd536f6b668af58;p=chaz%2Fopenbox focus_client was becoming invalid if the focused client was unmanaged. --- diff --git a/openbox/client.c b/openbox/client.c index 5471bedd..c184c891 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -525,7 +525,6 @@ void client_unmanage(ObClient *self) event_ignore_queued_enters(); } - keyboard_grab_for_client(self, FALSE); mouse_grab_for_client(self, FALSE); diff --git a/openbox/focus.c b/openbox/focus.c index 4c663c3f..788e1683 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -763,6 +763,8 @@ void focus_order_add_new(ObClient *c) void focus_order_remove(ObClient *c) { focus_order = g_list_remove(focus_order, c); + if (c == focus_client) + focus_client = NULL; } void focus_order_to_top(ObClient *c)