lost focus

huzj huzj at magima.com.cn
Thu Dec 13 03:25:09 CET 2007


hi,
As I known , Konqueor/E has two focus problems.
One is that when open a new tab or close a new tab. It will lose focus and 
the original opened window can't get focus again.
The other is that window.focus() is not functional correctly.

The first problem can be fixed by a call :
  MainWindowBase::m_currentView->part()->widget()->setFocus();

The second problem is in DocumentImpl::setFocusNode(xxx)
there is a statement :
 is (view()->isVisible())
I commented out this statement, and the window.focus() seems to be correct.

I think you can add a javascript call to implement the first method.And then 
make a call to window.focus()

It has been a long time since I did the work above. Maybe I forget something 
of it. You can try and make a verification.

J
----- Original Message ----- >
> This may be a newbie question, but I've searched for the answer for a
> while, and still don't know.  In the course of running konq/e, I have a
> javascript function that calls an external program that requires some user
> input.  Up to there all is functioning correctly, but on return it would
> seem that the original page no longer has keyboard input focus.  I run
> strace on konqueror, and I see that one of the processes actually gets the
> input, but nothing is done with it.  The keystrokes just don't go
> anywhere.  How do I regain focus on the original window?
>
> TIA,
>
> Tom Green
> tgreen at digecor.com 



More information about the konq-e mailing list