From 1c3f19a184c4de46dd72145cc93b412f6b03f148 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sat, 13 Sep 2008 13:58:38 -0400 Subject: [PATCH] Tell GDM to do a smooth transition for spinfinity 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 | 6 ++++++ src/plugins/splash/spinfinity/plugin.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/configure.ac b/configure.ac index 455e6a2c..6db38448 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/src/plugins/splash/spinfinity/plugin.c b/src/plugins/splash/spinfinity/plugin.c index 8dc33c76..ec8176c0 100644 --- a/src/plugins/splash/spinfinity/plugin.c +++ b/src/plugins/splash/spinfinity/plugin.c @@ -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); } -- 2.47.3