seat: allow calling go_foreground if already in foreground
If we are asleep and in foreground, go_foreground() should return success so we can safely unload asynchronous sessions. Otherwise, we wouldn't be able to handle them properly while being inactive or we would need a whole bunch of other checks. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
c7707560de
commit
527a73120b
@ -134,11 +134,9 @@ static int seat_go_foreground(struct kmscon_seat *seat)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!seat->awake)
|
||||
return -EBUSY;
|
||||
if (seat->foreground)
|
||||
return 0;
|
||||
if (seat->current_sess)
|
||||
if (!seat->awake || seat->current_sess)
|
||||
return -EBUSY;
|
||||
|
||||
if (seat->cb) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user