From 5f045992f16f37de24a71ea089b9494d4ed9848c Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 12 Nov 2007 19:17:30 +0100 Subject: Add --exit. --- openbox/event.c | 2 ++ openbox/openbox.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'openbox') diff --git a/openbox/event.c b/openbox/event.c index 822168f4..5e44bc9f 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -718,6 +718,8 @@ static void event_handle_root(XEvent *e) ob_reconfigure(); else if (e->xclient.data.l[0] == 2) ob_restart(); + else if (e->xclient.data.l[0] == 3) + ob_exit(0); } break; case PropertyNotify: diff --git a/openbox/openbox.c b/openbox/openbox.c index 77bb0363..6f47fbd0 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -489,6 +489,7 @@ static void print_help() g_print(_("\nPassing messages to a running Openbox instance:\n")); g_print(_(" --reconfigure Reload Openbox's configuration\n")); g_print(_(" --restart Restart Openbox\n")); + g_print(_(" --exit Exit Openbox\n")); g_print(_("\nDebugging options:\n")); g_print(_(" --sync Run in synchronous mode\n")); g_print(_(" --debug Display debugging output\n")); @@ -554,9 +555,13 @@ static void parse_args(gint *argc, gchar **argv) } else if (!strcmp(argv[i], "--reconfigure")) { remote_control = 1; - } else if (!strcmp(argv[i], "--restart")) { + } + else if (!strcmp(argv[i], "--restart")) { remote_control = 2; } + else if (!strcmp(argv[i], "--exit")) { + remote_control = 3; + } else if (!strcmp(argv[i], "--sm-save-file")) { if (i == *argc - 1) /* no args left */ /* not translated cuz it's sekret */ -- cgit v1.2.3