Re: XForms: fl_addto_selected_xevent flakey on Linux w/XCreateWindow?

From: Steve Lamont (spl@ncmir.ucsd.edu)
Date: Thu Apr 26 2001 - 15:13:29 EDT

  • Next message: Mike Holme: "XForms: Fell at the first hurdle"

    # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :

    > I have a large application using xforms.89 which works fine on
    > an SGI O2 running 6.5 IRIX. In it I use XCreateWindow to create a
    > render window and use xforms to create a bunch of widgets. The
    > widgets use callbacks. I then loop
    > do
    > {if (fl_check_forms() == FL_EVENT)
    > {fl_XNextEvent(&ev);
    > switch (ev.type) {...}
    > }
    > } while (fl_XEventsQueued(QueuedAfterFlush));
    >
    > My problem is that this does not work on my RedHat 7.0 Linux PC.

    Why are you using XCreateWindow()? Why not create a Canvas object
    within a regular XForms Form?

    If you really need it, there is raw Window support in XForms. See
    section B.2 in the manual for details.

    > 1). Why does it work ok on the SGI but not RedHat 7.0?

    Dunno.

    > 2). Should I be able to call fl_addto_selected_xevent with an id
    > returned by
    > XCreateWindow and expect it to work?

    I suppose so. There's nothing much in fl_addto_selected_xevent()
    other than Xlib calls.
            
    > 3). Is the Q overflow message coming from X11? or from xforms?

    XForms. There's a limited putback event queue buffer and moving the
    mouse without disposing of the MotionNotify events may be causing it
    to overflow.

    > 4). Is there any way to still use XCreateWindow and retrieve xevents
    > from it?

    See above.

    I'm not sure how IRIX handles MotionNotify events in contrast to
    Linux. It may be that IRIX is doing some sort of event compression
    that is causing the intermediate MotionNotify events to get tossed.
    I've noted in some of my drawing applications something of that
    nature. You can use XChangeWindowAttributes() to set whether you want
    all the MotionNotify events by setting or removing
    PointerMotionHintMask from the Window's event mask.

                                                            spl

    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Thu Apr 26 2001 - 15:23:58 EDT