From: klee@synoptics.com (Ken Lee)
Subject: Re: Property problems
Reply-To: klee@synoptics.com
Organization: SynOptics Communications, Santa Clara CA
Lines: 19
Nntp-Posting-Host: bugsbunny.synoptics.com

In article ( ), wsmart@tay.mcs.dundee.ac.uk (Bill Smart) writes:
> To get the number back, the other client does:
>
>  AppAtom = XInternAtom(display,"ApplicationWindow",True);
>  XGetWindowProperty(display,DefaultRootWindow(display),AppAtom,0,8192,
>                     False,XA_WINDOW,&return_type,&return_format,
>                     &nitems_return,&bar,&return_place);
>
> and appears to get back something valid (just not the right number).
> It always seems to return the same number, regardless of the window
> number stored in the property.

"return_place" is probably incorrect.  It should be a pointer, not an
integer.  XGetWindowProperty() allocates memory, copies the data there,
and returns a pointer to the memory.  You should free the memory when
you're done.

---
Ken Lee, klee@synoptics.com
