RE: Xlib call from different processes

New Message Reply Date view Thread view Subject view Author view

Chehayeb, Nassouh (nchehayeb++at++ceit.es)
Sat, 12 Apr 1997 12:26:52 +0200


Hi Performers,

In my application I need to change the cursor form (XDefineCursor())
 depending on a local defined mode. The function call is done in a
 process called input different from the Draw process who open the
 window. When I run the program nothing is happen and no error message
 are displayed (the same thing will happen when I try to get a Client
 Message event using the PFWIN_TYPE_EXIT mechanism) if i make the call
 from the Draw process I get the desired effect.

This is a prototype of what I'm doing:

     APP:

     vrPipeWindow *pwin = new vrPipeWindow(pipe);
     pwin->setType(PFWIN_TYPE_X);
     pwin->setMode(PFWIN_EXIT, 1);
     dsp = pfGetCurWSConnection();
     wm_protocols = XInternAtom(dsp, "WM_PROTOCOLS", 1);
     wm_delete_window = XInternAtom(dsp, "WM_DELETE_WINDOW", 1);
     ...
     pwin->open()
    ............

    INPUT: (forked from the app)
     
    pfWSWindow *xWin = pwin->getWSWindow();
    dsp = pfGetCurWSConnection();
    curs = XCreateCursorFont(dsp, XC_hand1);
    XDefineCursor(dsp, xWin, curs);
   XFlush(dsp);

   // the cursor dosn't change to hand1
   ...

   // on the other side if I want to handle events here
   {
    XEvent event;
    XNextEvent(dsp, &event);
    // Switch on event type
    case ClientMessage:
          if ((event.xclient.message_type == wm_protocols) &&
             (event.xclient.data.l[0] == wm_delete_window)) {
               pwin->close(); // for example
             }
           break;

     // This event never arrives.

Thanks,

Nassouh Adel Chehayeb
C.E.I.T.
(Centro de Estudios e Investigaciones Tecnicas de Guipuzkoa)
Applied Mechanics Department
Paseo de Manuel Lardizabal - 15
20009. San Sebastian (SPAIN)
e-mail: nchehayeb++at++ceit.es
Phone: ++34-43-21.28.00
Fax : ++34-43-21.30.76

    

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:03 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.