summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-14 18:31:52 +0000
committerDana Jansens <danakj@orodu.net>2003-02-14 18:31:52 +0000
commit53b5c60a5e8bbf2942ef174c2db64db6cdac3e26 (patch)
treee4db6c374ecf7ccb216fa47853e7f06c1e8b19e6 /src
parent7393a17bf9b427675df3a6688845db5e2df6f155 (diff)
check if the window is focused before unfocusing it
Diffstat (limited to 'src')
-rw-r--r--src/screen.cc2
1 files changed, 1 insertions, 1 deletions
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);