]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Tell GDM to do a smooth transition for spinfinity
authorRay Strode <rstrode@redhat.com>
Sat, 13 Sep 2008 17:58:38 +0000 (13:58 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 23 Sep 2008 18:29:38 +0000 (14:29 -0400)
If spinfinity ran and we end up exiting with it
still on screen, tell GDM so that it can open
X up on the same display and do a smooth transition.

configure.ac
src/plugins/splash/spinfinity/plugin.c

index 455e6a2ca805df3a180dd8ee9be0e32f393034ac..6db384480e6705f48f5a252c270de9a307f3b4fc 100644 (file)
@@ -60,6 +60,12 @@ AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[build tests]),enable_tests
 
 AM_CONDITIONAL(ENABLE_TESTS,  [test "$enable_tests" = yes])
 
+AC_ARG_ENABLE(gdm-transition, AS_HELP_STRING([--enable-gdm-transition],[enable smooth transition to gdm]),enable_gdm_transition=$enableval,enable_gdm_transition=no)
+
+if test x$enable_gdm_transition = xyes; then
+  AC_DEFINE(PLY_ENABLE_GDM_TRANSITION, 1, [Enable smooth transition to GDM])
+fi
+
 AC_ARG_WITH(boot-entry, AS_HELP_STRING([--with-boot-entry],[create initrd and grub entry]),with_boot_entry=$withval,with_boot_entry=yes)
 
 AM_CONDITIONAL(ADD_BOOT_ENTRY,  [test "$with_boot_entry" = yes])
index 8dc33c7692cd7452b52199efe5f92ea5a4d08906..ec8176c0a0049268a33a768a24f1dfa2bfe18831 100644 (file)
@@ -101,6 +101,17 @@ create_plugin (void)
   return plugin;
 }
 
+#ifdef PLY_ENABLE_GDM_TRANSITION
+static void
+tell_gdm_to_transition (void)
+{
+  int fd;
+
+  fd = creat ("/var/spool/gdm/force-display-on-active-vt", 0644);
+  close (fd);
+}
+#endif
+
 void
 destroy_plugin (ply_boot_splash_plugin_t *plugin)
 {
@@ -123,6 +134,10 @@ destroy_plugin (ply_boot_splash_plugin_t *plugin)
   ply_throbber_free (plugin->throbber);
   ply_label_free (plugin->label);
 
+#ifdef PLY_ENABLE_GDM_TRANSITION
+  if (plugin->is_visible)
+    tell_gdm_to_transition ();
+#endif
 
   free (plugin);
 }