open-src/lib/libX11/solaris-kbd.patch
changeset 1294 a1e1d31e0aa4
parent 1233 1134c9fd2fe6
child 1301 371a43cad701
equal deleted inserted replaced
1293:16ddf01dc7a2 1294:a1e1d31e0aa4
    21 # DEALINGS IN THE SOFTWARE.
    21 # DEALINGS IN THE SOFTWARE.
    22 #
    22 #
    23 
    23 
    24 
    24 
    25 diff --git a/src/KeyBind.c b/src/KeyBind.c
    25 diff --git a/src/KeyBind.c b/src/KeyBind.c
    26 index 221cedd..e06f954 100644
    26 index 221cedd..732c0cf 100644
    27 --- a/src/KeyBind.c
    27 --- a/src/KeyBind.c
    28 +++ b/src/KeyBind.c
    28 +++ b/src/KeyBind.c
    29 @@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group.
    29 @@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group.
    30  #define XK_VIETNAMESE
    30  #define XK_VIETNAMESE
    31  #define XK_XKB_KEYS
    31  #define XK_XKB_KEYS
   278  			     buffer, nbytes);
   278  			     buffer, nbytes);
   279 +#endif /* SUNSOFT_KBD */
   279 +#endif /* SUNSOFT_KBD */
   280  }
   280  }
   281  
   281  
   282  static void
   282  static void
   283 @@ -1076,3 +1214,287 @@ ComputeMaskFromKeytrans(
   283 @@ -1076,3 +1214,290 @@ ComputeMaskFromKeytrans(
   284      }
   284      }
   285      p->state &= AllMods;
   285      p->state &= AllMods;
   286  }
   286  }
   287 +
   287 +
   288 +#ifdef SUNSOFT_KBD
   288 +#ifdef SUNSOFT_KBD
   521 +    if (compose_state == ACCEPTED3) {
   521 +    if (compose_state == ACCEPTED3) {
   522 +        buffer[0] = *keysym;
   522 +        buffer[0] = *keysym;
   523 +        *return_val = 1;
   523 +        *return_val = 1;
   524 +    }
   524 +    }
   525 +    else {
   525 +    else {
       
   526 +        if (compose_state == ACCEPTED2) {
       
   527 +            buffer[0] = '\0';
       
   528 +        } 
   526 +        *return_val = 0;
   529 +        *return_val = 0;
   527 +    }
   530 +    }
   528 +
   531 +
   529 +    return(1);
   532 +    return(1);
   530 +}
   533 +}
   566 +	led_control.led = num;
   569 +	led_control.led = num;
   567 +	XChangeKeyboardControl (dpy, KBLed | KBLedMode, &led_control);
   570 +	XChangeKeyboardControl (dpy, KBLed | KBLedMode, &led_control);
   568 +    }
   571 +    }
   569 +}
   572 +}
   570 +#endif /* SUNSOFT_KBD */
   573 +#endif /* SUNSOFT_KBD */
       
   574 diff --git a/src/imConv.c b/src/imConv.c
       
   575 index e212049..35e58a3 100644
       
   576 --- a/src/imConv.c
       
   577 +++ b/src/imConv.c
       
   578 @@ -214,7 +214,9 @@ _XimLookupMBText(
       
   579  			    args, 1 ) != 0) {
       
   580  		count = 0;
       
   581  	    } else {
       
   582 -                count = nbytes - to_len;
       
   583 +                if(count != 0){
       
   584 +                    count = nbytes - to_len;
       
   585 +                }
       
   586  	    }
       
   587  	}
       
   588      }
       
   589 @@ -284,7 +286,9 @@ _XimLookupWCText(
       
   590  			    args, 1 ) != 0) {
       
   591  		count = 0;
       
   592  	    } else {
       
   593 -                count = nbytes - to_len;
       
   594 +                if(count != 0){
       
   595 +                    count = nbytes - to_len;
       
   596 +                }
       
   597  	    }
       
   598  	}
       
   599      } else
       
   600 @@ -345,7 +349,9 @@ _XimLookupUTF8Text(
       
   601                          NULL, 0) != 0) {
       
   602  	    count = 0;
       
   603  	} else {
       
   604 -            count = nbytes - to_len;
       
   605 +            if(count != 0){
       
   606 +                count = nbytes - to_len;
       
   607 +            }
       
   608  	}
       
   609      }
       
   610      /* FIXME:
   571 diff --git a/src/xkb/XKBBind.c b/src/xkb/XKBBind.c
   611 diff --git a/src/xkb/XKBBind.c b/src/xkb/XKBBind.c
   572 index 1c16adc..3370896 100644
   612 index 1c16adc..3370896 100644
   573 --- a/src/xkb/XKBBind.c
   613 --- a/src/xkb/XKBBind.c
   574 +++ b/src/xkb/XKBBind.c
   614 +++ b/src/xkb/XKBBind.c
   575 @@ -53,6 +53,12 @@ static int _XkbLoadDpy(
   615 @@ -53,6 +53,12 @@ static int _XkbLoadDpy(