aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend-dbus/actions.c12
-rw-r--r--src/service.c9
2 files changed, 15 insertions, 6 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index 9030ca7..fcf850d 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -169,7 +169,7 @@ set_dm_seat (IndicatorSessionActionsDbus * self, DisplayManagerSeat * seat)
if (p->dm_seat != NULL)
{
g_cancellable_cancel (p->dm_seat_cancellable);
- g_clear_object (&p->dm_seat);
+ g_clear_object (&p->dm_seat_cancellable);
g_clear_object (&p->dm_seat);
}
@@ -734,7 +734,7 @@ my_about (IndicatorSessionActions * self G_GNUC_UNUSED)
***/
static void
-my_switch_to_screensaver (IndicatorSessionActions * self)
+lock_current_session (IndicatorSessionActions * self)
{
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
@@ -744,6 +744,12 @@ my_switch_to_screensaver (IndicatorSessionActions * self)
}
static void
+my_switch_to_screensaver (IndicatorSessionActions * self)
+{
+ lock_current_session (self);
+}
+
+static void
my_switch_to_greeter (IndicatorSessionActions * self)
{
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
@@ -762,6 +768,8 @@ my_switch_to_guest (IndicatorSessionActions * self)
g_return_if_fail (p->dm_seat != NULL);
+ lock_current_session (self);
+
display_manager_seat_call_switch_to_guest (p->dm_seat, "",
p->dm_seat_cancellable,
NULL, NULL);
diff --git a/src/service.c b/src/service.c
index a097876..b7b1ba2 100644
--- a/src/service.c
+++ b/src/service.c
@@ -768,19 +768,20 @@ init_gactions (IndicatorSessionService * self)
v = create_guest_switcher_state (self);
a = g_simple_action_new_stateful ("switch-to-guest", NULL, v);
g_signal_connect (a, "activate", G_CALLBACK(on_guest_activated), self);
- g_simple_action_group_insert (p->actions, G_ACTION(a));
+ g_action_map_add_action (G_ACTION_MAP (p->actions), G_ACTION(a));
p->guest_switcher_action = a;
/* add switch-to-user action... parameter is the uesrname */
v = create_user_switcher_state (self);
a = g_simple_action_new_stateful ("switch-to-user", G_VARIANT_TYPE_STRING, v);
g_signal_connect (a, "activate", G_CALLBACK(on_user_activated), self);
- g_simple_action_group_insert (p->actions, G_ACTION(a));
+ g_action_map_add_action (G_ACTION_MAP (p->actions), G_ACTION(a));
p->user_switcher_action = a;
/* add the header action */
- a = g_simple_action_new_stateful ("_header", NULL, action_state_for_header (self));
- g_simple_action_group_insert (p->actions, G_ACTION(a));
+ a = g_simple_action_new_stateful ("_header", NULL,
+ action_state_for_header (self));
+ g_action_map_add_action (G_ACTION_MAP (p->actions), G_ACTION(a));
p->header_action = a;
rebuild_now (self, SECTION_HEADER);