XtAppAddTimeOut blocked - Xwindows

This is a discussion on XtAppAddTimeOut blocked - Xwindows ; Hi I use a X11 + Motif 1.2 HMI with a middleware (CORBA). When I receive a message from the middleware, I post a procedure call with XtAppAddTimeOut (..., 100 milliseconds, ...) But the procedure is not called ! unless ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: XtAppAddTimeOut blocked

  1. XtAppAddTimeOut blocked

    Hi

    I use a X11 + Motif 1.2 HMI with a middleware (CORBA).

    When I receive a message from the middleware, I post
    a procedure call with XtAppAddTimeOut (..., 100 milliseconds, ...)
    But the procedure is not called !
    unless I move the mouse cursor on the HMI window Rolling Eyes
    an then the call is done !
    maybe because a X11 event is generated ?

    Does someone know :
    - how can a XtAppAddTimeOut be blocked ?
    - how to force the generation of a dummy X11 event ?

    Many thanks !

    PKD

    PS : - the CORBA middleware I use is MICO 2.3.11 compiled
    with --enable-threads
    - the OS is Linux Debian Sarge, the compiler is gcc335
    - I use OpenMotif 2.1.30 because the default version
    is not Motif 1.2 compatible
    - my graphic environment is GNOME

  2. Re: XtAppAddTimeOut blocked

    Philip K. Dick wrote:
    >
    > Does someone know :
    >
    > - how to force the generation of a dummy X11 event ?
    >


    Perhaps something like:

    XEvent dummy;

    /* dpy is a pointer to the display */
    XPutBackEvent(&dpy, &dummy);

  3. Re: XtAppAddTimeOut blocked

    In article , Philip K. Dick says...
    >
    >I use a X11 + Motif 1.2 HMI with a middleware (CORBA).
    >
    >When I receive a message from the middleware, I post
    >a procedure call with XtAppAddTimeOut (..., 100 milliseconds, ...)
    >But the procedure is not called !
    >unless I move the mouse cursor on the HMI window Rolling Eyes
    >an then the call is done !
    >maybe because a X11 event is generated ?


    PKD - I don't understand why you need a dummy event? While I have not used
    MICO, I have successfully integrated Orbix and X11/Motif in the past. What is
    the use case you are trying to do? Why have a timeout?

    sdg


  4. Re: XtAppAddTimeOut blocked


    - how can a XtAppAddTimeOut be blocked ?

    > Many thanks !
    >
    > PKD
    >


    XSendEvent

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Software Reuse Project



  5. Re: XtAppAddTimeOut blocked

    scottgregory@yahoo.com a écrit :
    > In article , Philip K. Dick says...
    >
    >>I use a X11 + Motif 1.2 HMI with a middleware (CORBA).
    >>
    >>When I receive a message from the middleware, I post
    >>a procedure call with XtAppAddTimeOut (..., 100 milliseconds, ...)
    >>But the procedure is not called !
    >>unless I move the mouse cursor on the HMI window Rolling Eyes
    >>an then the call is done !
    >>maybe because a X11 event is generated ?

    >
    >
    > PKD - I don't understand why you need a dummy event? While I have not used
    > MICO, I have successfully integrated Orbix and X11/Motif in the past. What is
    > the use case you are trying to do? Why have a timeout?


    I guess a dummy XEvent could unblock my XtMainLoop, since moving
    the mouse on the display does it.

    I also use MICO 2.3.7 in the past, but now I need to use MICO 2.3.11
    which is multi-threaded. I cannot call the Xlib from multiple threads
    or I get an error. That's why I want to execute all my code inside
    the XtMainLoop.

  6. Re: XtAppAddTimeOut blocked

    scottgregory@yahoo.com a écrit :
    > In article , Philip K. Dick says...
    >
    >>I use a X11 + Motif 1.2 HMI with a middleware (CORBA).
    >>
    >>When I receive a message from the middleware, I post
    >>a procedure call with XtAppAddTimeOut (..., 100 milliseconds, ...)
    >>But the procedure is not called !
    >>unless I move the mouse cursor on the HMI window Rolling Eyes
    >>an then the call is done !
    >>maybe because a X11 event is generated ?

    >
    >
    > PKD - I don't understand why you need a dummy event? While I have not used
    > MICO, I have successfully integrated Orbix and X11/Motif in the past. What is
    > the use case you are trying to do? Why have a timeout?


    I guess a dummy XEvent could unblock my XtMainLoop, since moving
    the mouse on the display does it.

    I also use MICO 2.3.7 in the past, but now I need to use MICO 2.3.11
    which is multi-threaded. I cannot call the Xlib from multiple threads
    or I get an error. That's why I want to execute all my code inside
    the XtMainLoop.

  7. Re: XtAppAddTimeOut blocked

    In article <43DE3AA9.5040603@tele2.fr>, Philip K. Dick says...
    >
    >I also use MICO 2.3.7 in the past, but now I need to use MICO 2.3.11
    >which is multi-threaded. I cannot call the Xlib from multiple threads
    >or I get an error. That's why I want to execute all my code inside
    >the XtMainLoop.


    One way that we have used in the past was to use a standard unix pipe between
    the two threads. This gives you a standard file descriptor at the receiving
    end. You can do an XtAppAddInput on that file descriptor, and get 'woken' up
    whenever something is put on the pipe. Somewhat of a funny use case, but given
    that XLib is not thread-safe, it was the simplest way that seemed guaranteed to
    work.

    Good Luck
    sdg


+ Reply to Thread