HDTenEightyP/NetNews huggingface dataset:
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: X Error on busy cursor routine from FAQ
Organization: McGill Research Centre for Intelligent Machines
Date: Fri, 28 Aug 92 08:55:55 GMT

In article <1992Aug25.224324.7877@asd.com>, scott@asd.com (Scott Barman) writes:

> I read the FAQ.  I wanted a busy cursor and have input blocked, so I
> wrote a function based on what I found in FAQ #122.  [...]  However,
> when I run the code I get the following error:

> X Error of failed request:  BadWindow (invalid Window parameter)
>   Major opcode of failed request:  1 (X_CreateWindow)
[...]
> (Environment: X11R4pl18, Motif 1.1.5, SunOS 4.1.1, Xsun server and mwm)

> The function (included below), is called from an XmNactivateCallback
> for a Motif pushButton widget.  The callback works as follows:

> 	busyCursor(topLevel, 1);	/* turn on busy cursor */
> 	set SIGCHLD to be caught by a function that will turn busyCursor off;
> 	fork();
> 	if the child process
> 		close all fds > 2;
> 		exec desired program
> 	return;

It is very dangerous to do any X calls from a signal handler; you have
to make *certain* the signal can't interrupt another X call.  (Unless
you are lucky enough to have a signal-safe Xlib, in which case you're
asking for portability problems, because most Xlibs aren't.)

In this case, you're getting a very informative error: a BadWindow
error means that the CreateWindow request was passed a window argument,
but the argument was not a valid window ID.  The CreateWindow request
takes two window arguments, one of which is the new window's ID,
generated by Xlib, which hence does not appear at the Xlib call level.
The other one is the parent window, which in your sample code is given
as XtWindow(topLevel).  I don't really know Xt; from what I've seen fly
by on the net, I'd guess that perhaps you haven't realized topLevel,
except that that doesn't make much sense when this is happening in a
pushbutton callback.

This still leaves it unclear what's going wrong.  About all I can
suggest is running your program under the control of a protocol spy,
like xscope or xmond, to see what's *really* getting passed, then
poking around with a debugger to see how come XtWindow(topLevel) is
that value.

There is one other problem I noticed with your code:

> static Window   busyWindow = NULL;

This is definitely wrong, though you will likely get away with it often
enough to cause trouble.  NULL can be any of several things, one of
which is (void *)0.  This is usually incompatible with the Window type.
What I would recommend is

static Window busyWindow = None;

coupled with a change from

