summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@rhansen.org>2023-04-17 15:45:14 -0400
committerRobert Ancell <robert.ancell@gmail.com>2023-04-28 13:34:51 +1200
commitc84feb03279e7b1993e5307d4542e02bd5475629 (patch)
treecb0f429fa1e847f4558c736d442d8796bacb1863
parent967f16c230ae270324b7553dff0ab9395adc47e6 (diff)
downloadlightdm-git-c84feb03279e7b1993e5307d4542e02bd5475629.tar.gz
Move supports_multi_session initialization to init
This makes it possible to use seat_set_supports_multi_session to change the support status after the seat is created but before it is started.
-rw-r--r--src/seat-local.c2
-rw-r--r--src/seat-xremote.c9
-rw-r--r--src/seat-xvnc.c9
3 files changed, 3 insertions, 17 deletions
diff --git a/src/seat-local.c b/src/seat-local.c
index 387d7353..dc7a4508 100644
--- a/src/seat-local.c
+++ b/src/seat-local.c
@@ -56,7 +56,6 @@ xdmcp_x_server_stopped_cb (DisplayServer *display_server, SeatLocal *seat)
static gboolean
seat_local_start (Seat *seat)
{
- seat_set_supports_multi_session (seat, TRUE);
seat_set_share_display_server (seat, seat_get_boolean_property (seat, "xserver-share"));
SeatLocalPrivate *priv = seat_local_get_instance_private (SEAT_LOCAL (seat));
@@ -320,6 +319,7 @@ seat_local_stop (Seat *seat)
static void
seat_local_init (SeatLocal *seat)
{
+ seat_set_supports_multi_session (SEAT (seat), TRUE);
}
static void
diff --git a/src/seat-xremote.c b/src/seat-xremote.c
index d59db4ff..db3cc44e 100644
--- a/src/seat-xremote.c
+++ b/src/seat-xremote.c
@@ -17,13 +17,6 @@
G_DEFINE_TYPE (SeatXRemote, seat_xremote, SEAT_TYPE)
-static gboolean
-seat_xremote_start (Seat *seat)
-{
- seat_set_supports_multi_session (seat, FALSE);
- return SEAT_CLASS (seat_xremote_parent_class)->start (seat);
-}
-
static DisplayServer *
seat_xremote_create_display_server (Seat *seat, Session *session)
{
@@ -73,6 +66,7 @@ seat_xremote_run_script (Seat *seat, DisplayServer *display_server, Process *scr
static void
seat_xremote_init (SeatXRemote *seat)
{
+ seat_set_supports_multi_session (SEAT (seat), FALSE);
}
static void
@@ -80,7 +74,6 @@ seat_xremote_class_init (SeatXRemoteClass *klass)
{
SeatClass *seat_class = SEAT_CLASS (klass);
- seat_class->start = seat_xremote_start;
seat_class->create_display_server = seat_xremote_create_display_server;
seat_class->create_greeter_session = seat_xremote_create_greeter_session;
seat_class->create_session = seat_xremote_create_session;
diff --git a/src/seat-xvnc.c b/src/seat-xvnc.c
index 80abd05d..0d2d1fe9 100644
--- a/src/seat-xvnc.c
+++ b/src/seat-xvnc.c
@@ -36,13 +36,6 @@ SeatXVNC *seat_xvnc_new (GSocket *connection)
return seat;
}
-static gboolean
-seat_xvnc_start (Seat *seat)
-{
- seat_set_supports_multi_session (seat, FALSE);
- return SEAT_CLASS (seat_xvnc_parent_class)->start (seat);
-}
-
static DisplayServer *
seat_xvnc_create_display_server (Seat *seat, Session *session)
{
@@ -104,6 +97,7 @@ seat_xvnc_run_script (Seat *seat, DisplayServer *display_server, Process *script
static void
seat_xvnc_init (SeatXVNC *seat)
{
+ seat_set_supports_multi_session (SEAT (seat), FALSE);
}
static void
@@ -124,7 +118,6 @@ seat_xvnc_class_init (SeatXVNCClass *klass)
SeatClass *seat_class = SEAT_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- seat_class->start = seat_xvnc_start;
seat_class->create_display_server = seat_xvnc_create_display_server;
seat_class->run_script = seat_xvnc_run_script;
object_class->finalize = seat_xvnc_session_finalize;