Bug 443117 - "Mark taskbar entry" does not work for Konsole notifications
Summary: "Mark taskbar entry" does not work for Konsole notifications
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-29 14:58 UTC by Nicole Kleinhoff
Modified: 2022-04-19 16:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: v22.04.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole Kleinhoff 2021-09-29 14:58:20 UTC
Configuring Konsole 21.08.1 notifications to enable the "mark taskbar entry" flag will not actually mark the taskbar entry. Notifications otherwise appear to work as intended.

To reproduce, I've run a `sleep 5; echo -e '\a'` command inside a terminal session and switched to another virtual desktop.

Reviewing logs, it seems that each triggered notification configured to mark the taskbar entry generates output such as:

kf.notifications: Could not notify  "BellInvisible" by taskbar, notification has no associated widget

Terminal bell notifications with the "mark to taskbar" flag used to work in Konsole 21.04; I can't confirm right now whether other notifications previously worked.

For the record, locally reverting commit 67508680 allows notifications for terminal bells (but still none of the monitoring notifications) to mark the taskbar entry as expected.

KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
(on X11)
Comment 1 Bug Janitor Service 2022-01-07 23:52:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/573
Comment 2 Kurt Hindenburg 2022-01-11 16:12:19 UTC
Git commit 0fe44c52310a6c276388cf30c81b6fc45a39da32 by Kurt Hindenburg, on behalf of Luis Javier Merino Morán.
Committed on 11/01/2022 at 15:57.
Pushed by hindenburg into branch 'master'.

Pass widget again to KNotification on bell

67508680 refactored TerminalBell out from TerminalDisplay, and in the
process stopped passing the TerminalDisplay widget to KNotification,
which resulted in issues when notifications where configured to mark the
task bar entry or run a command with %w/%t substitutions (for window id
and window title).

Many thanks to Nicole Kleinhoff and Jan Palus who identified the commit
that introduced the regression.
Related: bug 443411, bug 445520

M  +3    -2    src/terminalDisplay/TerminalBell.cpp
M  +2    -1    src/terminalDisplay/TerminalBell.h
M  +1    -1    src/terminalDisplay/TerminalDisplay.cpp

https://invent.kde.org/utilities/konsole/commit/0fe44c52310a6c276388cf30c81b6fc45a39da32
Comment 3 Kurt Hindenburg 2022-01-11 16:12:43 UTC
Git commit 28bfbf1a9fa78f79a2d17301615da4c6b3afc9f3 by Kurt Hindenburg, on behalf of Luis Javier Merino Morán.
Committed on 11/01/2022 at 15:57.
Pushed by hindenburg into branch 'master'.

Pass widget again to monitoring KNotifications

9f656939 introduced the possibility of showing a session in multiple
views, something which is no longer supported.  In doing so, it started
passing QApplication::activeWindow(), instead of TEWidget (nowadays
TerminalDisplay) to KNotification.

7592e894 split notifications for focused/unfocused terminals.
Unfortunately, QApplication::activeWindow() returns nothing for unmapped
windows, which results in issues when notifications are configured to
mark the task bar entry or run a command with %w/%t substitutions (for
window id and window title).

M  +12   -2    src/session/Session.cpp
M  +1    -1    src/session/SessionController.cpp

https://invent.kde.org/utilities/konsole/commit/28bfbf1a9fa78f79a2d17301615da4c6b3afc9f3