From f75e9032c1a32344b8a8c7f6726659df0d269211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 18 Jan 2021 22:32:59 +0100 Subject: [PATCH] meta: Remave meta_activate_session() It's not used anywhere, lets drop it. Part-of: --- src/backends/native/meta-backend-native.c | 29 ----------------------- src/backends/native/meta-launcher.c | 11 --------- src/backends/native/meta-launcher.h | 3 --- src/meta/main.h | 3 --- 4 files changed, 46 deletions(-) diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index cfa9ab810..2807d8862 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -580,35 +580,6 @@ meta_activate_vt (int vt, GError **error) return meta_launcher_activate_vt (launcher, vt, error); } -/** - * meta_activate_session: - * - * Tells mutter to activate the session. When mutter is a - * display server, this tells logind to switch over to - * the new session. - */ -gboolean -meta_activate_session (void) -{ - GError *error = NULL; - MetaBackend *backend = meta_get_backend (); - - /* Do nothing. */ - if (!META_IS_BACKEND_NATIVE (backend)) - return TRUE; - - MetaBackendNative *native = META_BACKEND_NATIVE (backend); - - if (!meta_launcher_activate_session (native->launcher, &error)) - { - g_warning ("Could not activate session: %s", error->message); - g_error_free (error); - return FALSE; - } - - return TRUE; -} - void meta_backend_native_pause (MetaBackendNative *native) { diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c index 190d0fa88..4dafa8e88 100644 --- a/src/backends/native/meta-launcher.c +++ b/src/backends/native/meta-launcher.c @@ -555,17 +555,6 @@ meta_launcher_free (MetaLauncher *self) g_slice_free (MetaLauncher, self); } -gboolean -meta_launcher_activate_session (MetaLauncher *launcher, - GError **error) -{ - if (!login1_session_call_activate_sync (launcher->session_proxy, NULL, error)) - return FALSE; - - sync_active (launcher); - return TRUE; -} - gboolean meta_launcher_activate_vt (MetaLauncher *launcher, signed char vt, diff --git a/src/backends/native/meta-launcher.h b/src/backends/native/meta-launcher.h index f74e154d5..3473f0cf7 100644 --- a/src/backends/native/meta-launcher.h +++ b/src/backends/native/meta-launcher.h @@ -27,9 +27,6 @@ typedef struct _MetaLauncher MetaLauncher; MetaLauncher *meta_launcher_new (GError **error); void meta_launcher_free (MetaLauncher *self); -gboolean meta_launcher_activate_session (MetaLauncher *self, - GError **error); - gboolean meta_launcher_activate_vt (MetaLauncher *self, signed char vt, GError **error); diff --git a/src/meta/main.h b/src/meta/main.h index 6115b7220..5fc4bb892 100644 --- a/src/meta/main.h +++ b/src/meta/main.h @@ -38,9 +38,6 @@ int meta_run (void); META_EXPORT void meta_register_with_session (void); -META_EXPORT -gboolean meta_activate_session (void); /* Actually defined in meta-backend.c */ - META_EXPORT gboolean meta_get_replace_current_wm (void); /* Actually defined in util.c */