summaryrefslogtreecommitdiff
path: root/src/seat.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-08-25 12:05:33 +1200
committerRobert Ancell <robert.ancell@canonical.com>2013-08-25 12:05:33 +1200
commitb281bf1817c229244c7221b7485397d2bd9c5c2e (patch)
treeff4ae92bba3e3f063d0b9b3b99b16ae38f6e18c6 /src/seat.c
parent793f9e986202e179ab80d9efcf69f4178e01781d (diff)
downloadlightdm-b281bf1817c229244c7221b7485397d2bd9c5c2e.tar.gz
Don't try and switch if already active
Diffstat (limited to 'src/seat.c')
-rw-r--r--src/seat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/seat.c b/src/seat.c
index 4c23d0f6..a2555b88 100644
--- a/src/seat.c
+++ b/src/seat.c
@@ -1257,6 +1257,11 @@ seat_switch_to_user (Seat *seat, const gchar *username, const gchar *session_nam
if (!seat->priv->can_switch)
return FALSE;
+ /* If we're already on this session, then ignore */
+ session = find_user_session (seat, username, NULL);
+ if (session && session == seat->priv->active_session)
+ return TRUE;
+
l_debug (seat, "Switching to user %s", username);
/* Attempt to authenticate them */