seat: set DPMS to ON before broadcasting the device

We cannot modeset a device while DPMS is set to OFF so we should do this
before broadcasting the device. Otherwise, the callback might not be able
to use the display.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-11-28 22:21:33 +01:00
parent 145e6fc402
commit 9a70af0ecc

View File

@ -151,15 +151,15 @@ static void activate_display(struct kmscon_display *d)
d->activated = true;
shl_dlist_for_each_safe(iter, tmp, &seat->sessions) {
s = shl_dlist_entry(iter, struct kmscon_session, list);
session_call_display_new(s, d->disp);
}
ret = uterm_display_set_dpms(d->disp, UTERM_DPMS_ON);
if (ret)
log_warning("cannot set DPMS state to on for display: %d",
ret);
shl_dlist_for_each_safe(iter, tmp, &seat->sessions) {
s = shl_dlist_entry(iter, struct kmscon_session, list);
session_call_display_new(s, d->disp);
}
}
}