Ticket #2405 (new defect)

Opened 3 years ago

Last modified 2 years ago

OS15 0.90 alt tab doesnt work

Reported by: tonyforster Owned by: tomeu
Priority: Unspecified by Maintainer Milestone: 0.92
Component: sugar Version: 0.90.x
Severity: Unspecified Keywords: olpc-0.90
Cc: tomeu Distribution/OS: Unspecified
Bug Status: New

Description

OS15 0.90 alt tab doesnt swap activities, a regression on 0.88 OS373pyg

Change History

follow-up: ↓ 3   Changed 3 years ago by erikos

  • cc tomeu added
  • status_field changed from Unconfirmed to New

Ok, would be great if someone on F14 (non-olpc) could test that.

  Changed 3 years ago by erikos

  • milestone changed from Unspecified by Release Team to 0.90

Reproduced on latest Soas build as well.

The logs do indicate that another activity might already have access to key '<alt>tab'...

in reply to: ↑ 1   Changed 3 years ago by tomeu

Replying to erikos:

Ok, would be great if someone on F14 (non-olpc) could test that.

Reproduced on regular F14 installation.

  Changed 3 years ago by sascha_silbe

This looks like the Fedora equivalent of #2300.

follow-up: ↓ 7   Changed 2 years ago by erikos

  • milestone changed from 0.90 to 0.92

Looks like metacity grabbed that key. When I disable the gconf key "/apps/metacity/global_keybindings/switch_windows" and restart Sugar our keygrabber is able to grab that key to tab through windows.

  Changed 2 years ago by erikos

in reply to: ↑ 5   Changed 2 years ago by sascha_silbe

Replying to erikos:

Looks like metacity grabbed that key. When I disable the gconf key "/apps/metacity/global_keybindings/switch_windows" and restart Sugar our keygrabber is able to grab that key to tab through windows.

I bet you're hitting the  known  issue that metacity doesn't properly ungrab the keys, but doesn't handle them either.

Upstream ticket is  Gnome#629210; unfortunately the bug description does a rather bad job of explaining what the actual issue is.

FWIW, personally I'm re-enabling the metacity keybindings in my ~/.xsession (using a hack with a sleeping background subshell) so I can switch windows faster, using different shortcuts (Grab Key + cursor keys) that are easier for me to type.

  Changed 2 years ago by erikos

As I understand from Bernie's comment the root issue is actually in the X server. The commit that should have  fixed it is the following (which is part of 1.9.4 the version included in F14):

commit 9a1bfa5664a80f03cedeb89b9f8a86115a08e7af
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 20 16:39:16 2009 +1000

    input: remove XI2 keysym grabs, use keycode grabs instead.
    
    Keysym grabs are tricky in the details, keycode grabs are known to work. So
    for now, provide keycode grabs only.
    
    Requires inputproto 1.9.99.15.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/grabs.c b/dix/grabs.c
index 06d6d03..4a351d6 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -451,7 +451,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
     any_modifier = (pMinuendGrab->grabtype == GRABTYPE_XI2) ?
                    (unsigned int)XIAnyModifier : (unsigned int)AnyModifier;
     any_key = (pMinuendGrab->grabtype == GRABTYPE_XI2) ?
-                   (unsigned int)XIAnyKeysym : (unsigned int)AnyKey;
+                   (unsigned int)XIAnyKeycode : (unsigned int)AnyKey;
     ndels = nadds = nups = 0;
     ok = TRUE;
     for (grab = wPassiveGrabs(pMinuendGrab->window);

  Changed 2 years ago by erikos

Bernie's patch to metacity that does remove the call to ungrab_all_keys which calls XUngrabKey (AnyKey, AnyModifier) and replaces it with individual XGrabKey calls:

 http://people.sugarlabs.org/bernie/patches/gnome/metacity/pending/ungrab-x-keybindings-when-they-are-disabled.patch

This is the previous ungrab_all_keys call in metacity:  http://people.gnome.org/~tthurman/docs/metacity/keybindings_8c-source.html#l01144

  Changed 2 years ago by erikos

With the help of Bernie I filed a bug at the xorg-server:  https://bugs.freedesktop.org/show_bug.cgi?id=34358

Note: See TracTickets for help on using tickets.