mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-05 20:27:59 +02:00
[main] fix bug with multiple deactivate commands
If plymouth deactivate is called when we're waiting for the boot splash to become idle, we end up asserting that there's not already an idle trigger. Fix it by checking for an existing deactive trigger, and if there is, ignoring the new deactivate command (except for pulling its trigger so it doesn't block).
This commit is contained in:
parent
764e7dd306
commit
434a4b2ae8
1 changed files with 10 additions and 2 deletions
12
src/main.c
12
src/main.c
|
|
@ -758,10 +758,17 @@ static void
|
|||
on_deactivate (state_t *state,
|
||||
ply_trigger_t *deactivate_trigger)
|
||||
{
|
||||
if (state->deactivate_trigger != NULL)
|
||||
{
|
||||
ply_trigger_pull (deactivate_trigger, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
state->deactivate_trigger = deactivate_trigger;
|
||||
|
||||
ply_trace ("deactivating");
|
||||
if (state->boot_splash != NULL)
|
||||
{
|
||||
state->deactivate_trigger = deactivate_trigger;
|
||||
ply_boot_splash_become_idle (state->boot_splash,
|
||||
(ply_boot_splash_on_idle_handler_t)
|
||||
on_boot_splash_idle,
|
||||
|
|
@ -769,7 +776,8 @@ on_deactivate (state_t *state,
|
|||
}
|
||||
else
|
||||
{
|
||||
ply_trigger_pull (deactivate_trigger, NULL);
|
||||
ply_trigger_pull (state->deactivate_trigger, NULL);
|
||||
state->deactivate_trigger = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue