|
|
ff86aa |
From 014f62a8701e7c69436bfbf37a0f1b73968a23e8 Mon Sep 17 00:00:00 2001
|
|
|
ff86aa |
From: Ray Strode <rstrode@redhat.com>
|
|
|
ff86aa |
Date: Fri, 1 Jul 2016 16:39:59 -0400
|
|
|
ff86aa |
Subject: [PATCH] main: fix escape key for media check
|
|
|
ff86aa |
|
|
|
ff86aa |
Right now, if a show-splash request comes in, then
|
|
|
ff86aa |
we don't actually operate on it until splash delay
|
|
|
ff86aa |
seconds later (~5 by default).
|
|
|
ff86aa |
|
|
|
ff86aa |
The problem is, if a hide-splash request comes in, in the mean
|
|
|
ff86aa |
while, we don't cancel the queued show-splash request.
|
|
|
ff86aa |
|
|
|
ff86aa |
This commit fixes that.
|
|
|
ff86aa |
---
|
|
|
ff86aa |
src/main.c | 10 +++++++++-
|
|
|
ff86aa |
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
ff86aa |
|
|
|
ff86aa |
diff --git a/src/main.c b/src/main.c
|
|
|
ff86aa |
index 7c4ea3c..8a201f8 100644
|
|
|
ff86aa |
--- a/src/main.c
|
|
|
ff86aa |
+++ b/src/main.c
|
|
|
ff86aa |
@@ -1153,62 +1153,70 @@ hide_splash (state_t *state)
|
|
|
ff86aa |
state->is_shown = false;
|
|
|
ff86aa |
|
|
|
ff86aa |
cancel_pending_delayed_show (state);
|
|
|
ff86aa |
|
|
|
ff86aa |
if (state->boot_splash == NULL)
|
|
|
ff86aa |
return;
|
|
|
ff86aa |
|
|
|
ff86aa |
ply_boot_splash_hide (state->boot_splash);
|
|
|
ff86aa |
|
|
|
ff86aa |
if (state->local_console_terminal != NULL)
|
|
|
ff86aa |
ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_TEXT);
|
|
|
ff86aa |
}
|
|
|
ff86aa |
|
|
|
ff86aa |
static void
|
|
|
ff86aa |
dump_details_and_quit_splash (state_t *state)
|
|
|
ff86aa |
{
|
|
|
ff86aa |
state->showing_details = false;
|
|
|
ff86aa |
toggle_between_splash_and_details (state);
|
|
|
ff86aa |
|
|
|
ff86aa |
ply_device_manager_deactivate_renderers (state->device_manager);
|
|
|
ff86aa |
hide_splash (state);
|
|
|
ff86aa |
quit_splash (state);
|
|
|
ff86aa |
}
|
|
|
ff86aa |
|
|
|
ff86aa |
static void
|
|
|
ff86aa |
on_hide_splash (state_t *state)
|
|
|
ff86aa |
{
|
|
|
ff86aa |
if (state->is_inactive)
|
|
|
ff86aa |
return;
|
|
|
ff86aa |
|
|
|
ff86aa |
+ /* If the splash is NULL then we haven't shown it yet,
|
|
|
ff86aa |
+ * but we still need to call hide splash so it won't show
|
|
|
ff86aa |
+ * spontaneously after the splash delay later.
|
|
|
ff86aa |
+ */
|
|
|
ff86aa |
if (state->boot_splash == NULL)
|
|
|
ff86aa |
- return;
|
|
|
ff86aa |
+ {
|
|
|
ff86aa |
+ ply_trace ("cancelling pending show splash operation (if any)");
|
|
|
ff86aa |
+ hide_splash (state);
|
|
|
ff86aa |
+ return;
|
|
|
ff86aa |
+ }
|
|
|
ff86aa |
|
|
|
ff86aa |
ply_trace ("hiding boot splash");
|
|
|
ff86aa |
dump_details_and_quit_splash (state);
|
|
|
ff86aa |
}
|
|
|
ff86aa |
|
|
|
ff86aa |
#ifdef PLY_ENABLE_DEPRECATED_GDM_TRANSITION
|
|
|
ff86aa |
static void
|
|
|
ff86aa |
tell_gdm_to_transition (void)
|
|
|
ff86aa |
{
|
|
|
ff86aa |
int fd;
|
|
|
ff86aa |
|
|
|
ff86aa |
fd = creat ("/var/spool/gdm/force-display-on-active-vt", 0644);
|
|
|
ff86aa |
close (fd);
|
|
|
ff86aa |
}
|
|
|
ff86aa |
#endif
|
|
|
ff86aa |
|
|
|
ff86aa |
static void
|
|
|
ff86aa |
quit_program (state_t *state)
|
|
|
ff86aa |
{
|
|
|
ff86aa |
ply_trace ("cleaning up devices");
|
|
|
ff86aa |
ply_device_manager_free (state->device_manager);
|
|
|
ff86aa |
|
|
|
ff86aa |
ply_trace ("exiting event loop");
|
|
|
ff86aa |
ply_event_loop_exit (state->loop, 0);
|
|
|
ff86aa |
|
|
|
ff86aa |
if (pid_file != NULL)
|
|
|
ff86aa |
{
|
|
|
ff86aa |
unlink (pid_file);
|
|
|
ff86aa |
free (pid_file);
|
|
|
ff86aa |
pid_file = NULL;
|
|
|
ff86aa |
--
|
|
|
ff86aa |
2.7.4
|
|
|
ff86aa |
|