示例#1
0
文件: main.c 项目: aldatsa/Cinnamon
static void
stop_cinnamon (void)
{
        g_print ("Session ending - shutting down Cinnamon\n");
        cinnamon_global_shutdown ();
        meta_quit (0);
}
示例#2
0
文件: main.c 项目: mchalupa/mutter
static gboolean
on_sigterm (gpointer user_data)
{
  meta_quit (EXIT_SUCCESS);

  return G_SOURCE_REMOVE;
}
示例#3
0
/* This is called when data is available on an ICE connection.  */
static gboolean
process_ice_messages (GIOChannel *channel,
                      GIOCondition condition,
                      gpointer client_data)
{
  IceConn connection = (IceConn) client_data;
  IceProcessMessagesStatus status;

  /* This blocks infinitely sometimes. I don't know what
   * to do about it. Checking "condition" just breaks
   * session management.
   */
  status = IceProcessMessages (connection, NULL, NULL);

  if (status == IceProcessMessagesIOError)
    {
#if 0
      IcePointer context = IceGetConnectionContext (connection);
#endif
      
      /* We were disconnected; close our connection to the
       * session manager, this will result in the ICE connection
       * being cleaned up, since it is owned by libSM.
       */
      disconnect ();
      meta_quit (META_EXIT_SUCCESS);

      return FALSE;
    }
  
  return TRUE;
}
示例#4
0
static void
die_callback (SmcConn smc_conn, SmPointer client_data)
{
  meta_topic (META_DEBUG_SM, "Exiting at request of session manager\n");
  disconnect ();
  meta_quit (META_EXIT_SUCCESS);
}
示例#5
0
文件: main.c 项目: mate-desktop/marco
static gboolean
on_sigterm (GIOChannel   *source,
            GIOCondition condition,
            gpointer     user_data)
{
  meta_quit (META_EXIT_SUCCESS);
  return FALSE;
}
示例#6
0
static gboolean
run_tests (gpointer data)
{
  RunTestsInfo *info = data;
  int i;
  gboolean success = TRUE;

  g_print ("1..%d\n", info->n_tests);

  for (i = 0; i < info->n_tests; i++)
    if (!run_test (info->tests[i], i + 1))
      success = FALSE;

  meta_quit (success ? 0 : 1);

  return FALSE;
}
示例#7
0
文件: main.c 项目: brownsr/muffin
static gboolean
on_sigterm (void)
{
  meta_quit (META_EXIT_SUCCESS);
  return FALSE;
}
示例#8
0
/**
 * Restarts Metacity. In practice, this tells the event loop to stop
 * processing, having first set the meta_restart_after_quit flag which
 * tells Metacity to spawn an identical copy of itself before quitting.
 * This happens on receipt of a _METACITY_RESTART_MESSAGE client event.
 */
void
meta_restart (void)
{
  meta_restart_after_quit = TRUE;
  meta_quit (META_EXIT_SUCCESS);
}