systray - add a little logging and explicit stupid checks

This commit is contained in:
Carsten Haitzler 2020-03-15 20:53:18 +00:00
parent 1fdaa2a113
commit 385d26d961
1 changed files with 3 additions and 1 deletions

View File

@ -68,8 +68,10 @@ register_item_cb(const Eldbus_Service_Interface *s_iface, const Eldbus_Message *
svc = service;
/* if stupid, this app does not conform to http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/
* and is expecting to have its send id watched as it is not providing a real bus name here */
stupid = !!strncmp(svc, "org.", 4);
if (svc[0] == '/') stupid = EINA_TRUE;
else stupid = !!strncmp(svc, "org.", 4);
if ((stupid) && (svc[0] == ':')) stupid = EINA_FALSE;
printf("SYSTRAY: [%s] stupid=%i\n", svc, (int)stupid);
snprintf(buf, sizeof(buf), "%s/%s", stupid ? eldbus_message_sender_get(msg) : svc, stupid ? svc : "/StatusNotifierItem");
service = eina_stringshare_add(buf);