Bug 452123

Summary: In filename config, %T window title not working
Product: [Applications] Spectacle Reporter: kdebugtracker <kdebugtracker>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED NOT A BUG    
Severity: minor CC: kde, yerrey
Priority: NOR    
Version: 21.12.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kdebugtracker@rushvora.com 2022-03-31 18:13:18 UTC
In Configure, when setting the filename, using %T to insert the Window Title is not working as expected.
When I set "%T_Screenshot_%Y%M%D_%H%m%S", the output file is named "Screenshot_20220331_233057" for example.. as if "%T_" is ignored. When setting "%T_%Y%M%D_%H%m%S" as the filename, the output ends up being "Y0331_233309" instead.

In the preview field it shows the expected filename as "Spectacle_20220331_233057" as expected.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: EndeavourOS
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Kernel Version: 5.17.1-arch1-1 (64-bit)
Graphics Platform: X11
Comment 1 Yerrey Dev 2022-06-23 20:13:19 UTC
If you are using rectangular selection, there is no selected application where to get the window title from and thus it is ignored. If you capture either "Active Window" or "Window under cursor", there is an active application where to get the title from and it works for me.
Comment 2 kdebugtracker@rushvora.com 2022-06-24 21:08:42 UTC
That makes sense.. thanks for the explanation!