Esempio n. 1
0
static gboolean
gs_manager_deactivate (GSManager *manager)
{
        g_return_val_if_fail (manager != NULL, FALSE);
        g_return_val_if_fail (GS_IS_MANAGER (manager), FALSE);

        if (! manager->priv->active) {
                gs_debug ("Trying to deactivate a screensaver that is not active");
                return FALSE;
        }

        gs_grab_release (manager->priv->grab);

        gs_manager_destroy_windows (manager);

        gs_manager_stop_switch (manager);

        if (manager->priv->blank) {
                gs_manager_timed_lock (manager);
        }

        /* reset state */
        manager->priv->active = FALSE;
        manager->priv->show_content = FALSE;

        return TRUE;
}
Esempio n. 2
0
static gboolean
gs_manager_deactivate (GSManager *manager)
{
	g_return_val_if_fail (manager != NULL, FALSE);
	g_return_val_if_fail (GS_IS_MANAGER (manager), FALSE);

	if (! manager->priv->active)
	{
		gs_debug ("Trying to deactivate a screensaver that is not active");
		return FALSE;
	}

	remove_unfade_idle (manager);
	gs_fade_reset (manager->priv->fade);
	remove_timers (manager);

	gs_grab_release (manager->priv->grab);

	manager_stop_jobs (manager);

	gs_manager_destroy_windows (manager);

	/* reset state */
	manager->priv->active = FALSE;
	manager->priv->activate_time = 0;
	manager->priv->lock_active = FALSE;
	manager->priv->dialog_up = FALSE;
	manager->priv->fading = FALSE;

	return TRUE;
}
Esempio n. 3
0
static void
gs_manager_finalize (GObject *object)
{
        GSManager *manager;

        g_return_if_fail (object != NULL);
        g_return_if_fail (GS_IS_MANAGER (object));

        manager = GS_MANAGER (object);

        g_return_if_fail (manager->priv != NULL);

        gs_grab_release (manager->priv->grab);

        gs_manager_destroy_windows (manager);

        manager->priv->active = FALSE;

        gs_manager_stop_switch (manager);
        gs_manager_stop_lock (manager);

        g_object_unref (manager->priv->grab);

        G_OBJECT_CLASS (gs_manager_parent_class)->finalize (object);
}
Esempio n. 4
0
static void
gs_manager_finalize (GObject *object)
{
	GSManager *manager;

	g_return_if_fail (object != NULL);
	g_return_if_fail (GS_IS_MANAGER (object));

	manager = GS_MANAGER (object);

	g_return_if_fail (manager->priv != NULL);

	if (manager->priv->bg != NULL)
	{
		g_object_unref (manager->priv->bg);
	}

	free_themes (manager);
	g_free (manager->priv->logout_command);
	g_free (manager->priv->keyboard_command);
	g_free (manager->priv->status_message);

	remove_unfade_idle (manager);
	remove_timers (manager);

	gs_grab_release (manager->priv->grab);

	manager_stop_jobs (manager);

	gs_manager_destroy_windows (manager);

	manager->priv->active = FALSE;
	manager->priv->activate_time = 0;
	manager->priv->lock_enabled = FALSE;

	g_object_unref (manager->priv->fade);
	g_object_unref (manager->priv->grab);
	g_object_unref (manager->priv->theme_manager);

	G_OBJECT_CLASS (gs_manager_parent_class)->finalize (object);
}