check if the window is focused before unfocusing it

This commit is contained in:
Dana Jansens 2003-02-14 18:31:52 +00:00
parent 7393a17bf9
commit 53b5c60a5e

View file

@ -669,7 +669,7 @@ void Screen::unmanageWindow(Client *client)
client->_modal = false;
// unfocus the client (calls the focus callbacks)
client->unfocus();
if (client->focused()) client->unfocus();
#ifdef DEBUG
printf("Unmanaged window 0x%lx frame 0x%lx\n", client->window(), framewin);