> On Aug. 20, 2012, 8:51 a.m., David Faure wrote:
> > Thanks for looking into this.
> > 
> > To be honest, I don't like the timer. It penalizes fast users, and it feels 
> > like a workaround. Surely at some point konqueror knows whether it's going 
> > to open a url in the tab or not. That's the point in the code where we 
> > should decide where to put the focus (and in terms of timing, this should 
> > happen almost immediately; we don't need to wait for a KonqRun or anything).

I do not like the timer solution either. However, short of calling setFocus() 
like the previous solution, I see no other way to address the problem. That is 
because the issue is not knowing whether we are going to open a url in the tab 
or not, but when. It is a timing issue as to when we should check and change 
the focus to the locationbar. Right now we do that in the only place that can 
accommodate all use cases ; both the creation of a new tab through code and the 
manual creation/activation of the tab by the user. Unfortunately, that is 
exactly the wrong place to make such a decision for the tab creation through 
code use case because a tab can be created with "blank" or empty URL.

The only other solution I see is to change the focus back to the view when the 
KPart emits the started(KIO::Job*) signal. That won't affect the manual tab 
activation use case and won't require timer. It does however mean adding a 
setFocus() call. Would that be a preferable solution ?


- Dawit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105984/#review17743
-----------------------------------------------------------


On Aug. 20, 2012, 2:22 a.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105984/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2012, 2:22 a.m.)
> 
> 
> Review request for KDE Base Apps and David Faure.
> 
> 
> Description
> -------
> 
> The attached patch address the bug reported in #304933. Right now if 
> Konqueror is configured to open new tabs in the foreground, i.e. the "Open 
> tabs in the background" option is unchecked, then the keyboard focus is put 
> on the location bar instead of the view.
> 
> 
> This addresses bugs 304865 and 304933.
>     http://bugs.kde.org/show_bug.cgi?id=304865
>     http://bugs.kde.org/show_bug.cgi?id=304933
> 
> 
> Diffs
> -----
> 
>   konqueror/src/konqframe.h 60aa4d0 
>   konqueror/src/konqframe.cpp 10ed7cd 
>   konqueror/src/konqviewmanager.cpp 5352eeb 
> 
> Diff: http://git.reviewboard.kde.org/r/105984/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

Reply via email to