diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2014-07-27 16:15:49 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2014-07-27 16:15:49 -0400 |
commit | e7cb1f94687fc426d2689c633b9b3588f0970f0b (patch) | |
tree | 706de2e0db42cee3437088a73d87741c2ab1aafb | |
parent | 7b617491843432211c6f8c35bbe98d551e1f83c0 (diff) | |
download | enlightenment-e7cb1f94687fc426d2689c633b9b3588f0970f0b.tar.gz |
break out qa client validation into separate function
-rw-r--r-- | src/modules/quickaccess/e_mod_quickaccess.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/modules/quickaccess/e_mod_quickaccess.c b/src/modules/quickaccess/e_mod_quickaccess.c index dbca7aa074..8c1cbbbd59 100644 --- a/src/modules/quickaccess/e_mod_quickaccess.c +++ b/src/modules/quickaccess/e_mod_quickaccess.c @@ -522,15 +522,22 @@ _e_qa_toggle_cb(E_Object *obj __UNUSED__, const char *params) } } +static Eina_Bool +_e_qa_client_is_valid(const E_Client *ec) +{ + if (e_client_util_ignored_get(ec)) return EINA_FALSE; + if (ec->internal) return EINA_FALSE; + if ((!ec->icccm.class) || (!ec->icccm.class[0])) return EINA_FALSE; + if ((!ec->icccm.name) || (!ec->icccm.name[0])) return EINA_FALSE; + return EINA_TRUE; +} + static void _e_qa_border_eval_pre_post_fetch_cb(void *data __UNUSED__, E_Client *ec) { E_Quick_Access_Entry *entry; - if (e_client_util_ignored_get(ec)) return; - if ((!ec->new_client) || (ec->internal)) return; - if ((!ec->icccm.class) || (!ec->icccm.class[0])) return; - if ((!ec->icccm.name) || (!ec->icccm.name[0])) return; + if ((!ec->new_client) || (!_e_qa_client_is_valid(ec))) return; entry = _e_qa_entry_find_match(ec, 0); if (!entry) return; |