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 163755 - flat review interrupted by window:activate evens when pressing a key from numpad in gnopernicus
flat review interrupted by window:activate evens when pressing a key from num...
Status: RESOLVED INCOMPLETE
Product: at-spi
Classification: Platform
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: bill.haneman
bill.haneman
Depends on:
Blocks:
 
 
Reported: 2005-01-12 03:02 UTC by Tim Miao
Modified: 2006-06-14 15:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
proposed patch to prove this is not a gnopernicus bug (1.89 KB, patch)
2005-01-13 12:38 UTC, remus draica
none Details | Review
results of patch above (7.13 KB, text/plain)
2005-01-13 12:42 UTC, remus draica
  Details
proposed stand alone test (4.36 KB, patch)
2005-01-18 14:20 UTC, remus draica
none Details | Review

Description Tim Miao 2005-01-12 03:02:54 UTC
Steps to reproduce:
1. Launch Gnopernicus Screen Reader and Brlmonitor.
2. Launch other application, such as Evolution.
3. Press NumLock key to open the NumLock.
4. Press '0' key in numpad twice and hear of report 'layer 0'.
5. Press 'Del' key in numpad and switch gnopernicus to 'flatreview mode'.
6. Press '2', '3' or '8' in numpad for several times to report the screen.

Expected result:
Gnopernicus can report the whole screen in flatreview mode successfully.

Actual result:
Gnopernicus fails to report the screen, it always switches to focus tracking
mode after you press '2' for about 3 times.
Comment 1 Alexandra Telescu 2005-01-12 11:00:20 UTC
This is happening because an unexpected event ('activate window' event) is
generated when key'2' is pressed several times.
Bug:
http://bugzilla.ximian.com/show_bug.cgi?id=71198
was filed against evolution for this problem.

I will close this bug as 'NOTGNOME' until the evolution bug is solved.
Comment 2 bill.haneman 2005-01-12 11:31:21 UTC
Re-opening, as there is not sufficient evidence that this is evolution's fault.
Comment 3 remus draica 2005-01-13 11:03:51 UTC
This is a regression. It is in fact bug #108664 which was never real fixed.


*** This bug has been marked as a duplicate of 108664 ***
Comment 4 bill.haneman 2005-01-13 11:44:46 UTC
No, 108664 was fixed to the extent that it COULD be fixed.  
It appears from the bug report that there may be something specific about
evolution which is causing the symptoms to be more severe, but we need more
information about this; i.e. how rapidly must the numpad-2 key be pressed, in
succession, in order to see this problem?  Does flat review mode work properly
if the key presses are slower?  etc.
Comment 5 remus draica 2005-01-13 12:38:27 UTC
Created attachment 35948 [details] [review]
proposed patch to prove this is not a gnopernicus bug


Patch displays time spent in keyboard callback. Also it displays the
"window:activate" and "focus:" events.
Comment 6 remus draica 2005-01-13 12:42:17 UTC
Created attachment 35949 [details]
results of patch above


This output is obtained by starting gnopernicus and pressing and releasing DEL
key from numpad.
As it can be seen "window:activate" events are present even if user doesn't
change the current window. 

So, I still believe this is a dup of old bug #108664.
Comment 7 bill.haneman 2005-01-13 12:49:54 UTC
Remus: the problem here is that there is too much time spent in the keyboard
callback.  Remember, we said that in order to avoid the problems of bug #108664,
the time spent in a callback (before returning 'TRUE' or 'FALSE' to the
listener, for consuming a key) must be kept to a minimum.

So, this means that gnopernicus needs to return from the callback before it has
finished processing the flat review command.  If that is the problem, then this
_is_ a gnopernicus bug - or at least the problem can be avoided by gnopernicus.
Comment 8 bill.haneman 2005-01-13 12:54:52 UTC
Remus: I see that the elapsed times in your output are quite small - so
gnopernicus isn't taking too long in this particular case.  However, you don't
indicate whether the Del key is (ever) repeating or not.  If key repeat is used,
then I think the "stray" events are unavoidable.  But if this happens even when
key repeat is on, the problem is more serious.

