[comp.windows.x] XtWindow

cookson@helios.mitre.org (Cookson) (06/08/90)

I'm trying to draw to a workspace widget that is not the top most widget
in a window.  When I use the window returned by XtWindow, I get a
bad drawable error.  What am I doing wrong???

Thanks,
Dean


% Dean Cookson				  $ Anyone can be taught to sculpt    %
% dcookson@mitre.org			    $ Michaelangleo would have had to %
% {devax,et al..}!linus!mbunix!helios!cookson $ have been taught how not to.  %
% Disclaimer: My opinions are my own, and       $ The same is true of great   %
%       are of questionable sanity                $ programmers               %

klee@wsl.dec.com (Ken Lee) (06/08/90)

In article <110318@linus.mitre.org>, cookson@helios.mitre.org (Cookson) writes:
> I'm trying to draw to a workspace widget that is not the top most widget
> in a window.  When I use the window returned by XtWindow, I get a
> bad drawable error.  What am I doing wrong???

Most likely, you are not realizing the widget before trying to extract
the window ID.

Note that the best way to solve this problem is to write your own
widget that gives you a drawing area and provides the appropriate
interfaces to exposure and other X events.  Alternatively, you can use
a general purpose drawing widgets, such as the one in Motif or the one
outlined in the MIT intrinsics manual.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee