- add some more debug spew to help debug a problem jlaska is having

This commit is contained in:
Ray Strode 2008-11-07 18:50:18 +00:00
parent 51a096b698
commit 6d15d5438c

View File

@ -27,8 +27,16 @@ diff -up plymouth-0.6.0/src/libplybootsplash/ply-window.c.more-debug plymouth-0.
ply_trace ("window '%s' will be line buffered", window->tty_name);
diff -up plymouth-0.6.0/src/main.c.more-debug plymouth-0.6.0/src/main.c
--- plymouth-0.6.0/src/main.c.more-debug 2008-11-07 12:01:46.000000000 -0500
+++ plymouth-0.6.0/src/main.c 2008-11-07 12:08:16.000000000 -0500
@@ -220,6 +220,8 @@ has_open_window (state_t *state)
+++ plymouth-0.6.0/src/main.c 2008-11-07 13:49:20.000000000 -0500
@@ -78,6 +78,7 @@ static ply_window_t *create_window (stat
static bool attach_to_running_session (state_t *state);
static void on_escape_pressed (state_t *state);
+static bool has_open_window (state_t *state);
static void
on_session_output (state_t *state,
@@ -220,6 +221,8 @@ has_open_window (state_t *state)
{
ply_list_node_t *node;
@ -37,7 +45,7 @@ diff -up plymouth-0.6.0/src/main.c.more-debug plymouth-0.6.0/src/main.c
node = ply_list_get_first_node (state->windows);
while (node != NULL)
{
@@ -231,7 +233,22 @@ has_open_window (state_t *state)
@@ -231,7 +234,22 @@ has_open_window (state_t *state)
window = ply_list_node_get_data (node);
if (ply_window_is_open (window))
@ -61,21 +69,21 @@ diff -up plymouth-0.6.0/src/main.c.more-debug plymouth-0.6.0/src/main.c
node = next_node;
}
@@ -324,11 +341,22 @@ close_windows (state_t *state)
@@ -324,11 +342,22 @@ close_windows (state_t *state)
static void
on_show_splash (state_t *state)
{
+ bool has_open_window;
+ bool has_window;
+
open_windows (state);
- if (!state->is_redirected && state->ptmx >= 0)
+ has_open_window = has_open_window (state);
+ has_window = has_open_window (state);
+
+ if (!state->is_redirected && state->ptmx >= 0 && has_open_window)
+ if (!state->is_redirected && state->ptmx >= 0 && has_window)
state->is_redirected = attach_to_running_session (state);
+ if (!has_open_window && state->is_redirected)
+ if (!has_window && state->is_redirected)
+ {
+ ply_trace ("no open windows, detaching session");
+ ply_terminal_session_detach (state->session);