#77 xbaeMatrix text selection inconsistent

open
nobody
Bugs (67)
5
2008-02-26
2008-02-26
Anonymous
No

This is readily demonstrated with matrix.c example of xbaeMatrix 4.60.04 and OSF/Motif 2.1 or OpenMotif 2.3. Does not occur with LessTif

If one selects text within a cell from left to right the full string is selected and a new value can be typed in as expected (e.g. select "Orange" in the first column and change to "violet").

If one selects text from right to left and insures the mouse button up occurs within the text box the full string is selected and the new value can be typed in as expected.

However, if one selects text from right to left and swipes the mouse past the left edge of the text widget before release mouse button, the entire string is selected but the new text cannot be typed in correctly. Upon entry of new characters, the entered characters remain selected and highlighted so that each subsquent character, or couple characters, replaces the previous character or two just typed.

The problem cannot be reproduced on text OSF/Motif or Open Motif widgets not embedded in the xbaeMatrix, nor does the problem occur when xbaeMatrix build/run in LessTif.

Problem has been reproduced in:
Aix / Motif 2.1
Fedora 8 / OpenMotif 2.3

Additional Info:
1) xbaeMatrix contifured to use text widget not xbaeInput widget

2) When text widget is in the 'funky' state of new keystrokes remaining selected, other controls are affected. For example in an XTerm window, one is not able to double click a word/string to select/highlight the string.

Discussion

  • Tobias Oed
    Tobias Oed
    2008-02-27

    Logged In: YES
    user_id=101470
    Originator: NO

    Can you try the following patch? If you could test things still work with lesstif that
    would be great.

    --- xbae-4.60.4.orig/src/Matrix.c 2006-05-19 19:07:01.000000000 +0200
    +++ xbae-4.60.4/src/Matrix.c 2008-02-28 00:47:48.000000000 +0100
    @@ -119,7 +119,7 @@
    "Shift Ctrl ~Meta ~Alt <Key>Tab : TraversePrev()\n"
    "Ctrl ~Meta ~Alt <Key>Tab : TraverseNext()\n"
    #endif
    - "<Btn1Up> : DefaultAction()\n"
    + "<Btn1Up> : DefaultAction() extend-end()\n"
    "<Btn1Down> : DefaultAction() grab-focus()\n"
    "Ctrl <Key>osfUp : EditCell(Up)\n"
    "Ctrl <Key>osfDown : EditCell(Down)\n"
    @@ -143,7 +143,7 @@
    "Shift Ctrl ~Meta ~Alt <Key>Tab : TraversePrev()\n"
    "Ctrl ~Meta ~Alt <Key>Tab : TraverseNext()\n"
    #endif
    - "<Btn1Up> : DefaultAction()\n"
    + "<Btn1Up> : DefaultAction() extend-end()\n"
    "<Btn1Down> : DefaultAction() grab-focus()\n"
    "Ctrl <Key>osfUp : EditCell(Up)\n"
    "Ctrl <Key>osfDown : EditCell(Down)\n"

    Thanks for the nice bug report.
    Tobias

     
  • Logged In: NO

    Root cause for issue seems to be the translations for default_text_translations[] and default_dialog_text_translations[] in Matrix.c used to over ride the normal default processing of the TextField widget. These over ride the grab-focus( ) and extend-end( ) actions default processing associated with <BntDown> and <BtnUp> events. When the actions are added back into the translations, the issue is rectified. (consistent with the follow up. Thanks Tobias)

    Blake_Nelson@ratheon.com