Bug 425071 - Option to show all notifications in fullscreen windows
Summary: Option to show all notifications in fullscreen windows
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.19.4
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords: usability
: 421594 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-06 11:54 UTC by Oleksandr Popel
Modified: 2021-04-30 18:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleksandr Popel 2020-08-06 11:54:39 UTC
SUMMARY
Currently Plasma shows only urgent notifications if fullscreen window is open. I guess that the reasoning behind it is that when people are giving presentations, playing games or watching movies - they don't want notifications to pop up on the screen. However, that is not always the case. Most of the time when I'm watching a video or playing a game, I want to be notified about important messages. Currently I have to rely on messaging application playing a sound when something happens, but that's very unreliable (because the sound from video or game may "hide" the message sound).
I'm OK with it being the default behavior (although it's weird, considering that there's "Do not disturb" checkbox exactly for when you don't want to be disturbed), but an option to show all notifications in fullscreen windows would be extremely useful.

STEPS TO REPRODUCE
1. Open a fullscreen window.
2. Receive a non-urgent notification.

OBSERVED RESULT
Notification does not appear.

EXPECTED RESULT
If "Do not disturb" mode turned off - notification to appear.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Comment 1 Nate Graham 2020-08-10 18:00:26 UTC
I have wished for this myself from time to time, yes. The only time I have a window full-screen is when I'm watching a YouTube video of some sort, which is always lower priority than any notifications that come in. I would prefer to be interrupted by those notifications rather than missing them. Maybe that's just because I'm a workholic lol

If I really don't want any notifications at all, I'll quit apps that send them or turn on Do Not Disturb mode manually.
Comment 2 Oleksandr Popel 2020-09-29 15:38:23 UTC
So I've decided to look into it myself, but can't find the code responsible for showing notification over full-screen window if its type is Dialog::CriticalNotification.
I guess fixing this is as simple as adding an additional check there for a new option (like "Show normal notifications over full-screen windows" or something)? I could try to do that if somebody showed me the right direction. Although I have 0 experience in Plasma development, and only a bit more in C++ development so can't promise anything 😅
Comment 3 Nate Graham 2020-09-29 20:30:47 UTC
Try grepping for "keepCriticalAlwaysOnTop" in the plasma-workspace source code. You'll find some interesting things that you can use as a model.
Comment 4 Oleksandr Popel 2020-09-30 17:06:03 UTC
Yeah, I was able to find those interesting things before and they all come down to this ternary QML operation:

type: model.urgency === NotificationManager.Notifications.CriticalUrgency && notificationSettings.keepCriticalAlwaysOnTop ? PlasmaCore.Dialog.CriticalNotification : PlasmaCore.Dialog.Notification

It's just that my first instinct was to leave normal notifications' type as "PlasmaCore.Dialog.Notification" and implement the logic on a lower level (somewhere near "if this is a CriticalNotification - paint it on top" code). But I guess that's unnecessary and it's fine to just make the type of a normal notification be 'PlasmaCore.Dialog.CriticalNotification' if user wants to see it on top?
Comment 5 Nate Graham 2020-09-30 17:20:37 UTC
Yeah, that'll work, at least until we want to change the visual appearance of notifications based on their severity value, as per Bug 411314. :) However maybe we can cross that bridge when we come to it.
Comment 6 Oleksandr Popel 2020-09-30 22:03:29 UTC
Hmm, I just realized that there will be really annoying problem with such approach. As notification would be considered critical, it won't time out. This means that when I'm watching a video or a movie and receive a notification that I don't need to react to immediately, it won't go away by itself. I'll have to reach to my mouse and close it manually which is really inconvenient. Guess the fix won't be this simple :(
Comment 7 Nicolas Fella 2021-01-17 22:11:16 UTC
*** Bug 421594 has been marked as a duplicate of this bug. ***
Comment 8 Oleksandr Popel 2021-04-30 18:29:46 UTC
Git commit 6dc59a699895b34d8b0a8ca94923f6135f0e9e0a by Oleksandr Popel.
Committed on 30/04/2021 at 16:54.
Pushed by ngraham into branch 'master'.

Add a setting to keep normal notifications always on top

M  +2    -1    applets/notifications/package/contents/ui/global/Globals.qml
M  +3    -0    libnotificationmanager/kcfg/notificationsettings.kcfg
M  +14   -0    libnotificationmanager/settings.cpp
M  +7    -0    libnotificationmanager/settings.h

https://invent.kde.org/plasma/plasma-workspace/commit/6dc59a699895b34d8b0a8ca94923f6135f0e9e0a