#include <assert.h>
#include <string.h>
-#include "logind.h"
+#include "logind-device.h"
#include "util.h"
Device* device_new(Manager *m, const char *sysfs) {
if (d->seat)
LIST_REMOVE(Device, devices, d->seat->devices, d);
+ seat_add_to_gc_queue(d->seat);
d->seat = NULL;
}
if (d->seat)
device_detach(d);
- LIST_PREPEND(Device, devices, d->seat->devices, d);
d->seat = s;
+ LIST_PREPEND(Device, devices, s->devices, d);
}