Add a --sync option to turn on synchronous X calls
svn path=/trunk/; revision=3368
This commit is contained in:
parent
118d962b2d
commit
988e5f49dd
@ -1,3 +1,8 @@
|
||||
2207-10-30 iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/main.c (meta_parse_options): Add --sync option
|
||||
(main): Check if the --sync option was passed on command line.
|
||||
|
||||
2007-10-28 Jans Granseuer <jensgr@gmx.net>
|
||||
|
||||
* src/preview-widget.c (meta_preview_finalize): Free title of
|
||||
|
12
src/main.c
12
src/main.c
@ -148,6 +148,7 @@ typedef struct
|
||||
gboolean replace_wm;
|
||||
gboolean disable_sm;
|
||||
gboolean print_version;
|
||||
gboolean sync;
|
||||
} MetaArguments;
|
||||
|
||||
/**
|
||||
@ -200,6 +201,12 @@ meta_parse_options (int *argc, char ***argv,
|
||||
N_("Print version"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"sync", 0, 0, G_OPTION_ARG_NONE,
|
||||
&my_args.sync,
|
||||
N_("Make X calls synchronous"),
|
||||
NULL
|
||||
},
|
||||
{NULL}
|
||||
};
|
||||
GOptionContext *ctx;
|
||||
@ -243,7 +250,7 @@ main (int argc, char **argv)
|
||||
struct sigaction act;
|
||||
sigset_t empty_mask;
|
||||
MetaArguments meta_args;
|
||||
|
||||
|
||||
if (setlocale (LC_ALL, "") == NULL)
|
||||
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
||||
|
||||
@ -264,7 +271,6 @@ main (int argc, char **argv)
|
||||
meta_set_verbose (TRUE);
|
||||
if (g_getenv ("METACITY_DEBUG"))
|
||||
meta_set_debugging (TRUE);
|
||||
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
||||
|
||||
if (g_get_home_dir ())
|
||||
chdir (g_get_home_dir ());
|
||||
@ -278,6 +284,8 @@ main (int argc, char **argv)
|
||||
/* Parse command line arguments.*/
|
||||
meta_parse_options (&argc, &argv, &meta_args);
|
||||
|
||||
meta_set_syncing (meta_args.sync || (g_getenv ("METACITY_SYNC") != NULL));
|
||||
|
||||
if (meta_args.print_version)
|
||||
version ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user