res = keyrouter_grab_grab_key(keyrouter->keyrouter_grab,
mode, key, (void *)client);
- if (res == TIZEN_KEYROUTER_ERROR_NONE && keyrouter_client->grabbed != true)
- keyrouter_client->grabbed = true;
tizen_keyrouter_send_keygrab_notify(resource, surface, key, mode, res);
}
} else {
res = keyrouter_grab_grab_key(keyrouter->keyrouter_grab,
grab_data->mode, grab_data->key, (void *)client);
- if (res == TIZEN_KEYROUTER_ERROR_NONE && keyrouter_client->grabbed != true)
- keyrouter_client->grabbed = true;
grab_data->err = res;
}
return true;
}
- // grabbed client is already checked the privilege before.
- if (keyrouter_client->grabbed)
+ // already checked the privilege before.
+ if (keyrouter_client->privileged)
return true;
wl_client_get_credentials(client, &pid, &uid, &gid);
- return tizen_security_check_privilege(pid, uid, "http://tizen.org/privilege/keygrab");
+ keyrouter_client->privileged = tizen_security_check_privilege(pid, uid,
+ "http://tizen.org/privilege/keygrab");
+
+ return keyrouter_client->privileged;
}
static void