Olivier Roulet wrote:
>
> Hello ,
>
> Yesterday I convinced a friend to use blackbox. She
> liked how fast it started but after 2 minutes she came
> back complaining that ClickTofocus do not work.
> She had the NumLock ON and it was impossible to get a
> window focused by clicking in the middle of it. This
> only works with NumLock OFF.
> This is a quite old bug, still here with the 61.1
> Does someone know a by-pass ?
>
> What do you, people, think ? Is it a bug or do I
> misunderstand something ?
I haven't delved into the code very deeply, but based on what I remember from
fixing similar problems in my own code, I think what you want to do is find
places where the XButtonEvent's "state" is compared to a value, such as in
line 2416 in Window.cc, and mask out the modifier keys. I don't think that
particular example is the culprit in this case, but for example, if you
replace:
} else if (be->button == 1 || (be->button == 3 && be->state == Mod1Mask)) {
with
} else if (be->button == 1 || (be->button == 3 && (be->state &
(Mod1Mask|Mod2Mask|Mod3Mask) == Mod1Mask)) {
It won't be screwed up by the other things that can be in the state variable,
like the current state of caps-lock, num-lock and scroll-lock keys.
--
Paul Tomblin, Software Developer
---begin stuff I'm forced to include--
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify SunGard Trading Systems immediately at (201)
617-2600 or [EMAIL PROTECTED], and destroy all copies of this message and
any attachments.
--end--
Leader Kibo does not require the preceeding disclaimer, but it is allowed.
Sorry, George.