After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 101380 - API to map from strong/weak cursor x to index
API to map from strong/weak cursor x to index
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.1.x
Other Linux
: Normal normal
: Small API
Assigned To: pango-maint
pango-maint
Depends on:
Blocks: split-cursor
 
 
Reported: 2002-12-16 20:57 UTC by Owen Taylor
Modified: 2018-05-22 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2002-12-16 20:57:04 UTC
Proper handling of the non-split cursor in GtkTextView requires a
way of going from a X location to the layout index that results
in the weak cursor being at that X location.

See bug 73307.
Comment 1 Owen Taylor 2004-02-21 17:21:15 UTC
pango_layout_line_x_to_index() is based on what character
is clicked on, not what cursor position. So, if you have,
say.

  logical         visual
  ===========     ==========
  h a t C A T     h a t T A C 
 |               *
   |               *
     |               *
       |               >     <
         |               *
           |                *
             |         <     >

Then clicking on the right side of the t unambiguously
says (according to the current interpretation) 
I want to insert text after the t, and clicking on
the left side of the T unambiguously says "I want
to insert text after the T. In order to make this
actually a sensible UI, GTK+ should (as people have
requested) actually *switch* the direction of the
keyboard when clicking on text in the opposite direction
from the current keyboard direction. This would result
in the visible cursor always ending up near where you
clicked.

For something like the virtual cursor in GtkTextView,
what we actually want to base that off of is the
*cursor* location closest to where the cursor was
before not the character near to where the cursor
was before.

Though this sounds superficially similar to bug 111031,
it's not really related.
Comment 2 GNOME Infrastructure Team 2018-05-22 12:02:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/6.