On Fri, Apr 12, 2002 at 05:18:23PM +0200, Jan Martinek wrote: > 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?).
Because accoridung to the spec there are no other modifiers than Lock, Shift, Meta and 1 to 5. > * 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. Don't fiddle with the unused modifiers. Fvwm tries to grab each combination of unused modifiers. E.g. if Caps-Lock and Num-Lock are ignored and you issue key f1 a n bla fvwm grabs (no modifiers), (caps-lock), (num-lock) and (num-lock + caps-lock). If you add another 24 bits to the unused modifiers, fvwm tries to grab 2^26 combinations of modifiers. Most of them do not exist, hence the error messages. > * At last, I modified CheckBinding() because it works, though it's probably > quite dirty. No, that is a good solution, but it may be incomplete. It is never wrong to 'and' with ALL_MODIFIERS anywhere. There may be more places that should have a similar patch applied. > 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. see above. > 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) > { Bye Dominik ^_^ ^_^ -- Dominik Vogt, email: [EMAIL PROTECTED] LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20 -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]