aboutsummaryrefslogtreecommitdiff
path: root/apps/xwininfo
diff options
context:
space:
mode:
Diffstat (limited to 'apps/xwininfo')
-rw-r--r--apps/xwininfo/autogen.sh5
-rw-r--r--apps/xwininfo/configure.ac3
-rw-r--r--apps/xwininfo/dsimple.h2
-rw-r--r--apps/xwininfo/man/xwininfo.man8
-rwxr-xr-x[-rw-r--r--]apps/xwininfo/xwininfo.c8
5 files changed, 19 insertions, 7 deletions
diff --git a/apps/xwininfo/autogen.sh b/apps/xwininfo/autogen.sh
index e81f98910..fc34bd55c 100644
--- a/apps/xwininfo/autogen.sh
+++ b/apps/xwininfo/autogen.sh
@@ -9,5 +9,6 @@ cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
-$srcdir/configure --enable-maintainer-mode "$@"
-
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff --git a/apps/xwininfo/configure.ac b/apps/xwininfo/configure.ac
index b28dd894a..3149a5fe6 100644
--- a/apps/xwininfo/configure.ac
+++ b/apps/xwininfo/configure.ac
@@ -31,7 +31,6 @@ AC_USE_SYSTEM_EXTENSIONS
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
AM_ICONV
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
@@ -67,7 +66,7 @@ PKG_CHECK_MODULES(XWININFO, [xcb >= 1.6] xcb-shape ${xcb_icccm_pc})
# Even when using xcb, xproto is still required for Xfuncproto.h
# and libX11 headers for cursorfont.h
-PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.17])
+PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.25])
XWININFO_CFLAGS="${XWININFO_CFLAGS} ${XLIB_CFLAGS}"
XWININFO_LIBS="${XWININFO_LIBS} ${LIBICONV}"
diff --git a/apps/xwininfo/dsimple.h b/apps/xwininfo/dsimple.h
index d0dd71ae9..7dacdee92 100644
--- a/apps/xwininfo/dsimple.h
+++ b/apps/xwininfo/dsimple.h
@@ -55,7 +55,7 @@ void Setup_Display_And_Screen (const char *displayname,
xcb_window_t Select_Window (xcb_connection_t *, const xcb_screen_t *, int);
xcb_window_t Window_With_Name (xcb_connection_t *, xcb_window_t, const char *);
-void Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2);
+void Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2) _X_COLD;
void Print_X_Error (xcb_connection_t *, xcb_generic_error_t *);
diff --git a/apps/xwininfo/man/xwininfo.man b/apps/xwininfo/man/xwininfo.man
index 6da713943..66418c6dd 100644
--- a/apps/xwininfo/man/xwininfo.man
+++ b/apps/xwininfo/man/xwininfo.man
@@ -32,7 +32,7 @@ xwininfo \- window information utility for X
[\-children] [\-tree] [\-stats] [\-bits] [\-events] [\-size] [\-wm] [\-shape]
[\-frame] [\-all]
[\-english] [\-metric]
-[\-display \fIdisplay\fP]
+[\-display \fIdisplay\fP] [\-version]
.SH DESCRIPTION
.PP
.I Xwininfo
@@ -154,6 +154,12 @@ This option is a quick way to ask for all information possible.
.TP 8
.B \-display \fIdisplay\fP
This option allows you to specify the server to connect to; see \fIX(__miscmansuffix__)\fP.
+PP
+.TP 8
+.B \-version
+This option indicates that
+.I xwininfo
+should print its version information and exit.
.SH EXAMPLE
.PP
The following is a sample summary taken with no options specified:
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c
index 59e09aff8..cda2e2f9d 100644..100755
--- a/apps/xwininfo/xwininfo.c
+++ b/apps/xwininfo/xwininfo.c
@@ -281,7 +281,7 @@ static size_t strlcat (char *dst, const char *src, size_t dstsize)
/*
* Report the syntax for calling xwininfo:
*/
-_X_NORETURN
+_X_NORETURN _X_COLD
static void
usage (void)
{
@@ -289,6 +289,7 @@ usage (void)
"usage: %s [-options ...]\n\n"
"where options include:\n"
" -help print this message\n"
+ " -version print version message\n"
" -display host:dpy X server to contact\n"
" -root use the root window\n"
" -id windowid use the window with the specified id\n"
@@ -546,7 +547,12 @@ main (int argc, char **argv)
if (!strcmp(argv[i], "-pause")) {
pauseatend = 1;
continue;
+ if (!strcmp(argv[i], "-version")) {
+ puts(PACKAGE_STRING);
+ exit(0);
}
+ fprintf (stderr, "%s: unrecognized argument %s\n\n",
+ program_name, argv[i]);
usage ();
}