Bug 407495

Summary: Selecting a project tab does not change focus from editor to terminal
Product: [Applications] konsole Reporter: James Swift <swiftscripts>
Component: kpartAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal CC: christoph
Priority: NOR    
Version: 19.04.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description James Swift 2019-05-13 13:48:01 UTC
SUMMARY
If you have been typing in the editor, when you select a tab in the "Current Project" window the focus does not change to the selected window. As a result, I often end up typing a command into the editor by mistake.

EXPECTED RESULT
Selecting a window tab should switch focus to that window

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 19.04
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.2
Kernel Version: 5.0.0-13-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2400 CPU @ 3.10GHz
Memory: 7.6 GiB of RAM


ADDITIONAL INFORMATION
Comment 1 Christoph Cullmann 2019-07-14 11:47:27 UTC
Git commit 8f07fa7344cfad9cbe2cab4b34146e1752eed842 by Christoph Cullmann.
Committed on 14/07/2019 at 11:46.
Pushed by cullmann into branch 'master'.

improve focus handling of project plugin
terminals still don't want to get focus :/

M  +2    -0    addons/konsole/kateconsole.cpp
M  +1    -0    addons/project/kateprojectinfoviewterminal.cpp
M  +9    -10   addons/project/kateprojectpluginview.cpp
M  +3    -0    addons/project/kateprojectview.cpp
M  +2    -0    addons/project/kateprojectviewtree.cpp

https://commits.kde.org/kate/8f07fa7344cfad9cbe2cab4b34146e1752eed842
Comment 2 Christoph Cullmann 2019-07-14 11:54:07 UTC
Hi, dear Konsole devs.

Kate uses the KonsolePart for the terminal tool views.

Other tool views will handle setFocus() on activation, the tool views that have embedded KonsolePart stuff not really.

We setup the focus proxy like for the other widgets, but for Konsole this doesn't lead to focus taking on toolview show. Any ideas?

See code in e.g. addons/konsole/kateconsole.cpp or a bit cleaner for the project plugin konsole addons/project/kateprojectinfoviewterminal.cpp