Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!rpi.edu!hiebeler From: hiebeler@turing.cs.rpi.edu (Dave Hiebeler) Newsgroups: comp.windows.x Subject: backing_store Message-ID: Date: 12 Apr 89 21:47:49 GMT Sender: usenet@rpi.edu Distribution: na Organization: RPI CS Dept Lines: 39 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: XSetWindowAttributes attributes[1]; Display *display; Widget control_rootwidget, draw_rootwidget; control_rootwidget = XtInitialize(argv[0],"Xmessenger",NULL,0,&argc,argv); display = XtDisplay(control_rootwidget); draw_rootwidget = XtCreateApplicationShell("Xmessenger.draw", topLevelShellWidgetClass, NULL,0); init_draw_box(); /* this puts a viewport inside the draw_rootwidget */ XtRealizeWidget(control_rootwidget); XtRealizeWidget(draw_rootwidget); 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. The reason I want backing-store is because if I scroll part of the image off-screen, when I scroll it back, it does not get redisplayed. My current solution for this is that I have a redraw() routine which I call whenever I detect an expose event; but redrawing takes much too long, as I draw a large number of lines in the box. Any suggestions would be appreciated. -- Dave Hiebeler Internet: hiebeler@cs.rpi.edu (preferred address) Computer Science Dept. hiebeler@itsgw.rpi.edu Amos Eaton Bldg. Bitnet: userfrzk@rpitsmts.bitnet Rensselaer Polytechnic Institute / Troy, NY 12180-3590