From a9910e520b1e5a7020ca8df0f2a7d0d0d48e2857 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 13 Mar 2007 04:15:25 +0000 Subject: [PATCH] always unfocus the window when it disappears, no special cases.. (except unmanage) --- openbox/client.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openbox/client.c b/openbox/client.c index 569718c3..dc61deba 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2121,9 +2121,14 @@ void client_showhide(ObClient *self) if (!self->frame->visible) frame_show(self->frame); } - else if (self->frame->visible) + else if (self->frame->visible) { frame_hide(self->frame); + /* Fall back focus since we're disappearing */ + if (focus_client == self) + client_unfocus(self); + } + /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it needs to be in IconicState. This includes when it is on another desktop! @@ -2505,10 +2510,6 @@ static void client_iconify_recursive(ObClient *self, bottom'. */ focus_order_to_top(self); - /* Fall back focus since we're disappearing */ - if (focus_client == self) - client_unfocus(self); - changed = TRUE; } } else { -- 2.44.0