keyboard: ISO_Left_Tab

Andreas Mohr andi at rhlx01.fht-esslingen.de
Sat Nov 6 09:44:41 CST 2004


Hi,

On Sat, Nov 06, 2004 at 07:30:20AM -0800, Walt Ogburn wrote:
> +    /* Special case: X turns shift-tab into ISO_Left_Tab. */
> +    /* Here we change it back. */
> +    if ((ret == 0) && (keysym == XK_ISO_Left_Tab))
> +    {
> +        ret = 1;
> +       lpChar[0] = 0x09;
> +    }
> +
>      if (ret == 0)
>         {
>         BYTE dead_char;

Two comments:
a) A return value of 0 probably is much more common than the XK_ISO_Left_Tab
keysym, so the XK_ISO_Left_Tab check should be first to not have to check both
conditions in the event that ret is 0.
(the compiler might do reordering according to check probability, though,
but OTOH I doubt that it knows which one is more likely)
b) there's another if (ret == 0) *right below*, so why not add the
XK_ISO_Left_Tab check there? Again useless waste of resources...

Thanks for this patch!

Andreas Mohr



More information about the wine-devel mailing list