Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!husc6!bunny!xg00 From: xg00@GTE.COM (Xev Gittler) Newsgroups: comp.windows.x Subject: Re: Dumping a screen, including pop-ups Message-ID: <7606@bunny.GTE.COM> Date: 6 Oct 89 11:38:29 GMT References: <1467@dinl.mmc.UUCP> Distribution: usa Organization: GTE Laboratories, Inc., Waltham, MA Lines: 113 schwartz@dinl.uucp (Michael Schwartz) writes: >In preparing a manual for an application (including X itself), how does >one dump the window including the pop-up menus on it? >When the mouse is being held down for the popup, xwd can't seem to get >the screen. I modified xwps3 (posted recently) to do just that. The diffs are below. I just threw it together, so there is absolutely no documentation, but basically, I added a switch '-timer n', where n is the number of seconds to wait. You start the program running, and select a window (either the root window, or one that will contain the popup), then it will beep at you once a second, until it takes the picture. While it's counting down, you can open any popup you like. Xev Gittler xev@gte.com xev%gte.com@relay.cs.net diff -c /usr/src/local/pub/X/xwps3/extern.h ./extern.h *** /usr/src/local/pub/X/xwps3/extern.h Mon Sep 25 14:25:07 1989 --- ./extern.h Thu Sep 28 08:22:30 1989 *************** *** 18,23 Bool output = PRINT; /* Save to File or Print */ int format = ZPixmap; /* XYBitmap, XYPixmap, ZPixmap */ int rotation = 0; /* In degrees counterclockwise */ float scaleX = 6.0; /* In inches */ float scaleY = 6.0; /* In inches */ float translateX = 1.0; /* In inches */ --- 18,24 ----- Bool output = PRINT; /* Save to File or Print */ int format = ZPixmap; /* XYBitmap, XYPixmap, ZPixmap */ int rotation = 0; /* In degrees counterclockwise */ + int CountDown = 0; /* Timer */ float scaleX = 6.0; /* In inches */ float scaleY = 6.0; /* In inches */ float translateX = 1.0; /* In inches */ diff -c /usr/src/local/pub/X/xwps3/xwps.c ./xwps.c *** /usr/src/local/pub/X/xwps3/xwps.c Mon Sep 25 14:25:08 1989 --- ./xwps.c Thu Sep 28 08:42:09 1989 *************** *** 107,112 sscanf(argv[++i],"%f",&translateY); continue; } if(!strcmp(argv[i],"-inv")){ inverse = 1; continue; --- 107,116 ----- sscanf(argv[++i],"%f",&translateY); continue; } + if(!strcmp(argv[i],"-timer")){ + sscanf(argv[++i],"%d",&CountDown); + continue; + } if(!strcmp(argv[i],"-inv")){ inverse = 1; continue; *************** *** 111,117 inverse = 1; continue; } ! usage(); } --- 115,121 ----- inverse = 1; continue; } ! usage(); } *************** *** 159,164 /* * Inform the user not to alter the screen. */ Beep(); XFlush(dpy); /* --- 163,181 ----- /* * Inform the user not to alter the screen. */ + if (debug) fprintf (stderr,"Time left:"); + for (i=CountDown; i>2; i--) + { + if (debug) + { + fprintf (stderr,"%d ", i); + fflush (stderr); + } + Beep(); + XFlush(dpy); + sleep (1); + } + if (debug) fprintf (stderr, "\n"); Beep(); XFlush(dpy); /* -- Xev Gittler xg00@gte.com, or xg00%gte.com@relay.cs.net