| > But, if I try to change the focus using the TAB, what happens is that
> the keyboard got grabbed by someone and not only for this specific
> application but for all the clients using the same server.
The dialog box has a passive grab for the Tab key in order to be able
to move the input focus "synchronously" between fields. The problem
you are seeing could happen in two cases (that I can think of - otherwise
I don't understand how it could happen...):
1. You've overriden the translation for Tab and are not calling
XAllowEvents or XUngrabKeyboard.
2. You are hitting 2 tabs quickly; that is, the first tab causes the modal
dialog box to appear, and the second tab causes the problem. The
problem in this case is that the modal dialog box prevents the
Tab key from being dispatched to the dialog box with the text fields,
and XAllowEvents is never called.
Are you doing case 1 or 2?
> P.P.S. Why a modeless msg box doesn't unmanage itself even if the
> auto_unmanage resource is set to TRUE?
The auto_unmanage resource is only support for modal dialog boxes.
Leo
|
|
>The dialog box has a passive grab for the Tab key in order to be able
>to move the input focus "synchronously" between fields. The problem
>you are seeing could happen in two cases (that I can think of - otherwise
>I don't understand how it could happen...):
>1. You've overriden the translation for Tab and are not calling
> XAllowEvents or XUngrabKeyboard.
>2. You are hitting 2 tabs quickly; that is, the first tab causes the modal
> dialog box to appear, and the second tab causes the problem. The
> problem in this case is that the modal dialog box prevents the
> Tab key from being dispatched to the dialog box with the text fields,
> and XAllowEvents is never called.
>Are you doing case 1 or 2?
Well, the answer is neither 1 or 2.
I didn't touch the translation for TAB and I'm not a video game player (I'm not
so fast in hitting keys). However, your answer gives me an idea that is:
I already had troubles with TAB when using it to change the focus. In fact what
happens is that the lost_focus callback associated to the losing_focus stext
is called twice (the mode field in the event structure is set once to
NotifyGrab and the other time to something like NotifyWhileGrabbed).
What I do is to check the field from within the callback and take no action
in one of the two cases.
Couldn't it be the same story in this case too?
Unfortunately I don't know how to get into the routine that handles the TAB
in order to discard one of the two events. (I know I can override the routine
with a user written one but I don't want to lose the stext widgets management
already implemented in the toolkit routine...)
It's just a guess. If what I've written is garbage, please correct me.
Have you any idea to work on?
In any case, thanks a lot.
Matteo.
|