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 466841 - Orca doesn't announce items when Alt+Tabbing if Compiz is enabled.
Orca doesn't announce items when Alt+Tabbing if Compiz is enabled.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.19.x
Other All
: High major
: 2.26.2
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
https://bugs.freedesktop.org/show_bug...
Depends on:
Blocks:
 
 
Reported: 2007-08-15 02:42 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2009-05-18 01:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
revision 1 (5.20 KB, patch)
2008-06-15 20:41 UTC, Joanmarie Diggs (IRC: joanie)
needs-work Details | Review
Meet the new patch, same as the old patch (but gitified) (5.85 KB, patch)
2009-05-17 05:02 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-08-15 02:42:15 UTC
Steps to reproduce:

1. In Ubuntu Gutsy, go to System -> Preferences -> Appearance

2.  On the Desktop Effects pane, select Normal effects and press the Close button.

3. Use Alt+Tab to cycle among upon windows.

Expected results: Orca would announce each item moved to.

Actual results: Orca is silent.
Comment 1 Joanmarie Diggs (IRC: joanie) 2007-08-15 02:44:04 UTC
1. It seems that in Gutsy, on a system that is Compiz-capable,  Compiz will be enabled by default.  So we'll be seeing this issue crop up for more and more users....

2. I used Accerciser to monitor events.  We're not getting any in the above circumstances.  I'm brand new to Compiz, so I don't know if Compiz is interfering with Metacity events or if Compiz has taken the place of Metacity. (i.e. what do we file the bug against?)
Comment 2 Willie Walker 2007-08-15 12:58:51 UTC
> 2. I used Accerciser to monitor events.  We're not getting any in the above
> circumstances.  I'm brand new to Compiz, so I don't know if Compiz is
> interfering with Metacity events or if Compiz has taken the place of Metacity.
> (i.e. what do we file the bug against?)

Eeks.  I believe Metacity and Compiz are mutually exclusive window managers.  So, I suspect the problem is that Compiz just isn't playing well in the AT-SPI space.  Does Compiz show up in the list of apps in accerciser/at-poke when Compiz is in use?
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-08-15 14:14:52 UTC
> Eeks.  I believe Metacity and Compiz are mutually exclusive window managers. 

Yikes. :-(  That would make sense though.  What I hadn't noticed until just now is that when Compiz is disabled, Metacity shows up in the list of apps in Accerciser; when it's enabled it doesn't.

> space.  Does Compiz show up in the list of apps in accerciser/at-poke when
> Compiz is in use?

I'm afraid I'm not sure.  On both my Gutsy machines, I have something listed called gtk-window-decorator.  It's present whether Compiz is in use or not.  This thing does not exist on my Feisty box (where Compiz isn't even installed).  Googling for it produced nearly 100% Compiz related discussion (which I guess I need to read now. :-)).  Trying to "Accercise" gtk-window-decorator seems to reliably crash Accerciser.

Comment 4 Joanmarie Diggs (IRC: joanie) 2007-09-05 20:00:21 UTC
I filed a bug against Compiz:
https://bugs.freedesktop.org/show_bug.cgi?id=12292

Blocking this one.
Comment 5 Willie Walker 2007-10-30 14:49:50 UTC
I'm reassigning this one to Joanie just as a place holder.  She's marked as the person to work with KristianL on the DBUS magnifier work (eZoom/Compiz), so she's likely the person to help investigate/track this problem.
Comment 6 Joanmarie Diggs (IRC: joanie) 2008-04-15 14:26:29 UTC
This just in:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.freedesktop.org/show_bug.cgi?id=12292

Danny Baumann <dannybaumann@web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Danny Baumann <dannybaumann@web.de>  2008-04-15 00:37:57 PST ---
Fixed in commit
http://gitweb.freedesktop.org/?p=xorg/app/compiz.git;a=commit;h=6884b4858b8f9a51e298e4b169328e1462dea099

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Woohoo!

Unfortunately, I have never figured out how to fully build and install Compiz. I'll try again.  But regardless....  I'll unblock this bug for now because we still need to verify that we're getting events and we might need to do a wee bit of scripting to handle the events we get.

I've also just emailed Luke to see if it's not too late for this fix to be included in the Hardy release.