Also in your test, the 'AAAA' events are not as common as were reported by the
Evolution team - we need to figure out why that is to.  So we still need more
info in order to establish the cause and severity of this problem, and whether
there are ways to avoid it.
Comment 9 bill.haneman 2005-01-13 12:57:41 UTC
To clarify:I think my conclusion in comment #7 was wrong, if the output timing
is in seconds.

Also I said, in comment #8: 

"But if this happens even when key repeat is on, the problem is more serious."

I meant "when key repeat is OFF", of course.

Comment 10 remus draica 2005-01-13 13:06:35 UTC
Bill: all keyboard events are reported to srcore on an idle. See bug #138391.
So, the time spent in the calback is minimum possible. I made (on my computer) a
new test. The callback function does nothing except to start the timer, stop it
and display the time. The results are same but the time is shorter (about 20
times shorter).

"the 'AAAA' events are not as common as were reported by the Evolution team" --
this is because I have pressed the key and I have dold it for a while. If I
press and release it quickly, the those events are more common.
Comment 11 remus draica 2005-01-13 13:17:40 UTC
When key repeat is OFF is even worse. In this case a "focus:" event is obtained
in combination with "window:activate" event.

I have pressed the key, hold it a while (about 1 or more second) and released
it. _Always_ a pair of "window:activate", "focus:" events is obtained after release.

But, if the key is not hold, the bug was _never_ reproduced.
Comment 12 bill.haneman 2005-01-13 13:25:10 UTC
OK, this makes sense.  You should never hold the key down while in screen review
mode, this will cause the code for bug 108664 to fail.

Evolution team, can you confirm that this bug does NOT occur when the user does
not hold the numpad-2 key down?
Comment 13 remus draica 2005-01-14 09:24:35 UTC
The right question is:

Evolution team, can you confirm that this bug does NOT occur when the user does
not hold the numpad-2 key down and key repeat is OFF?


Comment 14 Tim Miao 2005-01-18 02:35:23 UTC
To the question in #13:
I've made the verification and the result is: this bug can still be reproduced
when the user doesn't hold the numpad-2 key down and key repeat is OFF.
Comment 15 remus draica 2005-01-18 14:20:44 UTC
Created attachment 36181 [details] [review]
proposed stand alone test


The test simulate the gnopernicus behaviour for the numpad keys.
Comment 16 remus draica 2005-01-18 14:25:58 UTC
Tim, can you run the test above and post the log. The file must be copied in
at-spi/test directory.

On my computer, the unwanted window:activate is present when running test and
gedit and pressing "Del" key (while in gedit) from numpad.
Comment 17 remus draica 2005-01-18 14:29:18 UTC
The unwanted event is present in same cases as I said at comment #11 and comment
#6 when repeat is ON.
Comment 18 remus draica 2005-01-18 14:31:52 UTC
Transferring to at-spi for more investigations.
Comment 19 bill.haneman 2005-01-18 17:12:10 UTC
I am still unclear about the cases being reported here.  Let's exclude the case
where key repeat is ON, and talk only about key-repeat OFF.  Please make sure
that the user does not hold any key down, but releases each key soon after
pressing it.

In this case the unwanted events should not be emitted.  
Comment 20 remus draica 2005-01-19 10:28:36 UTC
Bill, in case describe by you (repeat OFF, not holding) the behaviour is normal
on my computer (see last sentence from commnet #11).

But it is still present on Tim's computer (comment #14).
Comment 21 bill.haneman 2006-03-14 17:00:35 UTC
Not reproducible on our systems... is this bug visible with recent builds/recent XServers?
Comment 22 bill.haneman 2006-03-14 17:03:41 UTC
lowering severity and priority due to limited reproducibility across configurations.
Comment 23 Calum Benson 2006-04-26 17:05:22 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.