return PA_HOOK_OK;
}
+ /* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(s, c->sinks, idx) {
if (s == def)
continue;
}
PA_IDXSET_FOREACH(s, c->sources, idx) {
+ if (s->monitor_of)
+ continue;
+
if (s == def)
continue;
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)))
continue;
+ /* @todo: favour the highest priority device, not the first one we find? */
if (role_match(s->proplist, role)) {
new_data->source = s;
new_data->save_source = FALSE;
pa_assert(u);
pa_assert(u->on_hotplug);
+ if (source->monitor_of)
+ return PA_HOOK_OK;
+
PA_IDXSET_FOREACH(so, c->source_outputs, idx) {
const char *role;
continue;
/* Try to find some other fitting sink */
+ /* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(d, c->sinks, jdx) {
if (d == def || d == sink)
continue;
}
/* Try to find some other fitting source */
+ /* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(d, c->sources, jdx) {
if (d == def || d == source)
continue;
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(d)))
continue;
- if (role_match(d->proplist, role) && !source->monitor_of == !d->monitor_of) {
+ /* If moving from a monitor, move to another monitor */
+ if (!source->monitor_of == !d->monitor_of && role_match(d->proplist, role)) {
pa_source_output_move_to(so, d, FALSE);
break;
}