schwartz@dinl.uucp (Michael Schwartz) (10/04/89)
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. Thanks for any tips. -- ----------------------- schwartz%looney@mmc.com "Expect everything ... mschwartz@mmc.com and the unexpected never happens." ncar!dinl!schwartz --the phantom tollbooth DISCLAIMER: The opinions expressesed are not necessarily those of my employer or myself.
klee@gilroy.pa.dec.com (Ken Lee) (10/04/89)
In article <1467@dinl.mmc.UUCP>, 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. Your client is probably doing a server grab when the popup is up. This isn't the greatest idea, but some clients feel the need to do it. You should disable the grab (by modifying the client) when you want to run xwud. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@decwrl.dec.com uucp: uunet!decwrl!klee
marzano@hpfcdj.HP.COM (Lou Marzano) (10/04/89)
You could temporarily hardwire your program to start with the menus popped up. Do this with the call XtPopup(popupShell, XtGrabMode). Then you can use xwd to do the window dump. - Lou Marzano marzano@hpfcpq.HP.COM
david@ics.COM (David B. Lewis) (10/05/89)
screen-dumping and xwd: Someone described a problem with the SelectWindow() used by xwd being unable to grab the pointer when it is already grabbed by a popup. Seems to me that the quick fix is to modify xwd to take a -wholescreen option; it could then get the rootwindow directly, without using SelectWindow. Dump is accomplished by using xwd after a sleep of sufficient time to set-up the screen or by using from another machine the -display that is already there. We do something similar here. -- David B. Lewis david@ics.com ics!david@buita.bu.edu david%ics.UUCP@buita.bu.edu ICS -- Everything you always wanted to know about X, but didn't know where to ask.
schwartz@dinl.uucp (Michael Schwartz) (10/06/89)
Thanks to Dave Curry (of RIACS) for help. Basically, what is required is a program which does not ask X to do the dump. On the Sun, this can be done with screendump, and appropriate manipulations by the PBM tools. Other suggestions were appreciated, thanks again. -- ----------------------- schwartz%looney@mmc.com "Expect everything ... mschwartz@mmc.com and the unexpected never happens." ncar!dinl!schwartz --the phantom tollbooth DISCLAIMER: The opinions expressesed are not necessarily those of my employer or myself.
xg00@GTE.COM (Xev Gittler) (10/06/89)
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
shipley@riki.berkeley.edu (Pete Shipley) (10/08/89)
In article <1467@dinl.mmc.UUCP> 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. > If you are using a sun to run the Xserver you can run the screendump(1) command to capture the screen in to sun raster format. This should work because the screendump command will read the image directly from the screen (as opposed to quering the Xserver). I do not know the what the equivalent comand would be for a Dec, or apollo system (if someone does can they mail me?) Pete Shipley: email: shipley@berkeley.edu Flames: cimarron@postgres.berkeley.edu uunet!lurnix!shipley or ucbvax!shipley or pyramid!hippo!{ root peter } Spelling corections: /dev/null Quote: "Anger is an energy"
argv%turnpike@Sun.COM (Dan Heller) (10/09/89)
In article <7606@bunny.GTE.COM xg00@GTE.COM (Xev Gittler) writes: 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. % sleep N ; beep ; xpws3 ... N = number of seconds to wait. "beep" = a program that beeps or "echo ^G" dan <island!argv@sun.com> ----- My postings reflect my opinion only -- not the opinion of any company.