Skip to content

notifications: enable DND when fullscreen app is focused

Kristen McWilliam requested to merge work/merritt/dnd-fullscreen into master

Reason for the change

Resolves #119.

There is currently a setting to allow normal-priority notifications to appear in full-screen windows, which doesn't actually affect the DND mode. This change replaces that setting with a more intuitive behavior: when a full-screen window is focused, DND mode is enabled, and when the focus is no longer on the full-screen window, DND mode is disabled.

  • Notifications appearing or not is less magic, and the user can easily understand why they are appearing or not.
  • DND mode is actually activated when inhibiting notifications, which allows the rest of the system to know that the user is busy with something, and apps can read the org.freedesktop.Notifications.Inhibited property to check the status of DND mode.

Test plan

  • Have a notifcation applet on the panel or desktop.
  • Open a full-screen window (e.g. a video player in full-screen mode) on a different monitor.
  • Toggle the focus between the full-screen window and other windows and/or toggle the full-screen mode of the window.
  • Verify that the notification applet shows DND mode is enabled when the full-screen window is focused, and DND mode is disabled when the focus is no longer on the full-screen window or the full-screen mode is disabled.

Screenshots or screen recordings

Before After
image image

Attemped to create a recording, but KWin is crashing on master if I attempt to screen record between two monitors.

Merge request reports

Loading