1
0
Fork 0

launcher: Move activate_session abstraction into the launcher code

login1 has a separate ActivateSession request, so put it here so
that we don't have to modify any backend code.
This commit is contained in:
Jasper St. Pierre 2014-04-22 17:08:57 -04:00
parent 0d9fa24be4
commit 3c3b94921f
3 changed files with 12 additions and 2 deletions

View file

@ -221,7 +221,7 @@ meta_activate_session (void)
MetaBackendNative *native = META_BACKEND_NATIVE (backend); MetaBackendNative *native = META_BACKEND_NATIVE (backend);
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native); MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
if (!meta_launcher_activate_vt (priv->launcher, -1, &error)) if (!meta_launcher_activate_session (priv->launcher, &error))
{ {
g_warning ("Could not activate session: %s\n", error->message); g_warning ("Could not activate session: %s\n", error->message);
g_error_free (error); g_error_free (error);

View file

@ -394,6 +394,13 @@ meta_launcher_free (MetaLauncher *launcher)
g_slice_free (MetaLauncher, launcher); g_slice_free (MetaLauncher, launcher);
} }
gboolean
meta_launcher_activate_session (MetaLauncher *launcher,
GError **error)
{
return meta_launcher_activate_vt (launcher, -1, error);
}
gboolean gboolean
meta_launcher_activate_vt (MetaLauncher *launcher, meta_launcher_activate_vt (MetaLauncher *launcher,
signed char vt, signed char vt,
@ -406,4 +413,3 @@ meta_launcher_activate_vt (MetaLauncher *launcher,
return send_message_to_wl (launcher, &message, sizeof (message), NULL, NULL, error); return send_message_to_wl (launcher, &message, sizeof (message), NULL, NULL, error);
} }

View file

@ -27,7 +27,11 @@ typedef struct _MetaLauncher MetaLauncher;
MetaLauncher *meta_launcher_new (void); MetaLauncher *meta_launcher_new (void);
void meta_launcher_free (MetaLauncher *self); void meta_launcher_free (MetaLauncher *self);
gboolean meta_launcher_activate_session (MetaLauncher *self,
GError **error);
gboolean meta_launcher_activate_vt (MetaLauncher *self, gboolean meta_launcher_activate_vt (MetaLauncher *self,
signed char vt, signed char vt,
GError **error); GError **error);
#endif /* META_LAUNCHER_H */ #endif /* META_LAUNCHER_H */