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 144001 - every key press event reported twice when using XEvIE
every key press event reported twice when using XEvIE
Status: RESOLVED NOTGNOME
Product: at-spi
Classification: Platform
Component: general
unspecified
Other Linux
: High major
: ---
Assigned To: bill.haneman
bill.haneman
AP0
Depends on:
Blocks: 143588
 
 
Reported: 2004-06-09 07:47 UTC by remus draica
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a stand alone tester to prove this behaviour (2.76 KB, patch)
2004-06-09 08:16 UTC, remus draica
none Details | Review
Propsoed patch (1.01 KB, patch)
2004-08-11 16:01 UTC, padraig.obriain
none Details | Review

Description remus draica 2004-06-09 07:47:55 UTC
Every key press event is reported twice when at-spi is compiled with XEvIE support. 

IMPORTANT: key release event is reported only once.
Comment 1 remus draica 2004-06-09 07:49:45 UTC
I change the priority to blocker because this bug makes gnopernicus layers unusable.
Comment 2 remus draica 2004-06-09 08:16:39 UTC
Created attachment 28494 [details] [review]
a stand alone tester to prove this behaviour


If this issue is not present, try to run 2 instances of the tester.
Comment 3 bill.haneman 2004-06-09 10:19:30 UTC
Remus: can you explain your last comment: "If this issue is not present, try to
run 2 instances of the tester." ?  Thanks.

Comment 4 bill.haneman 2004-06-09 10:20:56 UTC
"Blocker" is too high a priority for this bug, but possibly "High" is not high
enough.  From previous code inspection I am surprised at this bug report, as the
XGrab code path should not be exercised if Xevie is present.
Comment 5 remus draica 2004-06-10 14:24:59 UTC
Once seemed to me that the bug is not present. After starting a new tester, it
was present. Probably I didn' restart the computer. 

This bug is always present on my computer.
Comment 6 bill.haneman 2004-06-18 12:11:41 UTC
If this affects all recent Solaris versions, it might be AP0.
Comment 7 padraig.obriain 2004-07-19 08:45:15 UTC
Remus,

Can you give me an exact test case for reprodicng this bug using your tester
program?

I am having difficulty reproducing it on Solaris.
Comment 8 padraig.obriain 2004-07-19 13:00:15 UTC
My problem was that I had mouse keys enabled when I was trying to reproduce
this. I now have my number pad working correctly.

I do not see this bug on Solaris.
Comment 9 padraig.obriain 2004-07-21 13:09:50 UTC
Although I was not able to see two events when using Remus's test program I am
seeing strange behavior in gnopernicus when at-spi-registrysd is built with
XEVIE support. It seems that use of the number pad for layer keys is not
working. I will investigate further.
Comment 10 bill.haneman 2004-07-22 12:31:58 UTC
Remus, can you provide info about exactly what build you are running?  Padraig
cannot reproduce the problem with your test program (though he has uncovered
another xevie issue).  It's not obvious that the issue Padraig has found is
related to your report, so we still need more info.  Thanks.
Comment 11 remus draica 2004-07-27 13:13:36 UTC
This bug is reproductible on my computer under Suse 9.0.
Comment 12 padraig.obriain 2004-08-11 14:41:39 UTC
Now that I have a version of XEVIE that works on Solaris I think I am seeing
this bug.

When I ran the test program and pressed 0 key on the number pad once I got
the output below.

Remus,

Is this was you are seeing?

GTK Accessibility Module initialized
Command key registry: result succeeded

L0 KeyEvent ° (keycode 102); string=0; time=4e423b60(4e423b60)
L1 KeyEvent ° (keycode 102); string=0; time=4e423b90(30)
Comment 13 padraig.obriain 2004-08-11 16:01:00 UTC
When Xevie is used to intercept keystrokes the Xevie client will receive
KeyPress and KeyRelease events on the keys the Xevie client chooses to consume.

This means that at-spi-registryd receives a second KeyPress event for a key
which is consumed.
Comment 14 padraig.obriain 2004-08-11 16:01:40 UTC
Created attachment 30440 [details] [review]
Propsoed patch
Comment 15 bill.haneman 2004-08-11 17:35:32 UTC
this doesn't make sense: if the client has consumed the event, it shouldn't see
another instance of it.  IOW, failing to call XevieSendEvent should result in NO
key press and release event in the client.

Am I missing something here?
Comment 16 bill.haneman 2004-08-11 17:36:55 UTC
I re-read the patch.  Xevie should definitely NOT be behaving this way, it makes
no sense.
Comment 17 bill.haneman 2004-08-11 17:41:52 UTC
BTW, is this patch even 100% safe?  Are we assured that the keypress/release
events in question will always be the NEXT event received?
Comment 18 remus draica 2004-08-12 06:24:47 UTC
Padraig, at comment #12 is same output as on my computer.
Comment 19 padraig.obriain 2004-08-12 07:27:48 UTC
Remus,

What is the behavior if you apply my proposed patch?

Bill,

The comments in #13 are from an email I received from Derek Wang. Once we
establish whether the behavior the patch is expecting is what should be
happening we can make the patch safe, if that is necessary.
Comment 20 bill.haneman 2004-08-17 11:45:30 UTC
If an Xevie client "consumes" an event, that event should not be propagated
further, even to the client.  Getting two notifications of 'consumed' Xevie
events seriously compromises the usefulness of the API (since a client must, in
this case, implement some sort of rejection/matching logic for duplicate
events).  SUch matching logic is subject to failure in race conditions unless a
queue of events is maintained which is searched on receipt of EVERY relevant X
event.  
Comment 21 Dragan Sarbut 2004-08-17 14:26:21 UTC
Hi, 
I tested Padraig's patch and it works ok for me.
The pressed key is no longer reported twice.
Comment 22 bill.haneman 2004-08-17 17:17:11 UTC
Padraig's patch will work MOST of the time, but the xevie client shouldn't have
to use the patch, it's a workaround for redundant notifications that should not
be occurring.
Comment 23 bill.haneman 2004-08-27 13:17:36 UTC
The problem was finally tracked down to an XEvie bug, when XKB is present. 
Closing as NOTGNOME.