]>
Commit | Line | Data |
---|---|---|
b3c6b21e MK |
1 | diff --git a/kdm/backend/greet.h b/kdm/backend/greet.h |
2 | index 2ef7026..41f0791 100644 | |
3 | --- a/kdm/backend/greet.h | |
4 | +++ b/kdm/backend/greet.h | |
5 | @@ -146,8 +146,6 @@ from the copyright holder. | |
6 | #define G_DChoose 3 /* run chooser */ | |
7 | #endif | |
8 | ||
9 | -#define G_Interact 4 /* greeter got user input. possible crash is probably not spontaneous. */ | |
10 | - | |
11 | #define G_Shutdown 101 /* 5*int, string; async */ | |
12 | # define SHUT_REBOOT 1 /* how */ | |
13 | # define SHUT_HALT 2 | |
14 | diff --git a/kdm/backend/session.c b/kdm/backend/session.c | |
15 | index 85ab1d7..1b47e9c 100644 | |
16 | --- a/kdm/backend/session.c | |
17 | +++ b/kdm/backend/session.c | |
18 | @@ -409,12 +409,16 @@ void | |
19 | openGreeter() | |
20 | { | |
21 | char *name, **env; | |
22 | + static time_t lastStart; | |
23 | int cmd; | |
24 | Cursor xcursor; | |
25 | ||
26 | gSet(&grttalk); | |
27 | if (grtproc.pid > 0) | |
28 | return; | |
29 | + updateNow(); | |
30 | + if (now < lastStart + 10) /* XXX should use some readiness indicator instead */ | |
31 | + sessionExit(EX_UNMANAGE_DPY); | |
32 | ASPrintf(&name, "greeter for display %s", td->name); | |
33 | debug("starting %s\n", name); | |
34 | ||
35 | @@ -443,6 +447,8 @@ openGreeter() | |
36 | sessionExit(EX_UNMANAGE_DPY); | |
37 | } | |
38 | debug("%s ready\n", name); | |
39 | + updateNow(); | |
40 | + lastStart = now; | |
41 | } | |
42 | ||
43 | int | |
44 | @@ -544,7 +550,7 @@ manageSession(void) | |
45 | { | |
46 | int ex, cmd; | |
47 | volatile int clientPid = -1; | |
48 | - time_t tdiff, startt; | |
49 | + time_t tdiff; | |
50 | ||
51 | debug("manageSession %s\n", td->name); | |
52 | if ((ex = Setjmp(abortSession))) { | |
53 | @@ -576,13 +582,10 @@ manageSession(void) | |
54 | updateNow(); | |
55 | tdiff = now - td->hstent->lastExit - td->openDelay; | |
56 | if (autoLogon(tdiff)) { | |
57 | - if (!verify(conv_auto, False)) { | |
58 | - startt = now; | |
59 | + if (!verify(conv_auto, False)) | |
60 | goto gcont; | |
61 | - } | |
62 | } else { | |
63 | regreet: | |
64 | - startt = now; | |
65 | openGreeter(); | |
66 | #ifdef XDMCP | |
67 | if (((td->displayType & d_location) == dLocal) && | |
68 | @@ -596,10 +599,6 @@ manageSession(void) | |
69 | G_GreetTimed : G_Greet); | |
70 | gcont: | |
71 | cmd = ctrlGreeterWait(True); | |
72 | - if (cmd == G_Interact) { | |
73 | - startt = 0; | |
74 | - goto gcont; | |
75 | - } | |
76 | #ifdef XDMCP | |
77 | while (cmd == G_DChoose) { | |
78 | choose: | |
79 | @@ -616,9 +615,6 @@ manageSession(void) | |
80 | logError("Received unknown command %d from greeter\n", cmd); | |
81 | closeGreeter(True); | |
82 | } | |
83 | - updateNow(); | |
84 | - if (now < startt + 120) /* Greeter crashed spontaneously. Avoid endless loop. */ | |
85 | - sessionExit(EX_UNMANAGE_DPY); | |
86 | goto regreet; | |
87 | } | |
88 | } | |
89 | diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp | |
90 | index f169248..1bb744c 100644 | |
91 | --- a/kdm/kfrontend/kgapp.cpp | |
92 | +++ b/kdm/kfrontend/kgapp.cpp | |
93 | @@ -74,7 +74,7 @@ sigAlarm(int) | |
94 | ||
95 | GreeterApp::GreeterApp(int &argc, char **argv) : | |
96 | inherited(argc, argv), | |
97 | - regrabPtr(false), regrabKbd(false), initalBusy(true), sendInteract(false), | |
98 | + regrabPtr(false), regrabKbd(false), initalBusy(true), | |
99 | dragWidget(0) | |
100 | { | |
101 | pingInterval = _isLocal ? 0 : _pingInterval; | |
102 | @@ -203,14 +203,6 @@ GreeterApp::x11EventFilter(XEvent * ev) | |
103 | break; | |
104 | } | |
105 | break; | |
106 | - default: | |
107 | - return false; | |
108 | - } | |
109 | - if (sendInteract) { | |
110 | - sendInteract = false; | |
111 | - // We assume that no asynchronous communication is going on | |
112 | - // before the first user interaction. | |
113 | - gSendInt(G_Interact); | |
114 | } | |
115 | return false; | |
116 | } | |
117 | @@ -487,7 +479,6 @@ main(int argc ATTR_UNUSED, char **argv) | |
118 | } | |
119 | } | |
120 | QObject::connect(dialog, SIGNAL(ready()), &app, SLOT(markReady())); | |
121 | - app.enableSendInteract(); | |
122 | debug("entering event loop\n"); | |
123 | rslt = dialog->exec(); | |
124 | debug("left event loop\n"); | |
125 | diff --git a/kdm/kfrontend/kgapp.h b/kdm/kfrontend/kgapp.h | |
126 | index b7c1b97..0979950 100644 | |
127 | --- a/kdm/kfrontend/kgapp.h | |
128 | +++ b/kdm/kfrontend/kgapp.h | |
129 | @@ -37,7 +37,6 @@ class GreeterApp : public QApplication { | |
130 | public: | |
131 | GreeterApp(int &argc, char **argv); | |
132 | void markBusy(); | |
133 | - void enableSendInteract() { sendInteract = true; } | |
134 | virtual bool x11EventFilter(XEvent *); | |
135 | ||
136 | public Q_SLOTS: | |
137 | @@ -51,7 +50,7 @@ class GreeterApp : public QApplication { | |
138 | ||
139 | private: | |
140 | int pingInterval, pingTimerId; | |
141 | - bool regrabPtr, regrabKbd, initalBusy, sendInteract; | |
142 | + bool regrabPtr, regrabKbd, initalBusy; | |
143 | QPoint mouseStartPos, dialogStartPos; | |
144 | QWidget *dragWidget; | |
145 | }; |