mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 11:00:54 -05:00
call meta_session_shutdown when exiting cleanly
2002-06-08 Havoc Pennington <hp@pobox.com> * src/main.c (main): call meta_session_shutdown when exiting cleanly * src/session.c (meta_session_shutdown): function to change use to RestartIfRunning (meta_session_init): change normal restart hint to RestartImmediately
This commit is contained in:
parent
e694f07144
commit
be44a1d9a5
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2002-06-08 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/main.c (main): call meta_session_shutdown when exiting
|
||||||
|
cleanly
|
||||||
|
|
||||||
|
* src/session.c (meta_session_shutdown): function to change use to
|
||||||
|
RestartIfRunning
|
||||||
|
(meta_session_init): change normal restart hint to
|
||||||
|
RestartImmediately
|
||||||
|
|
||||||
2002-06-08 Havoc Pennington <hp@pobox.com>
|
2002-06-08 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
Yeah I know maximization is broken, I'm too tired to fix it.
|
Yeah I know maximization is broken, I'm too tired to fix it.
|
||||||
|
@ -317,6 +317,8 @@ main (int argc, char **argv)
|
|||||||
g_slist_free (displays);
|
g_slist_free (displays);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
meta_session_shutdown ();
|
||||||
|
|
||||||
if (meta_restart_after_quit)
|
if (meta_restart_after_quit)
|
||||||
{
|
{
|
||||||
GError *err;
|
GError *err;
|
||||||
|
@ -34,6 +34,12 @@ meta_session_init (const char *client_id,
|
|||||||
meta_topic (META_DEBUG_SM, "Compiled without session management support\n");
|
meta_topic (META_DEBUG_SM, "Compiled without session management support\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_session_shutdown (void)
|
||||||
|
{
|
||||||
|
/* nothing */
|
||||||
|
}
|
||||||
|
|
||||||
const MetaWindowSessionInfo*
|
const MetaWindowSessionInfo*
|
||||||
meta_window_lookup_saved_state (MetaWindow *window)
|
meta_window_lookup_saved_state (MetaWindow *window)
|
||||||
{
|
{
|
||||||
@ -284,7 +290,7 @@ meta_session_init (const char *previous_client_id,
|
|||||||
SmProp prop1, prop2, prop3, prop4, prop5, prop6, *props[6];
|
SmProp prop1, prop2, prop3, prop4, prop5, prop6, *props[6];
|
||||||
SmPropValue prop1val, prop2val, prop3val, prop4val, prop5val, prop6val;
|
SmPropValue prop1val, prop2val, prop3val, prop4val, prop5val, prop6val;
|
||||||
char pid[32];
|
char pid[32];
|
||||||
char hint = SmRestartIfRunning;
|
char hint = SmRestartImmediately;
|
||||||
char priority = 20; /* low to run before other apps */
|
char priority = 20; /* low to run before other apps */
|
||||||
|
|
||||||
prop1.name = SmProgram;
|
prop1.name = SmProgram;
|
||||||
@ -348,6 +354,31 @@ meta_session_init (const char *previous_client_id,
|
|||||||
g_free (saved_client_id);
|
g_free (saved_client_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_session_shutdown (void)
|
||||||
|
{
|
||||||
|
/* Change our restart mode to IfRunning */
|
||||||
|
|
||||||
|
SmProp prop1;
|
||||||
|
SmPropValue prop1val;
|
||||||
|
SmProp *props[1];
|
||||||
|
char hint = SmRestartIfRunning;
|
||||||
|
|
||||||
|
if (session_connection == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
prop1.name = SmRestartStyleHint;
|
||||||
|
prop1.type = SmCARD8;
|
||||||
|
prop1.num_vals = 1;
|
||||||
|
prop1.vals = &prop1val;
|
||||||
|
prop1val.value = &hint;
|
||||||
|
prop1val.length = 1;
|
||||||
|
|
||||||
|
props[0] = &prop1;
|
||||||
|
|
||||||
|
SmcSetProperties (session_connection, 1, props);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
disconnect (void)
|
disconnect (void)
|
||||||
{
|
{
|
||||||
|
@ -64,6 +64,8 @@ void meta_session_init (const char *client_id,
|
|||||||
const char *save_file);
|
const char *save_file);
|
||||||
|
|
||||||
|
|
||||||
|
void meta_session_shutdown (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user