> SR> Your confusion was undoubtedly due to the situation where
> SR> you've got multiple xterm windows open, since the opposite
> SR> problem occurs when you've got a modern GUI application (and
> SR> by that I mean one that uses dialogs and palettes).
>
> This is a red herring.
An application that opens dialog boxes is a red herring? I disagree,
I think *that* is the most important class of applications. If you
think xterms are more important, we'll just have to leave the argument
at that.
(snip)
> Me> and even as separate top level windows pop up and down
> Me> (e.g. to interact with the Bookmarks, History, or File
> Me> dialogs), focus is managed correctly to the subwindows without
> Me> ever having to move the mouse (as long as its one of the
> Me> application's top level windows), even with pointer-focus.
>
> SR> How, by warping the mouse?
>
> Nope. Tk has a number of focus management commands and it imposes its
> own rational focus management policy on the toolkit. I won't
> reproduce the entire Tk focus.n manpage here, since its free software
> and you can get it and read it yourself. Suffice to say that if I
> have a window `.w' I can redirect focus to it with `focus .w' (well I
> think I've accurately translated the Python equivalent into Tcl :-).
> In Python, if `frame' is a Tkinter.Toplevel instance, then
> frame.focus_set() redirects focus into the window.
As best I remember (or can determine from the Tk documentation) the
focus comand only works with child windows within a toplevel window:
if your application opens a dialog box on a pointer focus system, you
*must* move the mouse into the dialog before you can star using it.
> Fvwm has nothing to do with it. If, when the Open Location dialog was
> popped up, Netscape redirected its application's focus to that window,
> the problem would be solved. It *can* be done with pointer-focus
> policy, no pointer warping, no server grabs, and no need to pop the
> window up under the cursor. Your application, or toolkit, just has to
> provide the right kind of focus management policy. Maybe that's hard,
> but that's an engineering problem, not made impossible by the design
> of pointer-focus policy.
I think this is wrong, at least as I understand pointer focus. Maybe
you're thinking of sloppy focus or something. Pointer focus is where
the window with the mouse cursor in it has the keyboard focus. There
are no exceptions to this rule, and warping the cursor is the only way
an application can ensure that one of its windows gets the focus.
> All I can say here is that if the Motif toolkit doesn't allow you to
> manage focus as flexibly and rationally as the Tk toolkit does, then
> either the Motif toolkit implementation is buggy, or the Motif
> specification is broken. I suspect neither is the case, but I have
> never written a Motif-toolkit based application so I wouldn't know.
> It certainly isn't an inherent property of X, or other X-compatible
> toolkits.
Setting the focus to individual controls in Xt/Motif is as easy as it
is with Tk.
> Not to say Tk is perfect, but at least for focus management it
> provides exactly the abstration you need.
Maybe within a dialog window this is true, but since Tk doesn't
support modal dialogs, it's stuck recommending "grabs" as a standard
UI technique (see Chapter 24 of Ousterhout's Tcl book). You think you
dislike explicit focus and modal dialogs, wait till you experience a
Tk app grabbing the whole server because that's the only way to do
this sort of thing in Tk.
Regards,
Scott
> -Barry
> --
> Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_hpc.uh.edu.
> To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
>
--
***************************************************************
Scott Raney raney_at_metacard.com http://www.metacard.com
Tcl and ksh: syntactic gymnastics
MetaCard: it does what you think
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Sat Oct 26 1996 - 17:31:24 BST