Hello,

my friend ( [EMAIL PROTECTED] ) made a patch for fixing the bad
behaviour of czech keyboard in fvwm. He cannot write to you himself,
because he must have gone to military service :-(((
This is what ho wrote about the patch:


The patch
  + solves our problem
  + shouldn't break other things more than they are now
  - is not particularly clean
  - doesn't solve the modifier problem generally

* Czech (Slovak...) keyboard has traditionally two modes: Czech and English,
  with LShift-RShift or NumLock or something like that switching between
  them.  This introduces another modifier, ``keyoard mode'', which actually
  gets its own bit in the `state' field assigned (on our machines it happens
  to be 0x2000, but I don't know how deterministic is it).  This modifier
  doesn't really modify anything and should be completely ignored.

* Generally, it doesn't make sense to keep any modifiers which are not in
  ALL_MODIFIERS (fvwm-2.2 did it approximately this way), however, fvwm-2.4
  keeps them all and ignores only explicitely specified (known) modifiers
  (why?).

* Originally I thought mere adding `|~ALL_MODIFIERS' to `mods_unused' (i.e.
  setting all bits corresponding to should-be-ignored modifiers) would
  solve the problem, but it generated a HUGE number of following errors:

    [FVWM][<<ERROR>>]: FvwmErrorHandler *** internal error ***
    [FVWM][<<ERROR>>]: FvwmErrorHandler Request 33, Error 2, EventType: 20

  I don't understand why, but I didn't tried very hard to.

* At last, I modified CheckBinding() because it works, though it's probably
  quite dirty.  The fact I can't just modify `mods_unused' means either I'm
  completely wrong, or I don't understand all its uses, or there something
  broken in fvwm.

  I kept MatchBindingExactly() intact because it's never used (and maybe
could
  be completely removed).

* I can't check whether it breaks something with other strange national
  keyboards because I don't use them.


--- fvwm-2.4.5.orig/libs/Bindings.c     Wed Feb 20 20:19:35 2002
+++ fvwm-2.4.5/libs/Bindings.c  Wed Feb 20 20:19:38 2002
@@ -550,7 +550,7 @@
   Binding *b;
   unsigned int used_modifiers = ~dead_modifiers;
 
-  modifier &= used_modifiers;
+  modifier &= used_modifiers & ALL_MODIFIERS;
 
   for (b = blist; b != NULL; b = b->NextBinding)
   {

Reply via email to