XForms: Bug???

From: Serge B Bromow (serge@omensys.com)
Date: Mon May 13 2002 - 13:59:13 EDT

  • Next message: spl@ncmir.ucsd.edu: "XForms: FTP policy (administrivia)"

    # To subscribers of the xforms list from Serge B Bromow <serge@omensys.com> :

    A few years ago I had noted to the group that
    displaying a form as full screen produced an
    +X,Y offset of a few pixels. Changing the form
    size to fl_scrw-1, fl_scrh, paced the form at the proper
    X,Y (0,0) position but left 2 pixels on the right hand
    side of the screen. The form was reduced in width by
    more that 1 pixel.

    This behavior caused me to BLACK fill the root window
    so clients would not see any root window visual. This problem
    raised its head recently when using a touch screen. Touching that 2
    pixel
    space confused the program as to which button the mouse was
    over (or not). Sheesh!

    I found the code that re sized the form in "forms.c". T.C has in the
    function "force_visible" the following;

    static void force_visible(FL_FORM * form, int itx, int ity)
    {
    if (form->x < itx)
     form->x = itx;

    /**** ORIGINAL
        if (form->x > fl_scrw - form->w - 2 * itx - 1)
     form->x = fl_scrw - form->w - 2 * itx - 1;
    *****/

    /***** MYCHANGE */
    if (form->x > fl_scrw - form->w - itx )
     form->x = fl_scrw - form->w - 2 * itx;
    /***** END */

    if (form->y < ity)
     form->y = ity;

    if (form->y > fl_scrh - form->h - itx)
     form->y = fl_scrh - form->h - 2 * itx;

    /* be a paranoid */
    if (form->x < 0 || form->x > fl_scrw - form->w)
        {
    if (form->w < fl_scrw - 20)
         M_err("ForceVisible", "Can't happen x=%d", form->x);
     form->x = 10;
        }

        if (form->y < 0 || form->y > fl_scrh - form->h)
        {
     M_warn("ForceVisible", "Can't happen y=%d", form->y);
     form->y = 20;
        }

    }

    Changing the "fl_scrw" check code as show in MYCHANGE is consistent with
    the
    "fl_scrh" check and gets rid of the nasty positioning and re scaling of
    full screen forms. I am not an X fellow but I have tested the change
    with a number of apps and it seems to work fine, as I believe it should.

    QUESTION
    Have I committed a sin by making this change?

    If not, will this change be reflected in later releases so I do not
    have to continually add my changes to future releases?

    While on the topic of changes, I have made a number of changes
    to "input.c". These changes try to reflect more conventional handling
    of 1 line input objects. They are as follows;

    1. Cursor is placed at the first character position when entering an
    input field.

    2. The DEL key removes the character after the cursor rather than acting

    as a BACKSPC.

    3. Fixed length fields allow you to type in data anywhere in the line
    causing
    characters after the cursor to be pushed forward (Insert) and end chars
    are dropped off
    of the field.

    4. The End key erases the line in front of the cursor.

    My clients and I agree that these changes offer a more user friendly
    data entry environment and require little pointer movement.

    QUESTION
    Are there any plans or agreements on input field handling ?
    Can such changes be incorporated in future releases?

    Thanks

    Serge

    _________________________________________________
    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 : Mon May 13 2002 - 14:07:11 EDT