static int bus_manager_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
Manager *m = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
assert(m);
- b = manager_get_idle_hint(m, NULL);
+ b = manager_get_idle_hint(m, NULL) > 0;
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;
static int bus_seat_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
Seat *s = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
assert(s);
- b = seat_get_idle_hint(s, NULL);
+ b = seat_get_idle_hint(s, NULL) > 0;
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;
Session *old_active;
assert(s);
- assert(session);
- assert(session->seat == s);
+ assert(!session || session->seat == s);
if (session == s->active)
return 0;
static int bus_session_append_active(DBusMessageIter *i, const char *property, void *data) {
Session *s = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
static int bus_session_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
Session *s = data;
- bool b;
+ int b;
assert(i);
assert(property);
assert(s);
- b = session_get_idle_hint(s, NULL);
+ b = session_get_idle_hint(s, NULL) > 0;
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;
static int bus_user_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
User *u = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
assert(u);
- b = user_get_idle_hint(u, NULL);
+ b = user_get_idle_hint(u, NULL) > 0;
+
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;