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:
parent
0d9fa24be4
commit
3c3b94921f
@ -221,7 +221,7 @@ meta_activate_session (void)
|
||||
MetaBackendNative *native = META_BACKEND_NATIVE (backend);
|
||||
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_error_free (error);
|
||||
|
@ -394,6 +394,13 @@ meta_launcher_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
|
||||
meta_launcher_activate_vt (MetaLauncher *launcher,
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,11 @@ typedef struct _MetaLauncher MetaLauncher;
|
||||
MetaLauncher *meta_launcher_new (void);
|
||||
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);
|
||||
|
||||
#endif /* META_LAUNCHER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user