Bug 499223

Summary: Window title is empty while git diff is active
Product: [Applications] kate Reporter: cwo <cwo.kde>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description cwo 2025-01-28 01:22:13 UTC
SUMMARY

Usually, Kate shows both the currently open Session and the currently open file in its window title, followed by a long dash and the application name Kate. But when a diff view is open, only the "Kate" part remains.

STEPS TO REPRODUCE
1.  Open Kate, make sure the projects plugin is enabled. Ideally in a named Kate session
2.  Open a file in a git repository, change it and save.
3.  Open the git toolview, right-click the modified file, select "Show diff"

OBSERVED RESULT

The window title is "Kate"

EXPECTED RESULT

The window title is "Namedkatesession: Diff filename.ext — Kate"

SOFTWARE/OS VERSIONS

Kate master, fresh.

Operating System: TUXEDO OS 
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.1
Kernel Version: 6.11.0-108013-tuxedo (64-bit)
Graphics Platform: Wayland
Comment 1 Waqar Ahmed 2025-01-31 09:28:34 UTC
Git commit d50a1830395433885e6904838f40030c3f3f1e41 by Waqar Ahmed.
Committed on 31/01/2025 at 09:28.
Pushed by waqar into branch 'master'.

Ensure caption is set when a widget is active

M  +3    -1    apps/lib/katemainwindow.cpp

https://invent.kde.org/utilities/kate/-/commit/d50a1830395433885e6904838f40030c3f3f1e41
Comment 2 cwo 2025-02-07 10:13:24 UTC
Thanks for fixing this!

The title is now set, but doesn't include the name of the kate session like it does for tabs showing a file. Would it be possible to add this for consistency? I use it to identify which kate window belongs to which session, and leaving one on a diff window makes it harder to identify from the task manager / alt-tab switcher.
Comment 3 Waqar Ahmed 2025-02-12 11:57:39 UTC
Git commit 6119b2876b5b746ab34e1a55931913a9468e05f4 by Waqar Ahmed.
Committed on 12/02/2025 at 11:55.
Pushed by waqar into branch 'release/24.12'.

Ensure caption is set when a widget is active
(cherry picked from commit d50a1830395433885e6904838f40030c3f3f1e41)

M  +3    -1    apps/lib/katemainwindow.cpp

https://invent.kde.org/utilities/kate/-/commit/6119b2876b5b746ab34e1a55931913a9468e05f4