Fix handling of multiple modifiers. - sam - An updated version of the sam text editor.
 (HTM) git clone git://vernunftzentrum.de/sam.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit b4fa0da23ad1e33ffb2955133b88e2ee7b3bb521
 (DIR) parent 4466f50c07c8801889f94775b3e2875f45f9c784
 (HTM) Author: Rob King <jking@deadpixi.com>
       Date:   Fri,  9 Sep 2016 17:02:21 -0500
       
       Fix handling of multiple modifiers.
       
       Diffstat:
         libXg/gwin.c                        |       5 ++---
       
       1 file changed, 2 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/libXg/gwin.c b/libXg/gwin.c
       @@ -246,13 +246,12 @@ Keyaction(Widget w, XEvent *e, String *p, Cardinal *np)
             */
            if(e->xany.type != KeyPress)
                return;
       -
            XtTranslateKeycode(e->xany.display, (KeyCode)e->xkey.keycode, e->xkey.state, &md, &k);
        
            /* Check to see if it's a specially-handled key first. */
            for (Keymapping *m = keymappings; m; m = m->next){
                if (k == m->s){
       -            if ((e->xkey.state & m->m) || m->m == 0){
       +            if (m->m == 0 || (m->m & ~e->xkey.state) == 0){
                        f = ((GwinWidget)w)->gwin.gotchar;
                        if (f)
                            (*f)(m->c, m->k, Tcurrent, 0, 0);
       @@ -265,7 +264,7 @@ Keyaction(Widget w, XEvent *e, String *p, Cardinal *np)
             * The following song and dance is so we can have our chosen
             * modifier key behave like a compose key, i.e, press and release
             * and then type the compose sequence, like Plan 9.  We have
       -     * to find out which key is the compose key first 'though.
       +     * to find out which key is the compose key first though.
             */
            if (IsModifierKey(k) && ((GwinWidget)w)->gwin.compose
                    && composing == -2 && modmap) {