]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[x11] Ignore ply_console_set_mode calls
authorRay Strode <rstrode@redhat.com>
Sat, 3 Oct 2009 05:37:46 +0000 (01:37 -0400)
committerRay Strode <rstrode@redhat.com>
Sun, 4 Oct 2009 14:45:37 +0000 (10:45 -0400)
Since X is rendering to the console, we don't need
(or want) to move the console between KD_GRAPHICS
and KD_TEXT mode.

src/plugins/renderers/x11/plugin.c

index 5293cf16e6bc863ace877739870bdf37e5ec6bbb..98a4e9ffc0a11b2a8fd6db58d334219859bc89cf 100644 (file)
@@ -83,6 +83,7 @@ struct _ply_renderer_backend
   ply_event_loop_t            *loop;
   ply_renderer_input_source_t  input_source;
   ply_list_t                  *heads;
+  ply_console_t               *console;
 
   ply_fd_watch_t *display_watch;
 };
@@ -106,6 +107,7 @@ create_backend (const char     *device_name,
   backend->loop = ply_event_loop_get_default ();
   backend->heads = ply_list_new ();
   backend->input_source.key_buffer = ply_buffer_new ();
+  backend->console = console;
 
   return backend;
 }
@@ -222,6 +224,11 @@ map_to_device (ply_renderer_backend_t *backend)
   ply_list_node_t *node;
   assert (backend != NULL);
 
+  /* Prevent other parts of plymouth from trying to use
+   * the console, since X draws to it.
+   */
+  ply_console_ignore_mode_changes (backend->console, true);
+
   node = ply_list_get_first_node (backend->heads);
   while (node != NULL)
     {
@@ -284,6 +291,8 @@ unmap_from_device (ply_renderer_backend_t *backend)
 
       node = next_node;
     }
+
+  ply_console_ignore_mode_changes (backend->console, false);
 }
 
 static void