I have a situation where the non-motif application sends a message to
the motif application. This causes a dialog (XmCreateFormDialog) to
be created and displayed. However, as soon as the dialog is displayed
(with a call XtManageChild) it steals focus away from the non-motif
application.
This means as the user is typing away on one window, a 'background'
window is being updated and suddenly steals the focus away, meaning a
trip to the mouse to put focus back in the window that is typing.
Any thoughts on how to prevent this?
- brian
- brian
This is for KDE 3.5.x
Right mouse button on window title, Advanced, Focus stealing prevention
level goes form None to Extreme.
Try playing with that to see if it makes any difference.
I would say that focus which follows mouse is unusual these days, and
the more you differ from average, the more problems you have (like in
real life ;-)
All in all, solution to your problem is its entirely in the hands of the
window manager.
Dušan Peterc
http://www.arahne.si
I changed this to extreme and it had no effect.
> I would say that focus which follows mouse is unusual these days, and
> the more you differ from average, the more problems you have (like in
> real life ;-)
It isn't so much that I want the focus to follow the mouse as I want a
program that is not in focus to not grab focus when opening a new
dialog. On one machine, I don't have focus follow the mouse, I
require a mouse click to gain focus. Yet, my motif program still
grabs focus for each new dialog, including at startup, even if it
didn't have focus when the new dialog appears.
- brian
My experience with this is as following.
If I don't set focus stealing prevention to none,
then when my motif application pops up a new dialog,
that new dialog opens behind any other dialogs, which
are already open. Which is extremely annoying, to
the point of show-stopper for novice users.
Setting the focus stealing prevention to none fixes that.
But it opens a new can of worms in OpenSUSE, where
various system dialogs, for example during updates,
CD burning, etc. keep on getting focus...
So my choice is either popups which open behind
current dialog, or annoying keyboard focus stealing
from system applications.
I am sorry it did not solve the problem for you.
Dušan Peterc
http://www.arahne.si
Turns out, I can get your solution to work if I make the setting
globally (ie all windows) rather than for a specific window (which is
what I tried). But, if I do that, then I see the same problem you
mention here, which is a show stopper for us.
In fact, we saw with KDE 3.5.x if we made this change, and had our
toolbar to atuo-hide, it would hide and we would be unable to get it
back (we think because it was 'behind' the desktop).
So, I am back to square one. Anyone know if there is a way when the
dialog is created (via Motif) to specify it should not take focus? I
know other non-motif programs can do it (ie when I download something
in firefox, the download manager will open, but not take focus).
any thoughts?
- brian