[info-performer] Performer and KWM

Date view Thread view Subject view Author view

From: Christopher (cubicwts++at++excite.com)
Date: 04/20/2005 12:49:26


System Overview:

            Redhat LINUX 6.2

            Xfree86 4.1.0 X window system

            Performer 2.3.1 visual simulation toolkit

            Lesstif 0.92.32-1

            KWM

 
General Problem Overview:

Our application is a mixture of processes. There is a java process that opens windows using swing. Included is also a process that is opening a window to draw with OpenGL Performer. When the app is launched, K window manager(KWM) is launched. The Java windows behave well with KWM, but when one moves the mouse cursor at all or performs a keystroke the window opened for Performer immediately gets the focus, and pushes the java app to the background. This essentially locks up the application in the eyes of the customer because the window using performer is not ready to take inputs.

Using the instructions provided in the Performer documentation, we are using lesstif(Motif Clone) to open a window in which performer will draw. We believe this is bypassing KWM management, by getting the window directly from the Xserver. We wonder if programmatically opening a window through KWM would get the window under management and stop this behavior, or if there is some error in the way we are setting up the window to listen for input.

            Below is the code we are using to initialize performer and connect it to a graphics context.

Code In Question:

void initPerformer(void)

{

  pfInit();

  pfMultiprocess(PFMP_DEFAULT);

  pfdInitConverter("flt");

  pfConfig();

  pfFilePath( "../data/");

  pfNotifyLevel(PFNFY_FATAL);

#ifdef GFXAUTOSYNC

  pfFrameRate(MttGfx.FrameRate);

  pfPhase(PFPHASE_LOCK);

#endif

}

 

void

initPipeWindow(void)

{

/*------------------------------------------------------

 * Configure graphics pipeline.

 *-----------------------------------------------------*/

  gfxPipe = pfGetPipe(0);

  pwin=pfNewPWin(gfxPipe);

  //my_call ();

  pfPWinType(pwin, PFWIN_TYPE_X);

  pfPWinName(pwin,MttGfx.Screen.Name);

  pfPWinOriginSize(pwin, 0, 0,

                           MttGfx.Screen.SizeW,

                           MttGfx.Screen.SizeH);

  pfOpenPWin(pwin);

  

/*------------------------------------------------------

 * Make available some gfx data.

 *-----------------------------------------------------*/

  dsp = pfGetCurWSConnection();

  win = pfGetPWinWSWindow(pwin);

 

  XSelectInput(dsp,win,KeyPressMask | ButtonPressMask );

  XMapWindow(dsp,win);

  XSync(dsp,FALSE);

  //config_window (win);

/*------------------------------------------------------

 * Remove cursor arrow.

 *-----------------------------------------------------*/

#ifndef TESTMTT

  pfuLoadPWinCursor(pwin, PFU_CURSOR_OFF);

#endif

}

 
Hope you can help

Chris Johnson

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Apr 20 2005 - 12:49:40 PDT