On Sun, Sep 12, 2004 at 07:57:56PM +0000, Tim Bagot wrote: > Sorry, my steps to reproduce weren't exactly very detailed. I'll try > again: > > Sawfish: From Gnome, go to Desktop Preferences, Windows; Bindings tab. > Set default modifier to super. (Should take effect immediately.) Try > e.g. Win-TAB. Set to hyper, and try again. > > Emacs: Type C-h c Win-<key>
That's funny, the code in sawfish comes from emacs, so it is broken the same way and the fix is similar ;) The problem here is that the direct_modifiers function in src/keys.c contains: if (meta_mod != 0 && (mods & EV_MOD_META)) mods = (mods & ~EV_MOD_META) | meta_mod; if (alt_mod != 0 && (mods & EV_MOD_ALT)) mods = (mods & ~EV_MOD_ALT) | alt_mod; if (hyper_mod != 0 && (mods & EV_MOD_HYPER)) mods = (mods & ~EV_MOD_HYPER) | hyper_mod; if (super_mod != 0 && (mods & EV_MOD_SUPER)) mods = (mods & ~EV_MOD_SUPER) | super_mod; With default settings, meta_mod==alt_mod and hyper_mod==super_mod, so only Meta and Hyper modifiers are caught. And indeed if modifier is changed to Alt or Super, W-Tab is ignored. As with Emacs, some black magic is invoked to try to handle the Alt/Meta case, but it does not seem to work here. The attached patch ignores XKB fake keys, and those *_mod variables become unique. This patch has not been fully tested, I only checked that *_mods variable become unique. Sawfish maintainer, do you believe that this bug should be cloned and reassigned to sawfish? Denis
--- sawfish-1.3+cvs20040617/src/keys.c.orig 2004-09-13 00:47:19.000000000 +0200 +++ sawfish-1.3+cvs20040617/src/keys.c 2004-09-13 00:47:23.000000000 +0200 @@ -1515,6 +1515,9 @@ { int sym = syms[((code - min_code) * syms_per_code) + code_col]; + /* Is this a fake key? */ + if (code_col == 0 && sym == NoSymbol) + break; switch(sym) { case XK_Meta_L: case XK_Meta_R: