Bug 485209 - Clicking in special views (diff) doesn't focus its split view
Summary: Clicking in special views (diff) doesn't focus its split view
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.02.1
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-08 00:03 UTC by Grósz Dániel
Modified: 2024-06-18 20:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grósz Dániel 2024-04-08 00:03:14 UTC
SUMMARY
When a diff view (or another special view: the Welcome view or an expanded Find in Files result view) is opened on one side of a split view, clicking inside the diff view doesn't make it the focused split.

The main problem this causes is that activating Hide Inactive Views from the menu, a shortcut, or (if put there) the main toolbar, it makes the other split view fill the window, rather than the diff view. Since the diff view further splits the view in two, I'd often like to use Hide Inactive Views with it. Another effect is that Ctrl+Tab switches documents in the other split.

The diff view does actually receive keyboard focus: Up and Down keys work to scroll it. It's just somehow not recognized by Kate as the active view.

Workarounds are to click the tab in the tab bar to activate it, or to click inside the diff view and then use the navigation bar's dropdown menu to activate Hide Inactive Views.

STEPS TO REPRODUCE
1. Create a split (I used Split Vertical).
2. Open a diff view (I did it using the Git sidebar).
3. Click somewhere inside the text in the diff view.
4. Click View/Split View/Hide Inactive Views.

OBSERVED RESULT
The view in the other side of the split fills the window.

EXPECTED RESULT
The diff view fills the window.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240404
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.2-1-default (64-bit)
Graphics Platform: X11
Comment 1 Grósz Dániel 2024-04-08 00:17:30 UTC
Seems related to 485210.
Comment 2 Christoph Cullmann 2024-04-10 19:46:54 UTC
Hmm, right, just clicking there doesn't set the focus right, only e.g. switching to a non-editor view via going to such a tab does that.
Comment 3 Christoph Cullmann 2024-06-18 20:57:48 UTC
Git commit ad9a2ac35fd2a02a85de90a0371c9f516204f758 by Christoph Cullmann.
Committed on 18/06/2024 at 20:57.
Pushed by cullmann into branch 'master'.

keep track of focus for widgets, too

M  +59   -28   apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/-/commit/ad9a2ac35fd2a02a85de90a0371c9f516204f758