[comp.windows.x] XGetWindowProperty

gjw@ANDREAS.WR.USGS.GOV (Gregory J. Woodhouse) (11/17/90)

I get nervous about "magic" values.  Is there some expression, possibly in-
volving sizeof, that I can pass as the 5th argument of XGetWindowProperty
instead of 8192?  For that matter, is that number even right?
-----------------------------------------------------------------------------
Gregory Woodhouse          |We know that the center of the earth
gjw@andreas.wr.usgs.gov    |is a fiery molten mass...but it's not
(415) 329-4694 (office)    |good to dwell on it.
(415) 325-7802 (home)      |
U.S. Geological Survey / 345 Middlefield Rd. MS 977 / Menlo Park, CA 94025
-----------------------------------------------------------------------------

gjw@ANDREAS.WR.USGS.GOV (Gregory J. Woodhouse) (11/20/90)

What I'm trying to do here is have one application store its base window ID
in a property so another application can read it, and subsequently use
XSendEvent.  Since I'm potentially dealing with large amounts of data, I
don't propose to transmit it via properties at all.  But once the screen is
updated in onee application the other one needs to know about it so that it
can read new data (off a socket), do some computing, then update its display.
I hope to use ClientMessages to keep the applications "in sync."
-----------------------------------------------------------------------------
Gregory Woodhouse          |We know that the center of the earth
gjw@andreas.wr.usgs.gov    |is a fiery molten mass...but it's not
(415) 329-4694 (office)    |good to dwell on it.
(415) 325-7802 (home)      |
U.S. Geological Survey / 345 Middlefield Rd. MS 977 / Menlo Park, CA 94025
-----------------------------------------------------------------------------

etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (11/21/90)

In article <9011162349.AA14141@andreas.wr.usgs.gov>, gjw@ANDREAS.WR.USGS.GOV (Gregory J. Woodhouse) writes:
|> I get nervous about "magic" values.  Is there some expression, possibly in-
|> volving sizeof, that I can pass as the 5th argument of XGetWindowProperty
|> instead of 8192?  For that matter, is that number even right?
|> 

8192 is NOT a magic number.  It specifies the # of 32 bit quantities to be retrieved.  This will vary completely from application to application.
If you are using 8192 indiscriminately, then you will probably be having mucho core dumps.

For instance, to retrieve 56 longs from a property, you
would use 56 as the 5th argument.

To retrieve 68 shorts from a property, you would use 34 as the 5th argument. 
--
					Eric Taylor
					Baylor College of Medicine
					etaylor@wilkins.bmc.tmc.edu
					(713) 798-3776