From 8f2e3f5fe16aeb0324aa5ee2b2c30a83ec724ad0 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 12 Jun 2007 17:46:16 +0000 Subject: use the same decision code to focus new windows as for focus cycling or focus fallback. yay consistency. --- openbox/client.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'openbox/client.c') diff --git a/openbox/client.c b/openbox/client.c index 29b27d1d..c6945d23 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -314,20 +314,13 @@ void client_manage(Window window) /* focus the new window? */ if (ob_state() != OB_STATE_STARTING && (!self->session || self->session->focused) && - !self->iconic && /* this means focus=true for window is same as config_focus_new=true */ ((config_focus_new || (settings && settings->focus == 1)) || client_search_focus_tree_full(self)) && /* this checks for focus=false for the window */ (!settings || settings->focus != 0) && - /* note the check against type Normal/Dialog/Utility, - not client_normal(self), which would also include other types. - in this case we want more strict rules for focus */ - (self->type == OB_CLIENT_TYPE_NORMAL || - self->type == OB_CLIENT_TYPE_UTILITY || - self->type == OB_CLIENT_TYPE_DIALOG)) + focus_valid_target(self, FALSE, TRUE, FALSE, FALSE)) { - /* XXX use focus_cycle_valid_target instead... */ activate = TRUE; } -- cgit v1.2.3