Changeset View
Changeset View
Standalone View
Standalone View
ksmserver/server.h
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | 79 | public: | |||
---|---|---|---|---|---|
104 | // error handling | 104 | // error handling | ||
105 | void ioError( IceConn iceConn ); | 105 | void ioError( IceConn iceConn ); | ||
106 | 106 | | |||
107 | // notification | 107 | // notification | ||
108 | void clientSetProgram( KSMClient* client ); | 108 | void clientSetProgram( KSMClient* client ); | ||
109 | void clientRegistered( const char* previousId ); | 109 | void clientRegistered( const char* previousId ); | ||
110 | 110 | | |||
111 | // public API | 111 | // public API | ||
112 | void performLogout(); | ||||
112 | void restoreSession( const QString &sessionName ); | 113 | void restoreSession( const QString &sessionName ); | ||
113 | void startDefaultSession(); | 114 | void startDefaultSession(); | ||
114 | void shutdown( KWorkSpace::ShutdownConfirm confirm, | 115 | void shutdown( KWorkSpace::ShutdownConfirm confirm, | ||
115 | KWorkSpace::ShutdownType sdtype, | 116 | KWorkSpace::ShutdownType sdtype, | ||
116 | KWorkSpace::ShutdownMode sdmode ); | 117 | KWorkSpace::ShutdownMode sdmode ); | ||
117 | 118 | | |||
118 | Q_SIGNALS: | 119 | Q_SIGNALS: | ||
119 | void windowManagerLoaded(); | 120 | void windowManagerLoaded(); | ||
121 | void logoutCancelled(); | ||||
120 | 122 | | |||
121 | public Q_SLOTS: | 123 | public Q_SLOTS: | ||
124 | | ||||
122 | void cleanUp(); | 125 | void cleanUp(); | ||
123 | 126 | | |||
124 | private Q_SLOTS: | 127 | private Q_SLOTS: | ||
125 | void newConnection( int socket ); | 128 | void newConnection( int socket ); | ||
126 | void processData( int socket ); | 129 | void processData( int socket ); | ||
127 | 130 | | |||
128 | void protectionTimeout(); | 131 | void protectionTimeout(); | ||
129 | void timeoutQuit(); | 132 | void timeoutQuit(); | ||
130 | void timeoutWMQuit(); | 133 | void timeoutWMQuit(); | ||
131 | 134 | | |||
132 | void pendingShutdownTimeout(); | | |||
133 | void wmProcessChange(); | 135 | void wmProcessChange(); | ||
134 | 136 | | |||
135 | void defaultLogout(); | 137 | void defaultLogout(); | ||
136 | void logoutWithoutConfirmation(); | 138 | void logoutWithoutConfirmation(); | ||
137 | void haltWithoutConfirmation(); | 139 | void haltWithoutConfirmation(); | ||
138 | void rebootWithoutConfirmation(); | 140 | void rebootWithoutConfirmation(); | ||
139 | 141 | | |||
140 | private: | 142 | private: | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
182 | QByteArray windowSessionId(WId w, WId leader); | 184 | QByteArray windowSessionId(WId w, WId leader); | ||
183 | 185 | | |||
184 | void setupShortcuts(); | 186 | void setupShortcuts(); | ||
185 | void tryRestoreNext(); | 187 | void tryRestoreNext(); | ||
186 | void startupDone(); | 188 | void startupDone(); | ||
187 | 189 | | |||
188 | void runShutdownScripts(); | 190 | void runShutdownScripts(); | ||
189 | 191 | | |||
190 | void performLogout(); | | |||
191 | 192 | | |||
192 | // public dcop interface | 193 | // public dcop interface | ||
193 | 194 | | |||
194 | public Q_SLOTS: //public dcop interface | 195 | public Q_SLOTS: //public dcop interface | ||
195 | void logout( int, int, int ); | 196 | void logout( int, int, int ); | ||
196 | bool canShutdown(); | 197 | bool canShutdown(); | ||
197 | bool isShuttingDown() const; | 198 | bool isShuttingDown() const; | ||
198 | QString currentSession(); | 199 | QString currentSession(); | ||
Show All 24 Lines | 220 | enum State | |||
223 | Shutdown, Checkpoint, Killing, KillingWM, WaitingForKNotify, // shutdown | 224 | Shutdown, Checkpoint, Killing, KillingWM, WaitingForKNotify, // shutdown | ||
224 | ClosingSubSession, KillingSubSession, RestoringSubSession | 225 | ClosingSubSession, KillingSubSession, RestoringSubSession | ||
225 | }; | 226 | }; | ||
226 | State state; | 227 | State state; | ||
227 | bool saveSession; | 228 | bool saveSession; | ||
228 | int wmPhase1WaitingCount; | 229 | int wmPhase1WaitingCount; | ||
229 | int saveType; | 230 | int saveType; | ||
230 | 231 | | |||
231 | KWorkSpace::ShutdownType shutdownType; | | |||
232 | KWorkSpace::ShutdownMode shutdownMode; | | |||
233 | QString bootOption; | | |||
234 | | ||||
235 | bool clean; | 232 | bool clean; | ||
236 | KSMClient* clientInteracting; | 233 | KSMClient* clientInteracting; | ||
237 | QString wm; | 234 | QString wm; | ||
238 | QStringList wmCommands; | 235 | QStringList wmCommands; | ||
239 | KProcess* wmProcess; | 236 | KProcess* wmProcess; | ||
240 | QString sessionGroup; | 237 | QString sessionGroup; | ||
241 | QString sessionName; | 238 | QString sessionName; | ||
242 | QTimer protectionTimer; | 239 | QTimer protectionTimer; | ||
243 | QTimer restoreTimer; | 240 | QTimer restoreTimer; | ||
244 | QString xonCommand; | 241 | QString xonCommand; | ||
245 | QTimer pendingShutdown; | | |||
246 | QWidget* logoutEffectWidget; | 242 | QWidget* logoutEffectWidget; | ||
247 | KWorkSpace::ShutdownConfirm pendingShutdown_confirm; | | |||
248 | KWorkSpace::ShutdownType pendingShutdown_sdtype; | | |||
249 | KWorkSpace::ShutdownMode pendingShutdown_sdmode; | | |||
250 | | ||||
251 | // sequential startup | 243 | // sequential startup | ||
252 | int appsToStart; | 244 | int appsToStart; | ||
253 | int lastAppStarted; | 245 | int lastAppStarted; | ||
254 | QString lastIdStarted; | 246 | QString lastIdStarted; | ||
255 | 247 | | |||
256 | QStringList excludeApps; | 248 | QStringList excludeApps; | ||
257 | 249 | | |||
258 | WindowMap legacyWindows; | 250 | WindowMap legacyWindows; | ||
Show All 16 Lines |