summaryrefslogtreecommitdiff
path: root/xeyes.c
diff options
context:
space:
mode:
Diffstat (limited to 'xeyes.c')
-rw-r--r--xeyes.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xeyes.c b/xeyes.c
index a13f0d5..c5484a0 100644
--- a/xeyes.c
+++ b/xeyes.c
@@ -131,8 +131,17 @@ main(int argc, char **argv)
toplevel = XtAppInitialize(&app_context, "XEyes",
options, XtNumber(options), &argc, argv,
NULL, arg, (Cardinal) 0);
- if (argc != 1)
+
+ if (argc != 1) {
+ fputs("Unknown argument(s):", stderr);
+ for (int n = 1; n < argc; n++) {
+ if ((n < (argc -1)) || (argv[n][0] == '-')) {
+ fprintf(stderr, " %s", argv[n]);
+ }
+ }
+ fputs("\n\n", stderr);
usage(1);
+ }
wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
False);