diff options
Diffstat (limited to 'apps/xwininfo/xwininfo.c')
-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 f1126e6c0..a69efddc8 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 @@ -441,6 +444,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; @@ -452,7 +456,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"; @@ -536,6 +542,10 @@ main (int argc, char **argv) tree = stats = bits = events = wm = size = shape = 1; continue; } + if (!strcmp(argv[i], "-pause")) { + pauseatend = 1; + continue; + } usage (); } @@ -675,6 +685,7 @@ main (int argc, char **argv) if (shape) Display_Window_Shape (window); printf ("\n"); + if (pauseatend) getchar(); wininfo_wipe (w); xcb_disconnect (dpy); |