GLX double/single buffer and resize

GLX double/single buffer and resize

Post by Tim Ha » Sat, 27 Feb 1993 08:28:54

I'm using the GLX drawing widget with a single buffer and double buffer
window on top of each other.  The drawing widgets are children to a frame
widget which is a child to a form dialog.  Both GLX widgets have their
sides attached to the sides of the frame.  The frame's sides are attached
to the sides of the form dialog.  Now the user resizes the dialog.  Depending
upon how I manage the GLX widets one of the following will happen:

        1) The callback to the resize routine work out such that the GLX
        widgets wind up being their original size.  (In this case I'm
        pushing and popping the GLX widgets by doing an XtUnmanageChild
        directly followed by an XtManageChild.  For example if the single
        buffer window is on top XtUnmanageChild( singlebuffer ) followed
        by XtManageChild( singlebuffer ) would put the doublebuffer window
        on top - the doublebuffer window is already managed)

        2) After the resize occurs the window stays the correct size.  When
        the resize occurs the singlebuffer widget is managed and the double-
        buffer widget is not.  I manage the doublebuffer widget and unmanage
        the single buffer widget and the dialog resizes itself back to its
        original size.  Arrgh.

So is there an example of what I want to do around?  Yeah, I looked in
4Dgifts but I didn't see anything.  



GLX double/single buffer and resize

Post by Joel Tesl » Sun, 28 Feb 1993 02:49:52

Manage and unmanage imply geometry calculations.  You may be better
off using map and unmap (or even just raising the top window).  This
may also improve performance.  Also, frames are designed to hold only
a single child.  To hold two children, you should put them in a form
(attaching to the edges), and put the form in a frame.

Joel Tesler