summaryrefslogtreecommitdiff
path: root/src/wayland
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-03-11 17:04:22 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-03-11 17:25:40 -0400
commitd47b7ba0384324a588043f246f91da3b1318b887 (patch)
treed2b38287ef649ce169260b6b931b8e5e9a1c5d08 /src/wayland
parentf21312e2fd3793ff7566d9a301e6927b6840697f (diff)
downloadmutter-d47b7ba0384324a588043f246f91da3b1318b887.tar.gz
Add meta_activate_session
This will be used on startup to switch to the newly activated session.
Diffstat (limited to 'src/wayland')
-rw-r--r--src/wayland/meta-wayland.c15
-rw-r--r--src/wayland/meta-wayland.h2
-rw-r--r--src/wayland/meta-weston-launch.c2
-rw-r--r--src/wayland/meta-weston-launch.h2
4 files changed, 19 insertions, 2 deletions
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index f1f564e0e..8cbe6cf4a 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -734,3 +734,18 @@ meta_wayland_compositor_activate_vt (MetaWaylandCompositor *compositor,
return TRUE;
}
}
+
+gboolean
+meta_wayland_compositor_activate_session (MetaWaylandCompositor *compositor,
+ GError **error)
+{
+ if (compositor->launcher)
+ {
+ return meta_launcher_activate_vt (compositor->launcher, -1, error);
+ }
+ else
+ {
+ g_debug ("Ignoring activate_session, not running as display server");
+ return TRUE;
+ }
+}
diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h
index 481695a75..81bb2e535 100644
--- a/src/wayland/meta-wayland.h
+++ b/src/wayland/meta-wayland.h
@@ -46,6 +46,8 @@ void meta_wayland_compositor_paint_finished (MetaWaylandComp
gboolean meta_wayland_compositor_activate_vt (MetaWaylandCompositor *compositor,
int vt,
GError **error);
+gboolean meta_wayland_compositor_activate_session (MetaWaylandCompositor *compositor,
+ GError **error);
#endif
diff --git a/src/wayland/meta-weston-launch.c b/src/wayland/meta-weston-launch.c
index a33ed4957..95321104c 100644
--- a/src/wayland/meta-weston-launch.c
+++ b/src/wayland/meta-weston-launch.c
@@ -399,7 +399,7 @@ meta_launcher_free (MetaLauncher *launcher)
gboolean
meta_launcher_activate_vt (MetaLauncher *launcher,
- int vt,
+ signed char vt,
GError **error)
{
struct weston_launcher_activate_vt message;
diff --git a/src/wayland/meta-weston-launch.h b/src/wayland/meta-weston-launch.h
index d341eaeac..7fdd03c23 100644
--- a/src/wayland/meta-weston-launch.h
+++ b/src/wayland/meta-weston-launch.h
@@ -29,7 +29,7 @@ MetaLauncher *meta_launcher_new (void);
void meta_launcher_free (MetaLauncher *self);
gboolean meta_launcher_activate_vt (MetaLauncher *self,
- int number,
+ signed char vt,
GError **error);
gboolean meta_launcher_set_drm_fd (MetaLauncher *self,