Re: [info-performer] make pfPipeWindow child of other window

Date view Thread view Subject view Author view

From: Terry Welsh (mogumbo++at++totalmail.com)
Date: 10/20/2003 08:36:51


Thanks Paolo,
  I actually got this working a few days ago after Don Burns gave me a few suggestions. For anyone else who want to make a Performer window a child of another window, here's one way to initialize the window:

pw->setConfigFunc(openPipeWindow);

static void openPipeWindow(pfPipeWindow *pw){
        // open the window
        pw->open();

        // Make the window a child of the fltk gui.
        // All you need in Linux is XReparentWindow, but....
        // Xwindows seems to have issues with the Irix window manager,
        // hence all the extra commands
        usleep(100000);
        XUnmapWindow(pfGetCurWSConnection(), pw->getWSWindow());
        XSync(pfGetCurWSConnection(), 0);
        usleep(100000);
        XReparentWindow(pfGetCurWSConnection(), pw->getWSWindow(), shared->parent, 0, 0);
        XMapWindow(pfGetCurWSConnection(), pw->getWSWindow());
}

The parent window is part of my fltk gui and I put its pointer in shared memory.

Terry Welsh
http://www.reallyslick.com

--- Paolo Farinelli <paolo++at++sgi.com> wrote:
Hi Terry,

You can direct Performer pipe-windows to existing X windows
created outside Performer..

Take a look at man pages for pfWindow::setWSDrawable and
pfWindow::setWSWindow.

Also check out the sample program:
/usr/share/Performer/src/pguide/libpf/motif.c

Hope this helps,

Regards,
Paolo

Terry Welsh wrote:

>Is there a simple way to make a pfPipeWindow the child of another XWindow? Somewhere in the depths of pfPipeWindow::open there must be a call to XCreateWindow where you could specify a parent. Is there a way to specify your own parent?
>
>Terry
>
>

-- 
Paolo Farinelli                                           paolo++at++sgi.com
Member of Technical Staff, OpenGL Performer              1-650-933-1808
Silicon Graphics        1600 Amphitheatre Pkwy, Mountain View, CA 94043

_____________________________________________________________ Get Your Free Email at http://www.totalmail.com


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Oct 20 2003 - 08:39:25 PDT