GNOME Bugzilla – Bug 123761
"Move mouse and click left" has unwanted side effects in case of an editable text
Last modified: 2004-12-22 21:47:04 UTC
"Move mouse and click left" mapped on the position switches is not well behaved in case of an editable text, where the movement of the mouse and the "left click" action generate the movement of the caret. In this case the mouse is moved to the central position of the character and the application (for instance gedit) decides to move the caret. But, coordinates are integer numbers and an average means a float, so when the middle position is rounded, the cursor might land on the first half or the second half of the character and the application will move the mouse accordingly : sometimes before the character (which is the good behavior ONLY for a language that is written from left to right) and sometimes after the character (which is the good behavior ONLY for a language that is written from right to left). This makes the gnopernicus application to appear that is doing things unpredictible, even if the mouse cursor - graphically - land on the center of the character: Example1: When in gedit's text box (TXT), if, say, "abcde" is entered and then the routing key associated with 'c' is pressed, the cursor goes to "d" rather than to 'c'. Example2: When in gedit's text box (TXT), if, say, "iii" is entered and then the routing key associated with the first character of the string is pressed, the cursor goes to the second and so on.
Same behavior is present in Java applications like StylePad.
Created attachment 20589 [details] [review] proposed patch
Patch commited to CVS.
Adi: is there a corresponding 'move mouse and click right' ? And have you talked to Thomas about how this impacts users of right-to-left languages like Arabic (I think you have some Saudi users of BAUM products)? I wonder if the correct behavior should depend on the RTL encoding of the text in question. I believe that we should be exposing explicit text-direction changes as TextAttributes in at-spi (though we might not have any test cases yet). Perhaps an additional RFE should be filed on this topic.