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 645243 - Empathy inline chatting switches to window when spacebar is pressed
Empathy inline chatting switches to window when spacebar is pressed
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-19 17:50 UTC by Ryan Peters
Modified: 2011-03-21 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
StButton: fix handling of Space/Enter -> click (1.34 KB, patch)
2011-03-21 12:25 UTC, Dan Winship
committed Details | Review

Description Ryan Peters 2011-03-19 17:50:55 UTC
Steps to reproduce:
1. Open a chat window in Empathy
2. Try to talk using the message tray, hit the space bar.
3. The message tray closes and the chat window is brought to focus, whether it was on the current workspace or not.
Comment 1 Nirbheek Chauhan 2011-03-19 19:11:35 UTC
The bug was caused by 06d2c0af3502295a76824191110c07c3e8d7fc30

messageTray: dismiss notifications on click, not button-release-event

Which was committed due to bug 642978

Note that the same thing also happens if you enter a word and press "Enter".
Comment 2 Dan Winship 2011-03-21 12:25:23 UTC
Created attachment 183931 [details] [review]
StButton: fix handling of Space/Enter -> click

StButton was mistakenly considering any Space/Enter KEY_RELEASE to be
a click, when in fact it should only count as a click if it also got
the corresponding KEY_PRESS as well. This meant that when typing in a
chat notification, any Space/Enter keypress would dismiss the
notification, since the StEntry would take the PRESS event but ignore
the RELEASE, allowing it to propagate to the notification itself,
which would treat it as a click.

====

I can't test this (because empathy crashes with a linker error because of
my newer-than-new NetworkManager packages), but I'm pretty sure this should
fix it.
Comment 3 Nirbheek Chauhan 2011-03-21 12:34:57 UTC
I just tested it, and it works perfectly. Enter/Spacebar behave as expected, and the bubble gets dismissed only on mouse left-click. Thanks!
Comment 4 Owen Taylor 2011-03-21 13:48:01 UTC
Review of attachment 183931 [details] [review]:

Looks fine. Guess there could be some crazy scenario where you clicked on the button held down, then hit enter in the entry, but who has expectations about that...
Comment 5 Dan Winship 2011-03-21 14:19:07 UTC
Attachment 183931 [details] pushed as e886a3d - StButton: fix handling of Space/Enter -> click