Bug 512984

Summary: locate pointer feature breaks media key handling
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: gnome-settings-daemonAssignee: Bastien Nocera <bnocera>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: bnocera, peter.hutterer, rstrode, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-22 02:32:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 509829    

Description Matthias Clasen 2009-07-21 14:59:35 UTC
I get the OSD for vol-up and vol-down, but not for mute.
The keybinding is set to the right keysym, and xev confirms that a) the keysym is correctly produced and b) it is not grabbed

Comment 1 Bastien Nocera 2009-07-21 15:05:24 UTC
Nothing changed in that code recently (meaning for the last few major releases). Is the key actually configured to be grabbed in the prefs?

If so, then a g-s-d debug log would be appreciated.

Comment 2 Matthias Clasen 2009-07-21 15:20:15 UTC
Yes, it is configured in the keybinding capplet. I'll see about getting you a log later

Comment 3 Matthias Clasen 2009-07-21 17:01:47 UTC
It gets tripped up by this code:

       for (i = 0; i < HANDLED_KEYS; i++) {
                if (match_key (keys[i].key, xev)) {
                        switch (keys[i].key_type) {
                        case VOLUME_DOWN_KEY:
                        case VOLUME_UP_KEY:
                                /* auto-repeatable keys */
                                if (xev->type != KeyPress) {
                                        return GDK_FILTER_CONTINUE;
                                }
                                break;
                        default:
                                if (xev->type != KeyRelease) {
                                        return GDK_FILTER_CONTINUE;
                                }
                        }

We are ignoring the KeyPress, and then we never see a key release. 
This is likely fallout from csw even handling changes, I think.

Comment 4 Matthias Clasen 2009-07-21 23:19:22 UTC
Moving over to X for now

Comment 5 Matthias Clasen 2009-07-21 23:36:33 UTC
Moving back to X, after figuring out that this is just interference from different g-s-d plugins: the locate-pointer feature is blindly ungrabbing the keyboard, making us loose the key release events.

Comment 6 Matthias Clasen 2009-07-21 23:51:47 UTC
I think the only way to fix this is to move the locate-pointer feature out of the g-s-d process, or at least open a dedicated X connection for it.

Comment 7 Matthias Clasen 2009-07-22 02:32:12 UTC
I've moved the locate-pointer feature to a separate process, and media-keys can happily coexist with it now.