aboutsummaryrefslogtreecommitdiff
path: root/apps/xwininfo/xwininfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/xwininfo/xwininfo.c')
-rw-r--r--apps/xwininfo/xwininfo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c
index 70947eef3..3af82d84c 100644
--- a/apps/xwininfo/xwininfo.c
+++ b/apps/xwininfo/xwininfo.c
@@ -74,9 +74,12 @@ of the copyright holder.
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <locale.h>
+#ifndef _MSC_VER
#include <langinfo.h>
+#endif
#ifdef HAVE_ICONV
# include <iconv.h>
#endif
@@ -442,6 +445,7 @@ main (int argc, char **argv)
register int i;
int tree = 0, stats = 0, bits = 0, events = 0, wm = 0, size = 0, shape = 0;
int frame = 0, children = 0;
+ int pauseatend = 0;
int use_root = 0;
xcb_window_t window = 0;
char *display_name = NULL;
@@ -453,7 +457,9 @@ main (int argc, char **argv)
if (!setlocale (LC_ALL, ""))
fprintf (stderr, "%s: can not set locale properly\n", program_name);
+#ifndef _MSC_VER
user_encoding = nl_langinfo (CODESET);
+#endif
if (user_encoding == NULL)
user_encoding = "unknown encoding";
@@ -537,6 +543,10 @@ main (int argc, char **argv)
tree = stats = bits = events = wm = size = shape = 1;
continue;
}
+ if (!strcmp(argv[i], "-pause")) {
+ pauseatend = 1;
+ continue;
+ }
usage ();
}
@@ -676,6 +686,7 @@ main (int argc, char **argv)
if (shape)
Display_Window_Shape (window);
printf ("\n");
+ if (pauseatend) getchar();
wininfo_wipe (w);
xcb_disconnect (dpy);