Path: utzoo!attcan!uunet!lll-winken!xanth!ames!pasteur!ucbvax!decwrl!sgi!daisy!klee From: klee@daisy.UUCP (Ken Lee) Newsgroups: comp.windows.x Subject: Re: backing_store Message-ID: <2933@daisy.UUCP> Date: 13 Apr 89 17:55:54 GMT References: Reply-To: klee@daisy.UUCP (Ken Lee) Distribution: na Organization: Daisy Systems Corp., Mountain View, Ca. Lines: 29 In article hiebeler@turing.cs.rpi.edu (Dave Hiebeler) writes: > > Has anyone had any experience with backing_store under X11R3 >on Suns? > I tried to enable it (on a Sun 3/50 running X11R3) as follows: > attributes[0].backing_store = Always; /* also tried WhenMapped */ > XChangeWindowAttributes(display,XtWindow(draw_rootwidget), > CWBackingStore,attributes); > > But it seemed to have no effect. I'm putting a viewport under >the draw_rootwidget, with a box in the viewport. I then use >xlib routines to draw in that box. You're requesting backing store for the wrong window. You have to request it for the specific window you're drawing in, in this case the box in the viewport. A related issue is that you may have trouble drawing in a box widget (and many other widgets). None guarantee that drawing on their XtWindow will yield any meaningful results, although sometimes it does. A better solution would be to create your own widget, a subclass of core, that has a backing store resource. Then, you're guaranteed to be able to draw on it and you can request backing store easily through the resource manager. -- Ken Lee Daisy Systems Corp., Interactive Graphics Tools Dept. Internet and Smail: klee@daisy.uucp uucp: uunet!daisy!klee