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 104058 - CursorLocate 'AnyModifier' grab clashes with other accessibility features
CursorLocate 'AnyModifier' grab clashes with other accessibility features
Status: RESOLVED WONTFIX
Product: gnome-settings-daemon
Classification: Core
Component: mouse
2.22.x
Other All
: High normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
AP3
: 319995 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-01-21 13:17 UTC by bill.haneman
Modified: 2015-11-03 18:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
replaces AnyModifier grab for locate-cursor with a no-modifier and a lock-modifier grab. (1.89 KB, patch)
2003-01-21 15:08 UTC, bill.haneman
committed Details | Review

Description bill.haneman 2003-01-21 13:17:49 UTC
The gnome-settings-daemon 'locate cursor' feature is very useful for
accessibility and for any situation in which cursor visibility is less than
ideal (for instance, a glare-filled environment, etc.).

However the default locate-cursor key, "Control-left", is grabbed with the
AnyModifier flag in XGrabKey.  This grab is held for the duration of the
user's session, and it prevents other clients from successfully issuing an
'AnyKey' grab against any set of modifiers.

Unfortunately, though we don't encourage use of 'AnyKey' grabs, they are
sometimes necessary at least temporarily for accessibility, and at-spi
clients do issue them.  If the cursor-locate feature is on, then the at-spi
calls fail and the assistive technologies may be left nonfunctional.

I don't see that the AnyModifier mask is really necessary in the
locate-pointer case, I suggest that using only the null mask (i.e. no
modifiers) and the LockMask would suffice.

I attach a patch which makes the necessary change.  Jonathan, can we get
this in for 2.2?  I really hoped to target 2.2 as an "assistive technology
compatible" release.
Comment 1 Andrew Sobala 2003-01-21 14:24:29 UTC
Bill, you forgot to attach the patch :)
Comment 2 bill.haneman 2003-01-21 15:04:41 UTC
nope; just lost my connection to cvs.gnome.org...

here's the patch.
Comment 3 bill.haneman 2003-01-21 15:08:38 UTC
Created attachment 13723 [details] [review]
replaces AnyModifier grab for locate-cursor with a no-modifier and a lock-modifier grab.
Comment 4 Jody Goldberg 2003-01-21 16:03:07 UTC
Seems viable.
Please commit
Comment 5 bill.haneman 2003-01-21 16:14:40 UTC
Thanks Jody!
I have been playing with this patch and though it solves the first
problem (failing keygrabs), there's a remaining issue with the way
Owen did the key event handling in the GdkFilterFn 'function'.  It
seems to break "interlocking grabs", that is, if you press and hold
the Control key, clients holding some Control-modifier grab won't get
notified unless you press the sequence twice.  I need to talk to Owen
about solutions for that; probably a small tweak to the existing
patch.  However I don't think such tweaks will invalidate the need for
the current patch's delta.
Comment 6 bill.haneman 2003-01-21 17:01:39 UTC
I think I'd better chat with Owen first before committing this patch.
 I think there are issues with the way the keygrab is being done, and
it's not clear that LocatePointer keyed to the control key can
actually be made compatible with other passive keygrabs that use the
Control modifier (since the XAllowEvents call with ReplayKeyboard
ignores pending passive grabs from higher up in the window hierarchy).
Comment 7 bill.haneman 2003-01-21 17:37:33 UTC
on reflection I think the patch is appropriate.  I am not sure the
secondary problem (conflict with Control-modifier passive grabs) is
solvable without changing the behavior of the locate-cursor feature. 
Still worth a chat with Owen.

I will commit the existing patch. thanks again Jody!.
Comment 8 Andrew Sobala 2003-02-13 18:41:01 UTC
Can this bug be closed now, Bill?
Comment 9 bill.haneman 2003-02-13 18:56:35 UTC
Andrew, Jody, thanks a whole lot for accepting the patch. 
Unfortunately it's only a partial fix, it solves the worst problem but
not the root issue.

maybe we should close this bug - but only if another one is opened
with almost the same summary :-(.   It turns out that although the
patch fixes some symptoms, the end result is still that AT clients
cannot use Control-sequence global keybindings when the locate cursor
feature is turned on.

Actually this isn't really specific to AT, no client can successfully
get XGrabKey grabs with a modifier of "Control" if this feature is
turned on.  That's because the grab on the control key itself takes
precedence, and because the locate cursor feature holds the grab until
the next event, it means that when XAllowEvents is called with
'ReplayKeyboard' the events are passed to X windows without being
processed by any other pending passive keygrabs.  Do you follow?

Yuck.. This is a cool feature but I can't see any way of keeping it
from breaking control-key keybindings without altering the current
behavior.  Any ideas, Owen?
Comment 10 Calum Benson 2003-04-03 14:31:16 UTC
Updating status_whiteboard field to reflect A11Y team's assessment 
of accessibility impact.
Comment 11 Calum Benson 2003-08-07 16:12:57 UTC
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME
bug list :)
Comment 12 Luis Villa 2004-06-07 03:28:30 UTC
Calum, I assume still present/relevant in gnome 2.6 with gtk 2.4?
Comment 13 bill.haneman 2004-06-07 12:06:38 UTC
I am unaware of any changes which could have improved this.
Comment 14 Calum Benson 2004-10-21 16:53:04 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 15 Christian Kirbach 2005-03-28 14:04:57 UTC
I suggest you raise the version then.
Comment 16 Peter Parente 2005-10-27 16:42:23 UTC
*** Bug 319995 has been marked as a duplicate of this bug. ***
Comment 17 Peter Parente 2005-11-16 20:46:40 UTC
The behavior of Alt-Tab is also strange and may be related to this bug. If a 
client is registered for at-spi keyboard events and Alt-Tab is pressed, the 
client only receives the Alt press. The tab press, the Tab release, and the Alt 
release are all consumed by the desktop. This is also true of other desktop 
hotkeys like Alt-F1.

Shouldn't at least the Alt release be allowed to pass to clients? If not, an AT 
will think Alt is still being held when it isn't.
Comment 18 Calum Benson 2006-04-26 17:06:11 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 19 Bastien Nocera 2015-11-03 18:08:47 UTC
Under Wayland, the feature as it is implemented in gnome-settings-daemon will not work at all. To be implemented under Wayland, it will need to be implemented in gnome-shell:
https://bugzilla.gnome.org/show_bug.cgi?id=690055

Any bugs or new features for "Locate pointer" should be fixed in a new implementation in gnome-shell.