Merge lp:~muktupavels/lightdm/wayland-on-seat1-test into lp:lightdm

Proposed by Alberts Muktupāvels
Status: Work in progress
Proposed branch: lp:~muktupavels/lightdm/wayland-on-seat1-test
Merge into: lp:lightdm
Diff against target: 119 lines (+47/-3)
3 files modified
src/lightdm.c (+4/-1)
src/seat.c (+41/-2)
src/seat.h (+2/-0)
To merge this branch: bzr merge lp:~muktupavels/lightdm/wayland-on-seat1-test
Reviewer Review Type Date Requested Status
LightDM Development Team Pending
Review via email: mp+316408@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

2466. By Alberts Muktupāvels

Test...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/lightdm.c'
--- src/lightdm.c 2017-01-26 23:04:52 +0000
+++ src/lightdm.c 2017-02-05 16:48:56 +0000
@@ -455,9 +455,12 @@
455455
456 if (seat)456 if (seat)
457 {457 {
458 gboolean can_multi_session = login1_seat_get_can_multi_session (login1_seat);
459
458 set_seat_properties (seat, seat_name);460 set_seat_properties (seat, seat_name);
461 seat_set_can_multi_session (seat, can_multi_session);
459462
460 if (!login1_seat_get_can_multi_session (login1_seat))463 if (!can_multi_session)
461 {464 {
462 g_debug ("Seat %s has property CanMultiSession=no", seat_name);465 g_debug ("Seat %s has property CanMultiSession=no", seat_name);
463 /* XXX: uncomment this line after bug #1371250 is closed.466 /* XXX: uncomment this line after bug #1371250 is closed.
464467
=== modified file 'src/seat.c'
--- src/seat.c 2016-12-09 00:31:30 +0000
+++ src/seat.c 2017-02-05 16:48:56 +0000
@@ -36,6 +36,9 @@
36 /* Configuration for this seat */36 /* Configuration for this seat */
37 GHashTable *properties;37 GHashTable *properties;
3838
39 /* TRUE if CanMultiSession=no */
40 gboolean can_multi_session;
41
39 /* TRUE if this seat can run multiple sessions at once */42 /* TRUE if this seat can run multiple sessions at once */
40 gboolean supports_multi_session;43 gboolean supports_multi_session;
4144
@@ -187,6 +190,13 @@
187}190}
188191
189void192void
193seat_set_can_multi_session (Seat *seat, gboolean can_multi_session)
194{
195 g_return_if_fail (seat != NULL);
196 seat->priv->can_multi_session = can_multi_session;
197}
198
199void
190seat_set_supports_multi_session (Seat *seat, gboolean supports_multi_session)200seat_set_supports_multi_session (Seat *seat, gboolean supports_multi_session)
191{201{
192 g_return_if_fail (seat != NULL);202 g_return_if_fail (seat != NULL);
@@ -439,7 +449,7 @@
439}449}
440450
441static void451static void
442display_server_stopped_cb (DisplayServer *display_server, Seat *seat)452seat_stop_display_server (Seat *seat, DisplayServer *display_server, gboolean switch_to_greeter)
443{453{
444 const gchar *script;454 const gchar *script;
445 GList *list, *link;455 GList *list, *link;
@@ -489,7 +499,7 @@
489 }499 }
490 g_list_free_full (list, g_object_unref);500 g_list_free_full (list, g_object_unref);
491501
492 if (!seat->priv->stopping)502 if (!seat->priv->stopping && switch_to_greeter)
493 {503 {
494 /* If we were the active session, switch to a greeter */504 /* If we were the active session, switch to a greeter */
495 active_session = seat_get_active_session (seat);505 active_session = seat_get_active_session (seat);
@@ -507,6 +517,12 @@
507 g_object_unref (display_server);517 g_object_unref (display_server);
508}518}
509519
520static void
521display_server_stopped_cb (DisplayServer *display_server, Seat *seat)
522{
523 seat_stop_display_server (seat, display_server, TRUE);
524}
525
510static gboolean526static gboolean
511can_share_display_server (Seat *seat, DisplayServer *display_server)527can_share_display_server (Seat *seat, DisplayServer *display_server)
512{528{
@@ -1413,6 +1429,29 @@
1413 {1429 {
1414 if (session_get_is_authenticated (session))1430 if (session_get_is_authenticated (session))
1415 {1431 {
1432 if (!seat->priv->can_multi_session)
1433 {
1434 GList *display_servers, *link;
1435
1436 l_debug (seat, "CanMultiSession=no, stopping existing display servers");
1437 display_servers = g_list_copy (seat->priv->display_servers);
1438
1439 for (link = display_servers; link; link = link->next)
1440 {
1441 DisplayServer *server = link->data;
1442
1443 if (server == display_server)
1444 continue;
1445
1446 g_signal_handlers_disconnect_matched (server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
1447 display_server_stop (server);
1448
1449 seat_stop_display_server (seat, server, FALSE);
1450 }
1451
1452 g_list_free (display_servers);
1453 }
1454
1416 l_debug (seat, "Display server ready, running session");1455 l_debug (seat, "Display server ready, running session");
1417 run_session (seat, session);1456 run_session (seat, session);
1418 }1457 }
14191458
=== modified file 'src/seat.h'
--- src/seat.h 2016-06-19 22:43:19 +0000
+++ src/seat.h 2017-02-05 16:48:56 +0000
@@ -79,6 +79,8 @@
7979
80const gchar *seat_get_name (Seat *seat);80const gchar *seat_get_name (Seat *seat);
8181
82void seat_set_can_multi_session (Seat *seat, gboolean can_multi_session);
83
82void seat_set_supports_multi_session (Seat *seat, gboolean supports_multi_session);84void seat_set_supports_multi_session (Seat *seat, gboolean supports_multi_session);
8385
84void seat_set_share_display_server (Seat *seat, gboolean share_display_server);86void seat_set_share_display_server (Seat *seat, gboolean share_display_server);

Subscribers

People subscribed via source and target branches