GNOME Bugzilla – Bug 707729
orca speaks wrong label when using flat review on GtkTree
Last modified: 2014-03-19 18:54:18 UTC
To reproduce: 1. Enter orca preferences 2. Click with mouse "Key bindings" 3. Press KP_8 - you're at tabs, ok 4. Press KP_9 - you're Modifier keys, ok 5. Press KP_9 - you're at Function, ok 6. Press KP_9 - you're at Default, orca speaks "Add bookmark", WRONG 7. Press KP_9 - you're at Go to bookmark, orca speaks "Add bookmark. Insert+Alt_L+6", wrong 8. Press KP_9 - you're at the next item, but orca is stuck at Alt_L+6, wrong Sometimes when reqesting a line with flat review orca causes an exception in gtk (gtkpango.c, _gtk_pango_get_text_at, line "if (text[0] == 0)"). Since orca is first in getting wrong, I think this issue should be solved before trying to fix pango. Related pango bug entry (originally orca): https://bugzilla.gnome.org/show_bug.cgi?id=707659
Removing the "blocks". If there is a bug in Pango, that bug should be fixed.
Created attachment 254432 [details] Orca-free, simple way to reproduce this bug Steps to reproduce: 1. Launch gtk3-demo and start the GtkListStore demo 2. Launch the attached in a terminal 3. Switch back to the GtkListStore demo window Expected results: The unit of text retrieved by getTextAtOffset() would accurately reflect the contents. Actual results: The unit of text retrieved by getTextAtOffset() reflects text present, but in some other cell. Impact: Orca's flat review feature fails to work correctly in a GtkTreeView. Sample output: name: 60620 text: 60482 name: Critical text: Normal name: gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe text: scrollable notebooks and hidden tabs name: 50214 text: 60482 name: Major text: Normal name: Xft support does not clean up correctly text: scrollable notebooks and hidden tabs name: 52877 text: 60482 name: Major text: Normal name: GtkFileSelection needs a refresh method. text: scrollable notebooks and hidden tabs name: 56070 text: 60482 name: Can't click button after setting in sensitive text: scrollable notebooks and hidden tabs name: 56355 text: 60482 name: GtkLabel - Not all changes propagate correctly text: scrollable notebooks and hidden tabs
Transferring to Gtk+.
Created attachment 265582 [details] [review] Proposed patch. Construct a pango layout in update_cache, and keep it around (as Benjamin suggested on IRC a while ago). Works for me, although I'm not sure if we need to initialize the layout in the constructor. Also, maybe we should have an accessible-dump-style test with a tree view.
I guess it's applied as https://git.gnome.org/browse/gtk+/commit/?id=e529dfe94951acf992a979c878f0d03dc479b694
I confirm that orca on gtk+ 3.11.4 is free of this bug. Thank you guys.