Will, I believe Compiz started getting included in OpenSolaris with.... I want to say SNV_85.  If that means that Compiz is going to be part of the May Indiana release, I think it would be nice if this fix made it in as well.  Any thoughts/ideas/people you know who can cause this to be the case? :-)  Thanks!
Comment 7 Joanmarie Diggs (IRC: joanie) 2008-06-15 20:41:03 UTC
Created attachment 112797 [details] [review]
revision 1

Intrepid now has the latest, event-filled status bar for gtk-window-decorator.  Yea!

This patch addresses the problem reported in the bug... and only that problem.  

Issue 1:
It seems that compiz likes to toss out window:activate and window:deactivate events at us more frequently than metacity does.  As a result, when you Alt+Tab into a window, the window that had focus prior to the Alt+Tabbing may decide to reactivate and deactivate itself. If so, we wind up either speaking that non-focused window's information or cutting off speech for the focused frame. :-(  I tried various and sundry things to improve the situation, but then things were not being spoken in Metacity, so I need to think harder.

Issue 2:
When you first start Alt+Tabbing (i.e. the very first keypress), we first get the gtk-window-decorator events (and start speaking the item shown in the status bar).  Then we get a window:deactivate event for whatever window we were in prior to first pressing Alt+Tab.  That causes the speaking of the first item to be cut off due to a speech.stop() in onWindowDeactivated().

Thoughts/ideas?
Comment 8 Joanmarie Diggs (IRC: joanie) 2008-06-15 21:05:55 UTC
gtk-window-decorator events

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Started Event Monitoring in Accerciser, then Alt+Tab to gcalctool

window:activate(0, 0, Calculator - Advanced)
	source: [frame | Calculator - Advanced]
	application: [application | gcalctool]

===================================================================
Alt+Tab to gnome-terminal
Note that gcalctool deactivates and then reactivates.  Then
gnome-terminal activates and finally gcalctool deactivates.

(Alt+Tab initially pressed here)

window:deactivate(0, 0, Calculator - Advanced)
	source: [frame | Calculator - Advanced]
	application: [application | gcalctool]

(Alt+Tab released here)

window:activate(0, 0, Calculator - Advanced)
	source: [frame | Calculator - Advanced]
	application: [application | gcalctool]
window:activate(0, 0, jd@gumby: ~/orca)
	source: [frame | jd@gumby: ~/orca]
	application: [application | gnome-terminal]
window:deactivate(0, 0, Calculator - Advanced)
	source: [frame | Calculator - Advanced]
	application: [application | gcalctool]

===================================================================
Alt+Tab back to gcalctool
Again, the focused window deactivates, then reactivates. The
intended/chosen window then activates. Finally, the original
window deactivates.

(Alt+Tab initially pressed here)

window:deactivate(0, 0, jd@gumby: ~/orca)
	source: [frame | jd@gumby: ~/orca]
	application: [application | gnome-terminal]

(Alt+Tab released here)

window:activate(0, 0, jd@gumby: ~/orca)
	source: [frame | jd@gumby: ~/orca]
	application: [application | gnome-terminal]
window:activate(0, 0, Calculator - Advanced)
	source: [frame | Calculator - Advanced]
	application: [application | gcalctool]
window:deactivate(0, 0, jd@gumby: ~/orca)
	source: [frame | jd@gumby: ~/orca]
	application: [application | gnome-terminal]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comment 9 Joanmarie Diggs (IRC: joanie) 2008-06-15 21:08:40 UTC
Metacity events

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Started Event Monitoring in Accerciser, then Alt+Tab to gcalctool

window:activate(0, 0, Calculator - Advanced)
        source: [frame | Calculator - Advanced]
        application: [application | gcalctool]

===================================================================
Alt+Tab to gnome-terminal

(Alt+Tab initially pressed here)

window:deactivate(0, 0, Calculator - Advanced)
        source: [frame | Calculator - Advanced]
        application: [application | gcalctool]

(Alt+Tab released here)

window:activate(0, 0, jd@gumby: ~/orca)
        source: [frame | jd@gumby: ~/orca]
        application: [application | gnome-terminal]

===================================================================
Alt+Tab back to gcalctool

