From: Dana Jansens Date: Fri, 14 Feb 2003 18:31:52 +0000 (+0000) Subject: check if the window is focused before unfocusing it X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=53b5c60a5e8bbf2942ef174c2db64db6cdac3e26;p=chaz%2Fopenbox check if the window is focused before unfocusing it --- diff --git a/src/screen.cc b/src/screen.cc index 17a8c225..3f507afb 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -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);