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 323633 - Accessible name changes in tab popup are one step behind
Accessible name changes in tab popup are one step behind
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.8.x
Other Linux
: Normal normal
: Need diagnosis
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-12-09 14:40 UTC by Willie Walker
Modified: 2006-03-11 16:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Standalone python app that demonstrates the bug (10.10 KB, text/x-python)
2005-12-09 14:51 UTC, Willie Walker
  Details
Proposed patch that reverts gtk_label_set_markup calls to gtk_label_set_text. (1.21 KB, patch)
2005-12-09 14:53 UTC, Willie Walker
needs-work Details | Review

Description Willie Walker 2005-12-09 14:40:49 UTC
1) Run several applications.  For example: gnome-terminal, gaim, gedit, etc.
2) Run the attached application in an xterm window using the python interpreter.
3) Press Alt+Tab and watch the output from #2 - you'll see that the text events
and the object label are for the last window, not the current window.
Comment 1 Willie Walker 2005-12-09 14:48:55 UTC
This problem seems to be introduced with Rev. 1.30, which addressed bug #164590.
 The ultimate culprit seems to be the call to gtk_label_set_markup in
tabpopup.c, which replaced the call to gtk_label_set_text.  If I change the
calls to gtk_label_set_markup back to gtk_label_set_text, the desired
accessibility behavior is restored.

This may indeed be a gtklabel bug, but I couldn't make heads or tails of what
gtklabel.c was really doing.  I'm attaching a patch that reverts the calls back
to gtk_label_set_text, but this may violate the fix for #164590 - I'm guessing
it was intended to show apps that need attention in bold face in the tab popup.
Comment 2 Willie Walker 2005-12-09 14:51:03 UTC
Created attachment 55808 [details]
Standalone python app that demonstrates the bug
Comment 3 Willie Walker 2005-12-09 14:53:10 UTC
Created attachment 55810 [details] [review]
Proposed patch that reverts gtk_label_set_markup calls to gtk_label_set_text.

I think think the ultimate culprit may be gtklabel not doing the right
accessibility thing in the call to gtk_label_set_markup, but this patch
restores the proper accessibility behavior to metacity.
Comment 4 Willie Walker 2005-12-09 14:55:30 UTC
Comment on attachment 55810 [details] [review]
Proposed patch that reverts gtk_label_set_markup calls to gtk_label_set_text.

Patch created using cvs diff -RN -u5 src/tabpopup.c > patch.txt
Comment 5 Havoc Pennington 2005-12-09 23:09:35 UTC
Thanks for finding this

- if it's a GTK bug we should fix it there, since otherwise we'll have to patch
every single app that uses set_markup

- the metacity patch can't be right, since either the string is plain text or
it's markup; if it's markup, you can't set it as text (people will see the
markup) - so there has to be more to the patch, to unescape the XML entities and
pull out tags or avoid creating markup in the first place

Anyway, I think we should reassign to gtk.
Comment 6 Elijah Newren 2005-12-10 06:33:17 UTC
Reassigning to gtk+ then.
Comment 7 Matthias Clasen 2005-12-12 17:19:20 UTC
I have no idea what could be the problem here. 
AFAICS, set_markup goes through the same path as set_text, namely
gtk_label_set_text_internal().
Comment 8 Willie Walker 2005-12-15 13:29:28 UTC
While things seem to point in this direction, I'm not guaranteeing this is a gtk+ label bug.  The main thing 
I've done is provide a standalone app that demonstrates the problem in metacity and a not-so-good 
workaround that makes the problem go away in metacity.  The guts of GTK+ are a bit foreign to me, so 
I've been unable to track down the ultimate source of the problem.
Comment 9 Willie Walker 2006-01-10 14:14:48 UTC
We recently had a bug report in Orca that seems to be related to this problem. 

In synaptic, we discovered that the "version" label in the Help->About... dialog ends up with the label name and the accessible text information out of sync.  In looking at the synaptic sources, I've discovered that it is a Glade-based application, and the label is initially set up with the label "Synaptic version".  The synaptic source uses gtk_label_set_markup to change the string to "synaptic 0.57.4" after retrieving the label.  My guess is that perhaps something is going awry here and the AccessibleText information is not being properly updated when the gtk_label_set_markup method is called.

I'm not sure if this helps any, but it seems related and might help provide clues as to where to find the ultimate culprit of this problem.
Comment 10 Matthias Clasen 2006-01-11 16:16:38 UTC
I fixed a few small things wrt to notification in gtklabel today, but
I'm not positive it will make any difference to this problem. 
Comment 11 Matthias Clasen 2006-01-12 18:36:03 UTC
Can you check if it works with GTK+ 2.8.10 ?
Comment 12 Willie Walker 2006-01-12 18:41:53 UTC
I hope to take a look very soon.  Thanks!
Comment 13 Willie Walker 2006-03-11 12:05:44 UTC
It took longer than expected for me to be able to check this out, but I just verified that this problem does not exist in the latest gtk, so I think you can close this bug.  Thanks!
Comment 14 Matthias Clasen 2006-03-11 16:23:31 UTC
Cool, thanks for checking