On Sat, Dec 26, 2015 at 10:42:10PM +0500, Alexandr Shadchin wrote: > On Fri, Dec 25, 2015 at 05:55:22PM -0700, Anthony J. Bentley wrote: > > Hi, > > > > As X starts, it will attempt to detect features from the kbd(8) > > setting--for example, us.dvorak will enable dvorak in X, and > > fr.dvorak will enable French dvorak in X. However, it detects > > these features with equality checks, which will fail if multiple > > options are set, as in the case of us.dvorak.swapctrlcaps or > > fr.dvorak.swapctrlcaps. > > > > Instead of checking for equality, this diff instead checks if the > > bits are set. Now us.dvorak.swapctrlcaps and fr.dvorak.swapctrlcaps > > work, us.swapctrlcaps.iopener swaps ctrl/caps, and the ones that > > already worked (de.nodead, etc) still do. > > > > This was reported on misc@ by "Sevan / Venture37" back in June. > > > > ok? > > > > ok shadchin@
It looks ok to me too. ok matthieu@. > > > Index: config/wscons.c > > =================================================================== > > RCS file: /cvs/xenocara/xserver/config/wscons.c,v > > retrieving revision 1.14 > > diff -u -p -r1.14 wscons.c > > --- config/wscons.c 15 Jan 2015 01:30:40 -0000 1.14 > > +++ config/wscons.c 25 Dec 2015 21:37:21 -0000 > > @@ -139,7 +139,7 @@ wscons_add_keyboard(void) > > break; > > } > > for (i = 0; kbdvar[i].val; i++) > > - if (wsenc == kbdvar[i].val || KB_VARIANT(wsenc) == kbdvar[i].val) { > > + if ((wsenc & kbdvar[i].val) == kbdvar[i].val) { > > LogMessageVerb(X_INFO, 3, "wskbd: using variant %s\n", > > kbdvar[i].name); > > input_options = input_option_new(input_options, > > @@ -147,7 +147,7 @@ wscons_add_keyboard(void) > > break; > > } > > for (i = 0; kbdopt[i].val; i++) > > - if (KB_VARIANT(wsenc) == kbdopt[i].val) { > > + if (KB_VARIANT(wsenc) & kbdopt[i].val) { > > LogMessageVerb(X_INFO, 3, "wskbd: using option %s\n", > > kbdopt[i].name); > > input_options = input_option_new(input_options, > > > > -- > Alexandr Shadchin -- Matthieu Herrb
pgpXGvjUkK3j0.pgp
Description: PGP signature