1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

dbus: properly handle object path

Previously we reply to requests sent to _any_ object path, even though
we only declare /com/github/chjj/compton. This commit makes sure we only
reply to request sent to the right path.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-01-27 02:28:37 +00:00
parent b4e0e6128c
commit f4c4bdb33d
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -179,7 +179,9 @@ bool cdbus_init(session_t *ps, const char *uniq) {
dbus_error_free(&err);
goto fail;
}
dbus_connection_add_filter(cd->dbus_conn, cdbus_process, ps, NULL);
dbus_connection_register_object_path(
cd->dbus_conn, CDBUS_OBJECT_NAME,
(DBusObjectPathVTable[]){{NULL, cdbus_process}}, ps);
return true;
fail:
ps->dbus_data = NULL;