ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.3k stars 62 forks source link

[Bug] SwayNC is displayed above fullcreen windows despite `layer=top` #256

Closed cinghiopinghio closed 1 year ago

cinghiopinghio commented 1 year ago

Describe the bug As per the title, swaync notifications are displayed above fullscreen windows both in sway and hyprland.

To Reproduce

  1. set layer=top in the configuration file (reload config if necessary)
  2. get a window fullscreen
  3. send a notification
  4. bam

Expected behavior Notification is not displayed.

Please provide logs if you're experiencing notification errors / bugs Debug messaged of regular notification and notification over a fullscreen window do not change (except for the id).

Screenshots In the image, from a fullscreen terminal I send a notification that get displayed above the fullscreen terminal.

image

Desktop (please complete the following information):

ErikReider commented 1 year ago

Works as expected for me... Could you post your entire config? What's the initial output of swaync (displays config/css errors)?

ErikReider commented 1 year ago
  1. set layer=top in the configuration file (reload config if necessary)

Is this a typo? Should be in a JSON format

cinghiopinghio commented 1 year ago

Here you can find my config (that was a typo indeed):

{
    "$schema": "/etc/xdg/swaync/configSchema.json",
    "positionX": "right",
    "positionY": "top",
    "layer": "top",
    "cssPriority": "application",
    "control-center-margin-top": 0,
    "control-center-margin-bottom": 0,
    "control-center-margin-right": 0,
    "control-center-margin-left": 0,
    "notification-icon-size": 64,
    "notification-body-image-height": 100,
    "notification-body-image-width": 200,
    "timeout": 10,
    "timeout-low": 5,
    "timeout-critical": 0,
    "fit-to-screen": true,
    "control-center-width": 500,
    "control-center-height": 600,
    "notification-window-width": 500,
    "keyboard-shortcuts": true,
    "image-visibility": "when-available",
    "transition-time": 200,
    "hide-on-clear": false,
    "hide-on-action": true,
    "script-fail-notify": true,
    "widgets": [
        "inhibitors",
        "title",
        "dnd",
        "backlight",
        "volume",
        "mpris",
        "notifications"
    ],
    "widget-config": {
        "inhibitors": {
            "text": "Inhibitors",
            "button-text": "Clear All",
            "clear-all-button": true
        },
        "title": {
            "text": "Notifications",
            "clear-all-button": true,
            "button-text": "Clear All"
        },
        "dnd": {
            "text": "Do Not Disturb"
        },
        "label": {
            "max-lines": 5,
            "text": "Label Text"
        },
        "mpris": {
            "image-size": 96,
            "image-radius": 12
        },
        "backlight": {
            "label": "Brightness: ",
            "device": "intel_backlight",
            "min": 5
        },
        "volume": {
            "label": "Volume: "
        }
    }
}
ErikReider commented 1 year ago

What's the output of swaync? Run like this G_MESSAGES_DEBUG=all swaync

ErikReider commented 1 year ago

Oh wait! Are you referring to the notifications or the control center? The control center is the only one affected by the layer config option

cinghiopinghio commented 1 year ago

You are right. I'm referring to the notification itself, not the control center (as in the picture above).

ErikReider commented 1 year ago

I totally misunderstood your issue 😅

The PR should fix this bug and adds a control-center-layer option