diff options
Diffstat (limited to 'apps/xwininfo/xwininfo.c')
-rwxr-xr-x[-rw-r--r--] | apps/xwininfo/xwininfo.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c index 520719bdd..e3caae4e2 100644..100755 --- 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 @@ -443,6 +446,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; @@ -454,7 +458,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"; @@ -538,6 +544,10 @@ main (int argc, char **argv) tree = stats = bits = events = wm = size = shape = 1; continue; } + if (!strcmp(argv[i], "-pause")) { + pauseatend = 1; + continue; + } if (!strcmp(argv[i], "-version")) { puts(PACKAGE_STRING); exit(0); @@ -683,6 +693,7 @@ main (int argc, char **argv) if (shape) Display_Window_Shape (window); printf ("\n"); + if (pauseatend) getchar(); wininfo_wipe (w); xcb_disconnect (dpy); |