1 |
/* Session management module for systems which understand the X Session |
/* Session management module for systems which understand the X Session |
2 |
management protocol. |
management protocol. |
3 |
Copyright (C) 2002, 2002 Free Software Foundation, Inc. |
Copyright (C) 2002 Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
6 |
|
|
167 |
emacs_event.kind = SAVE_SESSION_EVENT; |
emacs_event.kind = SAVE_SESSION_EVENT; |
168 |
} |
} |
169 |
|
|
170 |
/* This is called when the session manager tells us to save ourself. |
/* This is called when the session manager tells us to save ourselves. |
171 |
We set the required properties so the session manager can restart us, |
We set the required properties so the session manager can restart us, |
172 |
plus the current working directory property (not mandatory) so we |
plus the current working directory property (not mandatory) so we |
173 |
are started in the correct directory. |
are started in the correct directory. |
312 |
/* Empty */ |
/* Empty */ |
313 |
} |
} |
314 |
|
|
315 |
/* Error handlers for SM and ICE. We don't wan't to exit Emacs just |
/* Error handlers for SM and ICE. We don't want to exit Emacs just |
316 |
because there is some error in the session management. */ |
because there is some error in the session management. */ |
317 |
static void |
static void |
318 |
smc_error_handler (smcConn, |
smc_error_handler (smcConn, |
443 |
IceAddConnectionWatch (ice_conn_watch_CB, 0); |
IceAddConnectionWatch (ice_conn_watch_CB, 0); |
444 |
|
|
445 |
/* Open the connection to the session manager. A failure is not |
/* Open the connection to the session manager. A failure is not |
446 |
critical, it usualy means that no session manager is running. |
critical, it usually means that no session manager is running. |
447 |
The errorstring is here for debugging. */ |
The errorstring is here for debugging. */ |
448 |
smc_conn = SmcOpenConnection (NULL, NULL, 1, 0, |
smc_conn = SmcOpenConnection (NULL, NULL, 1, 0, |
449 |
(SmcSaveYourselfProcMask| |
(SmcSaveYourselfProcMask| |