Bug 222712

Summary: Set focus when opening Konsole toolview
Product: [Applications] kdevelop Reporter: jan.fostier
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: wishlist CC: olivier.jg
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description jan.fostier 2010-01-14 14:43:13 UTC
Version:           3.9.97 (using KDevPlatform 0.9.97) (using 4.3.4 (KDE 4.3.4), 4.3.4-3.fc12 Fedora)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.31.9-174.fc12.x86_64

If you select the Konsole toolview, and you type something, the cursor is still in the editor window.  I would be handy if the focus changed automatically to the Konsole window (so you don't have to click it).  For the other toolboxes, the cursor should remain in the editor window.  Thanks.
Comment 1 Andreas Pakulat 2010-01-14 15:24:36 UTC
How do you select the toolview?
Comment 2 jan.fostier 2010-01-14 15:30:49 UTC
> How do you select the toolview?
>    
By clicking on the Konsole toolview button at the bottom of the screen.  
My expectation is that the cursor focus would migrate to the Konsole as 
well.
Comment 3 jan.fostier 2010-01-14 15:36:51 UTC
I just checked kDevelop 3.5 and there the cursor migrates to the Konsole 
when selecting it.  I moves nicely back to the editor when hiding it.
Comment 4 Andreas Pakulat 2010-01-14 16:00:12 UTC
Would you also expect this to happen when other toolviews are opened this way?

I'm asking because it actually did focus until a few days ago, when that was changed. The reason was a bugreport for the outputviews and their next/previous error actions, where you usually don't want the focus to move to the toolview. (see bug 219052)

I do agree though that showing/hiding a toolview is a good candidate for moving the focus to it.
Comment 5 jan.fostier 2010-01-14 16:16:21 UTC
I saw the other bugreport as well.

My opinion is that only the Konsole should 'steal' the focus from the 
editor and not the other toolviews which are more or less "output only".

That being said, what are the buttons "Select Activated Items" and 
"Focus when selecting item" for in e.g. the Version Control and Run 
toolviews?  I don't see what they do.  I would expect them to configure 
the focus behaviour.

If that is true, it would be nice to have such a "Focus when selecting 
Konsole" button at the top of the Konsole toolview as well so that the 
user could chose whether or not he/she wants the focus to change to the 
Konsole.
Comment 6 Olivier.jg 2010-01-15 01:45:02 UTC
I made the patch that changed this behavior a couple weeks back. As I recall, currently there's no way to show only a specific toolview with(out) setting the focus, because they all just use a checked action that simply gets toggled, with no ability to pass on a setFocus bool. In other words, it's either all or nothing.
When I noticed that most of the toolviews don't even set a proxy for their focus, so the setfocus was actually useless (in those cases), I figured no setFocus was acceptable... unfortunately I didn't think of the konsole.
I'm a little hazy on the details, but to fix this properly would probably mean changing up the API (internal and external) a bit. Probably should be done though...
Comment 7 Olivier.jg 2010-01-27 07:36:48 UTC
SVN commit 1080868 by olivierjg:

Only setfocus on dock widgets that have a focusPolicy or have a valid focusProxy
BUG:222712


 M  +1 -1      ideal.cpp  
 M  +13 -6     ideallayout.cpp  
 M  +1 -1      ideallayout.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1080868
Comment 8 jan.fostier 2010-03-01 16:14:53 UTC
This works very well now!  Thanks.