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 651079 - ClutterText "blinks" when deleting text after going out of bounds
ClutterText "blinks" when deleting text after going out of bounds
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterText
1.6.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-25 17:15 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-07-04 14:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clutter-text: Always update cursor positions when painting (1.72 KB, patch)
2011-07-03 20:45 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-05-25 17:15:52 UTC
Simple to do with tests/interactive/test-text-field:

1) Delete everything in the first text field.
2) Enter "aaaaaa..." until it runs off the edge of the field.
3) <Ctrl>Backspace

Expected results:
  The background of the text field should be the regular background color.

Actual results:
  The background of the text field is the selected text background color.
Comment 1 Emmanuele Bassi (:ebassi) 2011-07-03 18:33:02 UTC
bisection would be greatly appreciated.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-07-03 19:12:09 UTC
clutter-1.2 is broken.

clutter-1.0 doesn't have the keybinding, but you can use Home, <Shift>End, Backspace in its stead. The bug still exists.
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-07-03 20:45:37 UTC
Created attachment 191200 [details] [review]
clutter-text: Always update cursor positions when painting

The cursor's on-screen rectangle is defined in terms of the text
length, the current index, and text_x and text_y, which hold the text
offset in overflowing text fields.

When deleting large amounts of text, text_x is set to 0. In some
edge case branch paths, the cursor rectangle could be calculated
after the current index and text length were updated, but before
the text_x offset could be. This left a negative x position, which
consequently blew up Cogl and the widget.
Comment 4 Emmanuele Bassi (:ebassi) 2011-07-04 14:58:28 UTC
Attachment 191200 [details] pushed as 037138d - clutter-text: Always update cursor positions when painting