From: Dana Jansens Date: Wed, 28 Mar 2007 02:00:10 +0000 (+0000) Subject: drop some wasted client_validates. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=33cc5724028121753bfc6e4fc51f3027864f9678;p=chaz%2Fopenbox drop some wasted client_validates. --- diff --git a/openbox/action.c b/openbox/action.c index 4fd86d30..796f259a 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1166,8 +1166,7 @@ void action_focus(union ActionData *data) moving on us */ event_halt_focus_delay(); - if (client_validate(data->client.any.c)) - client_focus(data->client.any.c); + client_focus(data->client.any.c); } } diff --git a/openbox/client.c b/openbox/client.c index 6866e8d8..3e069464 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2963,11 +2963,6 @@ gboolean client_focus(ObClient *self) /* choose the correct target */ self = client_focus_target(self); -#if 0 - if (!client_validate(self)) - return FALSE; -#endif - if (!client_can_focus(self)) { if (!self->frame->visible) { /* update the focus lists */ diff --git a/openbox/event.c b/openbox/event.c index 15724968..96fe6275 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1320,11 +1320,8 @@ static gboolean focus_delay_func(gpointer data) ObClient *c = data; if (focus_client != c) { - if (client_validate(c)) { - client_focus(c); - if (config_focus_raise) - client_raise(c); - } + if (client_focus(c) && config_focus_raise) + client_raise(c); } return FALSE; /* no repeat */ } diff --git a/openbox/focus.c b/openbox/focus.c index 6652c5de..1e343dfa 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -212,8 +212,7 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old) { if ((target = client_under_pointer())) if (allow_refocus || target != old) - if (client_normal(target) && client_can_focus(target) && - client_validate(target)) { + if (client_normal(target) && client_can_focus(target)) { ob_debug("found in pointer stuff\n"); return target; } @@ -254,8 +253,8 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old) a splashscreen or a desktop window (save the desktop as a backup fallback though) */ - if (client_can_focus(c) && client_validate(c) && - c->desktop == screen_desktop && !c->iconic) + if (client_can_focus(c) && c->desktop == screen_desktop && + !c->iconic) { if (client_normal(c)) { ob_debug("found in focus order\n"); diff --git a/openbox/screen.c b/openbox/screen.c index cf94462c..298a0b22 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -882,7 +882,7 @@ void screen_show_desktop(gboolean show) ObClient *c = it->data; if (c->type == OB_CLIENT_TYPE_DESKTOP && (c->desktop == screen_desktop || c->desktop == DESKTOP_ALL) && - client_validate(it->data) && client_focus(it->data)) + client_focus(it->data)) break; } } else {