On Thu, 31 Mar 2011 17:45:55 -0500
"Edward K. Ream" <[email protected]> wrote:

> > I don't think c.bringToFront() brings the window to the front,
> 
> Correct. It simply sets c.requestedFocusWidget.
> 
> *Provided* that c.outerUpdate eventually gets called, the effect,
> within c.outerUpdate will be to execute this code::
> 
>     w = c.requestedFocusWidget
>     c.set_focus(w)
> 
> c.set_focus(w) calls g.app.gui.set_focus(w), the Qt version of which
> calls w.setFocus(). You can trace all these routines.

So is c.bringToFront() intended to raise the window containing c, or
not?  It doesn't, in both tabbed and non-tabbed qt.

> *Important*:  I suspect some Qt gui code is calling w.setFocus
> directly, which could undermine this scheme.  Another possibility is
> that c.outerUpdate isn't being called because the call to
> c.bringToFront is executing outside the logic of c.doCommand.
> 
> > and it certainly doesn't bring the correct tab to the front in the Qt tab 
> > interface.
> 
> This is a separate issue.  Changing tabs changes commanders, so if
> code uses the commander-oriented focus methods everything should just
> work.  That is, c.set_focus will work, but only if c matches the
> selected tab.

I meant programmatically, not by clicking a tab, i.e. the point above
and the point below are the same...

> > I think it needs to do both - the UNL machinery for inter-tree links calls 
> >it, but it doesn't work.
>
> Again, this is a separate issue.  In the qttabs gui, UNL must select
> the proper commander/tab before issuing focus requests.
> 
> In short, there may be focus-related problems with the qttabs gui, but
> messing with the low-level machinery is not likely to make things
> better :-)

So my initial thought might be better, which was a new function, either
g.raiseWindow(c), or c.raiseWindow(), which would have a qt specific
implementation which handled both tabbed and non-tabbed cases.

Make sense?  Which one do you prefer?

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to