> 	if (!busyWindow) {

to

	if (busyWindow != None) {

Some of this may be excessive paranoia; I'm not sure just how much the
Xlib interface spec promises....

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
Newsgroups: comp.windows.x
From: mills@ccu.umanitoba.ca (Gary Mills)
Subject: X11R5 binaries for Sun-3 wanted
Organization: University of Manitoba, Winnipeg, Canada
Date: Fri, 28 Aug 1992 17:01:30 GMT

Does anyone have SunOS 4.1.1 binaries of X11R5 for the sun3 architecture
available by anonymous FTP?  I searched archie, but found nothing on this
continent.  I have a 3/60, and don't want to run Sunview.

-- 
-Gary Mills-         -Networking Group-          -U of M Computer Services-
Newsgroups: comp.windows.x
From: rvloon@cv.ruu.nl (Ronald van Loon)
Subject: Re: Xnlock -- bug -- where's its author?
Originator: rvloon@wodan.cv.ruu.nl
Date: Fri, 28 Aug 1992 07:08:48 GMT
Organization: University of Utrecht, 3D Computer Vision Research Group
Keywords: xnlock

In <21193@optima.cs.arizona.edu> azhao@cs.arizona.edu (Qiang Alex Zhao) writes:


|"I met some serious problem in using xnlock -- but my email to the
|"author, "Dan Heller" <argv@sun.com>, bounced back. If anybody knows
|"him, please forward the following to him? Or if somebody knows the
|"answer to my problem, please let me know? Thanks a lot!
|"
|".......................................................................
|"
|"Hi,
|"
|"I ftp'ed xnlock version 3 from export.lcs.mit.edu -- I thought it was a
|"very interesting program. It worked fine on my Sun workstation.
|"
|"A serious problem occurs when I run it on a X terminal -- after about
|"10 minutes idle time, xnlock kills my entire X session. The X terminal
|"is a Sun3/75 running xdm; its file server (for the X excutables, like
|"xdm) is a Sun3/80; xdm is connected with a SPARCstation 2 running SunOS
|"4.1.1-IPX as login user's file server.
|"
|"Any explanation? Thanks a lot.

XnLock is not written properly; it queues up all events (proof: start a XClock
start xnlock, wait 2 mins or so, unlock, see the clock speed up) Your server
crashes because it runs out of memory. Use xlock instead.
-- 
Ronald van Loon (rvloon@cv.ruu.nl) 3DCV Group, Utrecht, The Netherlands.

"I believe the word you are looking for is "AAAAAAAAAARRRRRRRRRRGGGGGHHHH!"
    - The Penguin (Batman ][)
Newsgroups: comp.windows.x
From: kemnitz@netcom.com (Greg Kemnitz)
Subject: Pixmap format? Re: XPM Question
Date: Sun, 23 Aug 92 19:52:22 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

In article <27455@sophia.inria.fr> lehors@koala.inria.fr (Arnaud Le Hors) writes:
=
=The only documentation of XPM resides as a TeX file called xpm.tex which is
=part of the Xpm distribution (tar file) and its postscript version called
=xpm.ps both available on export.

The only minor complain of xpm is the lousy obscure font on xpm.ps which
hardly be read on a pre-viewer, especially for users who do not have
postcript printer and do not know about Tex.
Otherwise, Xpm is really a great program or library.

=
=-- 
= Arnaud LE HORS - lehors@sophia.inria.fr - BULL Research France, Koala Project


For a large image file, I would like to read/write in a binary form.
I try to figure out Pixmap format or something I can fwrite to
a file and fread in from a file.

I can not find the Pixmap definition in anywhere.
Is it a strucutre or a Char * or what?

Newsgroups: comp.windows.x
From: rfrazier%peruvian.utah.edu@cs.utah.edu (Robert Frazier)
Subject: X Animation
Date: 3 Sep 92 23:31:50 MDT
Summary: Fast x animation 
Organization: University of Utah CS Dept
Distribution: World

	I understand that there are two "better" ways to do animation.  One
involves, xor'ing to a pixmap and then back or something.  The other involves
color table flipping.  I would appreciate some detailed information and 
examples of these methods, especially the color table flipping.  I am
interested in the fastest animation possible.

	Thanks very much,

	R. Todd Frazier
	rfrazier@peruvian.utah.edu




	R. Todd Frazier
From: sinan@Mtesol.boeing.COM (Sinan Karasu)
Newsgroups: comp.windows.x
Subject: Re: Sun Widget Set
Date: 28 Aug 92 21:54:00 GMT
Organization: The Internet


> Does anyone know of a "widget set" for Sun workstations that is layered upon
> Xlib and Xt?  We are looking at developing an interactive data visualization
> tool tailored to some special-purpose analysis requirements, and a "widget set

If you have Suns , you already have OLIT and XView...Just get DevGuide
and drag and drop away.....

Sinan
From: klee@wsl.dec.com (Ken Lee)
Newsgroups: comp.windows.x
Subject: Re: Xwst3d window server runs out of memory
Date: 31 Aug 92 16:57:24 GMT
Reply-To: klee@wsl.dec.com
Organization: DEC Western Software Laboratory

|> The problem in this configuration is that programs that work fine on any
|> regular Xws display fail with an X window error BadAlloc on the Xwst3d
|> when it is tried to load larger sized images (> 1k x 1k) into pixmaps.
|> The server apparently runs out of resources (data memory?). Smaller
|> images work fine.

It is common for X servers supporting graphics accelerators to limit pixmaps
to the size of the screen (root window).

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee
From: roberts@studguppy.lanl.gov (Doug Roberts)
Newsgroups: comp.windows.x
Subject: mxgdb1.1.4 Bug
Date: 28 Aug 92 16:24:30 GMT
Organization: Technology Modeling and Analysis, LANL-A7

Hello all. 

Thought I'd report a bug in mxgdb version 1.1.4. 
(Sun SPARC, SunOS 4.1.1, X11R5p12, Motif 1.1.4)

When inserting a break in a for loop, i.e.:

for (count = 0; count < num_processes; ++count)
        {
                Foundry *foo = new Foundry;
--> Break Here  printf ("Fubar\n");
        }

stepping through the loop doesn't work. You can step through the first
time, but then the break is deleted and the loop runs to completion.

This same problem does _not_ exist in xxgdb version 1.06.

--Doug
--

==================================================================
Douglas Roberts                |
Los Alamos National Laboratory | All good work is done in defiance
dzzr@lanl.gov                  |  of management. -- Bob Woodward
(505)667-4569                  |
==================================================================
From: ric@updike.sri.com (Richard Steinberger)
Newsgroups: comp.windows.x
Subject: XtAddInput or XtAddTimeout question
Date: 27 Aug 92 21:30:23 GMT
Organization: sri
Originator: ric@updike


	I would "like" to use XtAddInput() to allow an X application to
read data from a (IPC) message queue.  The man page specifies that the first
argument needs to be an integer file descriptor for a file that is
expecting data to be read or written (essentially).

	What I would like to do (instead) is to check whether there are any
messages (of a given type) pending in a message queue.  I would need to use
the system call msgrcv() to do this.  Since message queues do not use file
descriptors, using XtAddInput may be problematic.  [Conceivably,
I could have the sending process write to a file that the receiving process
has open, but that seems convoluted].

	Instead, I am thinking of using XtAddTimeout() to check the message
queue every few seconds.  XtAddTimeout() would supply the name of a 
routine that executes a non-blocking msgrcv() call, processes any
messages, then re-establishes XtAddTimeout().  This is polling, clear and
simple, am I can probably live with it.

	My question: Is this (polling) the best way to go?  Has anyone else
used message queues in X applications and found a more elegant way to be
notified of the presence of a message of a particular type (or lacking that,
any message at all)?  Thanks for any suggestions.  Please reply to the
address below.

regards,
	ric steinberger
	ric@updike.sri.com
From: adelt@imada.ou.dk (Adel Shavandi)
Newsgroups: comp.windows.x
Subject: XView forking problem
Summary: XView forking problem, how?
Keywords: XView forking problem, how ?
Date: 27 Aug 92 12:18:25 GMT
Organization: Dept. of Math. & Computer Science, Odense University, Denmark



I have a problem when forking my XView program:



// ...
switch (pid=fork()) 
	{
	case -1:
		//perror("VisInterface::action(): fork() failed!");
		exit (1);
	case 0:	// child
		childProcess ();
	default:
		parentProcess ();
		break;
	}

// ...

In the child process I try to draw in a window and display* that
is shared with the parent. After each drawing I call XFlush(dpy)
to empty the buffer. First time I spawn a child, everything is
without problem and I draw and then clear the object. But if in 
same program I spawn the child once more, I get the following 
error:

parent> running
XView error:
 
The version of OpenWindows, I use, is 2.0. I will really appraciate
if somebody can help me to find out why this error is happening.


email:  adelt@imada.ou.dk



			Thanks,
				Ade`l
From: dvanderr@oracle.com (Danny Vanderryn)
Newsgroups: comp.windows.x
Subject: Re: need help accessing upper 128 font chars
Date: 26 Aug 92 18:02:57 GMT
Organization: Oracle Corporation.  Redwood City, CA
X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

In article <1992Aug21.200203.3535@mercury.unt.edu> gene@ponder.csci.unt.edu (Gene De Lisa) writes:



   I need to create text with accented characters.
   [...]
   The only way I can get them is by using openwindows and
   typing at the command line using the sun4 compose key
   sequences. this wont work in emacs or vi -- just the
   command line. Ive tried to compare the XKeysymDB but
   I cant find where openwindows puts it.

openwindows has the patch in Xlib, where X doesn't.  you might try
running with your LD_LIBRARY_PATH pointing to your openwin libraries
first.  if that doesn't work, there may be something in R5 to do it.
i'm not quite familiar with R5 yet, but i know that R4 didn't have it.



--
This opinion will self destruct in 5 seconds.
danny vanderryn--dvanderr@oracle.com   || Take my advice ---
{uunet,hplabs,apple}!oracle!dvanderr   || *I'm* certainly not using it.
(415) 506-3142                         || 
Newsgroups: comp.windows.x
From: futzi@uni-paderborn.de (Michael Kutzner)
Subject: Re: xarchie/xgopher compiling problems
Organization: Uni Paderborn FB 17 Informatik GERMANY
Date: Wed, 2 Sep 1992 08:26:30 GMT


>>>>> About xarchie/xgopher compiling problems, Greg Whitlock said:

Greg> I'm trying to compile xarchie and xgopher on a Sun4 (w/4.1.1) and both
Greg> packages compile fine until the following error:

Greg> Undefined
Greg> _dlsym
Greg> _dlopen
Greg> _dlclose

Greg> I know something is amiss and was curious if anyone else has experienced
Greg> this problem.  We've just gotten X running so it could easily be something
Greg> is misplaced but I don't know what.

Could it be, that you compiled with the option -Bstatic to link the programms
statically ??
You can solve the problem, when you compile this:
---------------------------------------------------
dlsym(){}
dlopen(){}
dlclose(){}
---------------------------------------------------
(named e.g. test.c) and link it with the other files.

Or you can remove the option -Bstatic...

Greg> I would appreciate any suggestions.  Thanks.

Greg> -greg
Greg> (greg@athena.cs.uga.edu)

Greetings, futzi

********************************************************************************
** -------------------------------------------------------------------------- **
**     Michael Kutzner    **  X-Betreuung     **  <futzi@uni-paderborn.de>    **
**                                                <xgurus@uni-paderborn.de>   **
** -------------------------------------------------------------------------- **
********************************************************************************
From: mahan@TGV.COM (Patrick L. Mahan)
Newsgroups: comp.windows.x
Subject: RE: how to implement slow calback routines ?
Date: 27 Aug 92 17:49:53 GMT
Organization: The Internet

#
#My problem is the following :
#
#In several applications we add a callback routine to a pushbutton, let us say 
#that foo is this callback routine.
#In foo, we have to access large numbers of pieces of equipment;this operation
#may take up to 30 seconds. Therefore, we pop up an a XmMessageBox telling the
#user that the task in currently running.
#The problem is that after the creation of the messagebox we do not return to
#the XtMainLoop() and the messagebox is not managed on the screen, even if we
#call XFlush().
#

You need to register a Work Proc inside of the button callback to acutally
do the work for you.  This will allow 1) the message box to actually show
up and 2) let you complete your task.

Patrick L. Mahan

--- TGV Window Washer ------------------------------- Mahan@TGV.COM ---------

Waking a person unnecessarily should not be considered  - Lazarus Long
a capital crime.  For a first offense, that is            From the Notebooks of
							  Lazarus Long
Newsgroups: comp.windows.x,comp.windows.x.motif
From: grant@sun-3.cs.uct.ac.za (Grant Wyatt)
Subject: Re: Granite background on root window -- how is it done?
Organization: Computer Science Department, University of Cape Town
X-Newsreader: Tin 1.1 PL5
Date: Wed, 2 Sep 1992 13:52:04 GMT

: My boss asked me if there is a way to put a "granite" pattern on his root
: <other stuff deleted>

I don't know if this will help, but you just do something like this.

/usr/bin/X11/xsetroot -bitmap /usr/include/X11/bitmaps/granite

You of course have to have the bitmap, but otherwise check out
the manpage for xsetroot and all will become clear.  If you don't
have the bitmap itself, mail me and I will mail you a copy.

Grant

--
|                 GolliWog (Grant Wyatt)                |
|     Believe and Receive, or doubt and do without      |
| grant@sun-3.cs.uct.ac.za  Ph : 650 4057, Fax 650 3726 |
\_______________________________________________________/
Newsgroups: comp.windows.x
From: aardvark@nt1l.krl.com (Donald Koch)
Subject: Re: Compile X11 under Solaris 2.0
Organization: Koch Research Labs
Date: Fri, 4 Sep 1992 03:52:34 GMT

In article <9209031847.AA02731@mtesol>, sinan@Mtesol.boeing.COM (Sinan Karasu) writes:
[...]
>  I have a very simple question. I don't quite understand what is at
> issue here. It is my understanding that all Suns come with X11R4
> out of the box. So , what is the need for all this porting Stuff?
> Unless you need X11R5 , it seems that you should be able to 
> use what Sun already provides!. What gives ????

I believe that OpenLook comes with a Sun out of the box.  Slight difference.
Like no imake or xmkmf (useful for building other X goodies), an xterm that
some people don't like the look and feel of (or for that matter, the entire
OpenLook look and feel which some people don't like) and other missing programs
(don't ask me which, I've managed to miss using the OpenLook stuff so far).
-- 
Don Koch
aardvark@nt1l.krl.com
Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: XView forking problem
Keywords: XView forking problem, how ?
Organization: McGill Research Centre for Intelligent Machines
Date: Fri, 28 Aug 92 09:29:08 GMT

In article <1992Aug27.121825.24459@imada.ou.dk>, adelt@imada.ou.dk (Adel Shavandi) writes:

> I have a problem when forking my XView program:

> switch (pid=fork()) 
> 	{
> 	case -1:
> 		//perror("VisInterface::action(): fork() failed!");
> 		exit (1);
> 	case 0:	// child
> 		childProcess ();
> 	default:
> 		parentProcess ();
> 		break;
> 	}

> In the child process I try to draw in a window and display* that is
> shared with the parent.

This is guaranteed disaster.  Here's something I posted some time back
that attempted to give some idea why:

Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: fork() and Xlib
Organization: McGill Research Centre for Intelligent Machines
Date: Sun, 1 Mar 92 09:28:25 GMT

In article <1992Feb25.100948.10891@fwi.uva.nl>, stolk@fwi.uva.nl writes:

> I'm experiencing a really nasty bug in my X11 application.  The
> trouble is that it just hangs... no error mesgs.  I suspect the
> source of the trouble to be fork().

> My X11 applications forks, and both processes continue using the
> Xserver with the same window and display.
> Is this dangerous?

Yes, very.  This will not work.  Making it work is so close to
impossible that I wouldn't even try.

> I can imagine that the 1st process sends some command to the server,
> and when the command is halfway through, the 2nd process takes over
> the CPU control, and sends a command as well.

Yes, that's one of the dangers.  Another is that something similar can
happen to stuff flowing in the other direction (replies, events, and
errors): something that has to go to one process (a reply to a request,
say) can end up getting read by the other.  There are worse problems,
too; for example, sequence numbers will be mangled.  The server's idea
of the current sequence number will differ from that of either Xlib,
since each Xlib keeps its own count, which count independently starting
at the time of the fork(), while the server counts requests in the
merged stream.  Thus, replies will, from the point of view of the
receiving Xlib, have the wrong sequence number.  This is probably where
your hang is coming from: Xlib is waiting for a sequence number it will
never see.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
Newsgroups: comp.windows.x
From: CFRAZIER@hdsc.ssc.af.MIL (C | C Code | C Code Run, please!)
Subject: memory monitor
Organization: The Internet
Date: Wed, 2 Sep 1992 13:53:35 GMT


I am using a SPARC station IPX and was wondering if anyone could point me to where I 
could find a memory monitor (something to monitor memory ususage).  I'm using
a program and would like to know how much memory is being used by it and
at what times in execution the most memory is being used.

Thanks.

cfrazier@hdsc.ssc.af.mil

or

71052,3547@compuserve.com

Newsgroups: comp.windows.x
From: flongo@bank.citib.com
Subject: Animation
Organization: US Card Products Group, Citicorp Treasury
X-Newsreader: Tin 1.1 PL4
Date: Wed, 2 Sep 92 21:27:45 GMT

I've animated a small object in a simple X window by using XOR to
draw and erase the image, however it *flashes* ( jitters ) too much.
Is there a way to get a smoother transition? My small object is
drawn using XDrawArc(). I've tried various other GXFunctions,
but they all seem to do worse than GXxor. Any help would be appreciated.

Frank Longo
flongo@bank.citib.com

Newsgroups: comp.windows.x,fj.windows.x
From: wpm@is.morgan.com (W. Phillip Moore)
Subject: Problems with R5-i18n and scalable Kanji fonts
Organization: Informations Services Dept., Morgan Stanley Japan
Date: Fri, 4 Sep 1992 01:08:54 GMT


This is a subtle and odd problem, and probably one that R5 users who are
*not* taking advantage of the i18n functionality will not see.

The i18n version of Xaw uses the *fontSet: resource in place of *font, to
specify a list of fonts to be used with character sets of various
encodings.  The default value for most of the i18n clients as distributed is:

*fontSet: -*--14-*

Presumably to make 14 point fonts the default.  However, this selects
default fonts which are either ugly, or unreadable in the case of Japanese
(jisx0208 encoded Kanji).  

Look at what this matches with xfontsel:

xfontsel -pattern '-*--14-*'

Then set encoding to jisx0208 -- and you get this ugly, incompletely drawn
font.  "xlsfonts | grep jisx0208" gives you the following list of fonts:

-jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0
-jis-fixed-medium-r-normal--16-110-100-100-c-160-jisx0208.1983-0
-jis-fixed-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0
-jis-fixed-medium-r-normal--24-170-100-100-c-240-jisx0208.1983-0
-jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0
-misc-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0
-misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0208.1983-0

Look at each of these individually, and all of them appear normal, except
for the scalable font:

-jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0

THIS font is the one which matches the default font specification given
for the i18n clients.  Specifying *fontSet: -*--16-* or -*--18-* works
fine, since this seem to not match the scalable font.

QUESTION:  How can one remove the scalable font and/or configure ones fonts
such that this is the LEAST prefered (i.e. last possible match) rather than
the first for 14pt font sizes??

QUESTION:  Why is this font so ugly??

QUESTION:  Am I the first one to experience this problem??  Considering the
wide use of the i18n features, especially in Asia, I would be very
suprised.  

Any pointers would be appreciated.  

W. Phillip Moore	   				Phone: 81-3-3286-9359
Information Services Department                           FAX: 81-3-3286-9040
Morgan Stanley Japan Ltd.  Tokyo Branch             E-mail: wpm@is.morgan.com
	Ote Center Bldg. 3F, 1-1-3 Otemachi, Chiyoda-ku, Tokyo 100

Note in Japanese for fj.windows.x readers:

$@1Q8l$G%]%9(J$@%H$7$F:Q$_$^$;$s!#K\Ev$K0J>e$NLdBj$rF|K\8l$G(J fj.windows.x $@$GEj9F(J
$@$7$?$$$G$9$1$I(J $@$^$@$3$N2q<R$G$O(J fj.* $@$rFI$a$^$;$s!#(J $@$=$&$7$FJV;v$r=P$7$FD:(J
$@$1$k>l9g$K$O%a%$%k$G=P$9$h$&$K$*4j$$$7$?$$$H;W$$$^$9!#(J $@$=$l$+(J 
comp.windows.x $@$GEj9F$9$l$P$$$$$G$7$g$&!#(J

$@$h$m$7$/$*4j$$$7$^$9!#(J