(Alt+Tab initially pressed here)

window:deactivate(0, 0, jd@gumby: ~/orca)
        source: [frame | jd@gumby: ~/orca]
        application: [application | gnome-terminal]

(Alt+Tab released here)

window:activate(0, 0, Calculator - Advanced)
        source: [frame | Calculator - Advanced]
        application: [application | gcalctool]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 10 Joanmarie Diggs (IRC: joanie) 2008-06-15 21:10:05 UTC
So, Will and Rich, how can we identify the extra events we get from Compiz and ignore them?  Or.... Is this a Compiz bug?
Comment 11 Willie Walker 2008-06-16 01:04:43 UTC
(In reply to comment #10)
> So, Will and Rich, how can we identify the extra events we get from Compiz and
> ignore them?  Or.... Is this a Compiz bug?

Seems crazy to be giving us events like that.  Can you ask the Compiz folks what might be going on?  I suspect they can probably fix it to make it work like metacity.
Comment 12 Willie Walker 2008-07-16 18:08:28 UTC
With Compiz becoming more and more prevalent, we will need to do something to address this for GNOME 2.24.
Comment 13 Willie Walker 2008-08-13 17:30:53 UTC
I spent a fair amount of time attempting to hack around this and was not able to determine a graceful unhacky way to handle this.  Before coming up with an ungraceful hack (if I can), I logged this Compiz bug in attempt to get the problem resolved at the source: http://bugs.opencompositing.org/show_bug.cgi?id=1027.
Comment 14 Willie Walker 2008-08-13 17:53:21 UTC
See also http://bugs.opencompositing.org/show_bug.cgi?id=1028: [a11y] accessible text and name events are not emitted when Alt+Tab'ing between windows of the same name.
Comment 15 Willie Walker 2009-01-15 21:44:08 UTC
If I recall correctly, the Compiz folks were fixing some stuff.  I'm not sure where that is, but I'm marking the patch as needs work per comment #7.
Comment 16 Joanmarie Diggs (IRC: joanie) 2009-01-18 03:03:48 UTC
Given that the Compiz folks are fixing things on their end, changing the target to FUTURE.
Comment 17 Joanmarie Diggs (IRC: joanie) 2009-05-17 05:02:30 UTC
Created attachment 134796 [details] [review]
Meet the new patch, same as the old patch (but gitified)

The previous patch was marked by Will as needing work.

Looking at the comments and reviewing the compiz bug http://bugs.opencompositing.org/show_bug.cgi?id=1027 nothing has changed:

1. We'd have to hack around the aforementioned bug -- and potentially break something in Orca.

2. Given that more and more distros are switching to Compiz as the default window manager, it might be nice to make things work "well enough" for now if we can do so safely (i.e. by putting a script in place for the gtk-window-decorator to handle the new events we're getting).

So I once again present this patch for review. :-) Note that you'll need to use the Application Switcher or the Static Application Switcher and not the Ring Switcher or Shift Switcher. (See bug 582916)
Comment 18 Willie Walker 2009-05-17 17:53:18 UTC
(In reply to comment #17)
> So I once again present this patch for review. :-) Note that you'll need to use
> the Application Switcher or the Static Application Switcher and not the Ring
> Switcher or Shift Switcher. (See bug 582916)

Given that we depend upon Compiz to fix things, and since the Compiz team is not working on the issues, I guess we'll have to settle for "good enough."  This patch is also isolated to just a new script for Compiz.  Since we have been recommending people not use Compiz, I think this patch is OK for gnome-2-26 as well.  That is, the impact is along the lines of a low risk, high user impact, feature.

So, feel free to commit to master and gnome-2-26. Thanks!
Comment 19 Joanmarie Diggs (IRC: joanie) 2009-05-18 01:26:12 UTC
(In reply to comment #18)
> So, feel free to commit to master and gnome-2-26. Thanks!

Done. I think. Yea Git. <rolls eyes> Thanks for your help with that Will!

Because this bug, as described in the summary, is now fixed, I have re-purposed bug 582916 slightly so that we can use it to track the remaining Compiz bug  (http://bugs.opencompositing.org/show_bug.cgi?id=1027) in addition to the two new ones I filed.

Closing this one as FIXED.