934
937
d->dispstat = DISPLAY_DEAD;
936
sysmenu = gdm_daemon_config_get_value_bool_per_display (GDM_KEY_SYSTEM_MENU, d->name);
939
(status == DISPLAY_RESTARTGDM ||
940
status == DISPLAY_REBOOT ||
941
status == DISPLAY_SUSPEND ||
942
status == DISPLAY_HALT)) {
943
gdm_info (_("Restart GDM, Restart machine, Suspend, or Halt request when there is no system menu from display %s"), d->name);
944
status = DISPLAY_REMANAGE;
947
if ( ! d->attached &&
948
(status == DISPLAY_RESTARTGDM ||
949
status == DISPLAY_REBOOT ||
950
status == DISPLAY_SUSPEND ||
951
status == DISPLAY_HALT)) {
952
gdm_info (_("Restart GDM, Restart machine, Suspend or Halt request from a non-static display %s"), d->name);
953
status = DISPLAY_REMANAGE;
939
if (status == DISPLAY_RESTARTGDM ||
940
status == DISPLAY_REBOOT ||
941
status == DISPLAY_SUSPEND ||
942
status == DISPLAY_HALT) {
944
* Reset status to DISPLAY_REMANAGE if it is not valid to
945
* perform the operation
947
sysmenu = gdm_daemon_config_get_value_bool_per_display (
948
GDM_KEY_SYSTEM_MENU, d->name);
951
gdm_info (_("Restart GDM, Restart machine, Suspend, or Halt request when there is no system menu from display %s"), d->name);
952
status = DISPLAY_REMANAGE;
956
if ( ! d->attached) {
957
gdm_info (_("Restart GDM, Restart machine, Suspend or Halt request from a non-static display %s"), d->name);
958
status = DISPLAY_REMANAGE;
961
/* checkout if we can actually do stuff */
964
if (gdm_daemon_config_get_value_string_array (GDM_KEY_REBOOT) == NULL)
965
status = DISPLAY_REMANAGE;
968
if (gdm_daemon_config_get_value_string_array (GDM_KEY_HALT) == NULL)
969
status = DISPLAY_REMANAGE;
971
case DISPLAY_SUSPEND:
972
if (gdm_daemon_config_get_value_string_array (GDM_KEY_SUSPEND) == NULL)
973
status = DISPLAY_REMANAGE;
956
980
if (status == DISPLAY_RUN_CHOOSER) {
957
/* use the chooser on the next run (but only if allowed) */
981
sysmenu = gdm_daemon_config_get_value_bool_per_display (
982
GDM_KEY_SYSTEM_MENU, d->name);
984
/* Use the chooser on the next run (but only if allowed) */
959
gdm_daemon_config_get_value_bool_per_display (GDM_KEY_CHOOSER_BUTTON, d->name))
986
gdm_daemon_config_get_value_bool_per_display (
987
GDM_KEY_CHOOSER_BUTTON, d->name)) {
960
988
d->use_chooser = TRUE;
961
991
status = DISPLAY_REMANAGE;
962
/* go around the display loop detection, these are short
993
* Go around the display loop detection, these are short
963
994
* sessions, so this decreases the chances of the loop
964
* detection being hit */
995
* detection being hit
965
997
d->last_loop_start_time = 0;
968
1000
if (status == DISPLAY_CHOSEN) {
969
/* forget about this indirect id, since this
1002
* Forget about this indirect id, since this
970
1003
* display will be dead very soon, and we don't want it
971
* to take the indirect display with it */
1004
* to take the indirect display with it
972
1006
d->indirect_id = 0;
973
1007
status = DISPLAY_REMANAGE;
980
1014
d->try_different_greeter = FALSE;
982
/* now just remanage */
1016
/* Now just remanage */
983
1017
status = DISPLAY_REMANAGE;
985
1019
d->try_different_greeter = FALSE;
988
/* checkout if we can actually do stuff */
991
if (gdm_daemon_config_get_value_string_array (GDM_KEY_REBOOT) == NULL)
992
status = DISPLAY_REMANAGE;
995
if (gdm_daemon_config_get_value_string_array (GDM_KEY_HALT) == NULL)
996
status = DISPLAY_REMANAGE;
998
case DISPLAY_SUSPEND:
999
if (gdm_daemon_config_get_value_string_array (GDM_KEY_SUSPEND) == NULL)
1000
status = DISPLAY_REMANAGE;
1006
1022
/* if we crashed clear the theme */
1008
1024
g_free (d->theme_name);
1078
1094
d->x_faileds = 1;
1079
1095
d->last_x_failed = now;
1080
/* well sleep at least 3 seconds before starting */
1096
/* Sleep at least 3 seconds before starting */
1081
1097
d->sleep_before_run = 3;
1082
1098
} else if (d->x_faileds >= 3) {
1083
1099
gdm_debug ("gdm_child_action: dealing with X crashes");
1084
1100
if ( ! deal_with_x_crashes (d)) {
1085
1101
gdm_debug ("gdm_child_action: Aborting display");
1086
/* an original way to deal with these things:
1087
* "Screw you guys, I'm going home!" */
1103
* An original way to deal with these
1105
* "Screw you guys, I'm going home!"
1088
1107
gdm_display_unmanage (d);
1090
1109
/* If there are some pending statics,
1138
1162
gdm_start_first_unborn_local (3 /* delay */);
1140
1164
} else if (d->type == TYPE_FLEXI || d->type == TYPE_FLEXI_XNEST) {
1141
/* if this was a chooser session and we have chosen a host,
1142
then we don't want to unmanage, we want to manage and
1166
* If this was a chooser session and we have chosen a
1167
* host, then we don't want to unmanage, we want to
1168
* manage and choose that host
1144
1170
if (d->chosen_hostname != NULL || d->use_chooser) {
1145
1171
if ( ! gdm_display_manage (d)) {
1146
1172
gdm_display_unmanage (d);