! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Notification bubbles have a black background when the compositor is off
Status:
RESOLVED: FIXED
Product:
Xfce4-notifyd
Component:
general

Comments

Description Abonnementspaul 2020-03-22 15:31:51 CET
Created attachment 9627 
you can see the unwanted black background on the bottom notification

I just installed Manjaro Linux XFCE on my machine, and turned off the compositor.

Now whenever I have a notification, the background is black outside the rounded borders, until I hover over the notification bubble.

On the attached screenshot, you can see I hovered over the top notification, but not the bottom one.

Info:

Linux myname-pc 5.4.24-1-MANJARO #1 SMP PREEMPT Thu Mar 5 20:29:25 UTC 2020 x86_64 GNU/Linux
Comment 1 Olivier Fourdan editbugs 2020-03-23 14:35:13 CET
Nothing the compositor can do, what shows black is the transparent area, because the compositor is turned off.

Usually, applications can chose an ARGB window or a plain window based on the presence of the compositor at start up, so my advice is, start your session with compositor off if thats what you want.

That's not a bug in the compositor.
Comment 2 Abonnementspaul 2020-03-23 14:56:43 CET
Thank you for your reply. I understand that is not a bug in the compositor.

But how is this not "fixable"? The first draw call fills the background with black, but the second one on hover manages to use the alpha channel. Wouldn't triggering a draw call like the hover one after the notification creation fix this?

I know it's a very minor issue so if you have other priorities just let go.

Also, can you do me a favor? Do you have any idea where the notification bubble drawing occurs in the codebase so I can have a look for myself?

Thank you very much for according some time to this minor detail
Comment 3 Olivier Fourdan editbugs 2020-03-23 15:14:18 CET
That would be xfce4-notifyd (https://git.xfce.org/apps/xfce4-notifyd/tree/)

But again, many applications, including gtk's own client side decorations are completely unable to handle the compositor going off while running (because you just cannot turn off the compositor on the fly in gnome-shell/mutter), so you're gonna run into a lot more breakage than just the rounded corners in notification popups...

If you turn the compositor off, you'd better restart most of the applications as well, i.e. your entire session.
Comment 4 Abonnementspaul 2020-03-23 15:52:27 CET
Sorry if I was unclear, but my compositor is always turned off, from my session login, and has always been!

As far as I know it's not an issue with "handle the compositor going off while running" as you said.

The notifications bubbles seem to have access to alpha channel even without it, or find a way to have seamless rounded borders. At least after being hovered.

Also, thank you, I'm going to take a quick look!
Comment 5 Olivier Fourdan editbugs 2020-03-23 15:54:43 CET
Right, so it's a bug in the notification daemon then.
Comment 6 Simon Steinbeiss editbugs 2020-03-23 21:36:00 CET
Could you please specify the version and theme of xfce4-notifyd you're using?
Comment 7 Abonnementspaul 2020-03-23 21:59:16 CET
I'm using XFCE 4.14.1-2.1

I'm using the Vertex-Maia theme from the Manjaro repository

The notification theme name is "Bright" in the notification settings.

In case that's not enough, I found this CSS, I'm not sure I know how to format text here, sorry..

$ cat /usr/share/themes/Bright/xfce-notify-4.0/gtk.css 
#XfceNotifyWindow {
    background-color: #f2f1f1;
    border-radius: 10px;
    border: 1px solid #686868;
    padding: 20px;
}

#XfceNotifyWindow:hover {
    background-color: shade(#f2f1f1, 0.98);
}

#XfceNotifyWindow label,
#XfceNotifyWindow image {
    color: #686868;
}

#XfceNotifyWindow label#summary {
    font-weight: Bold;
}

#XfceNotifyWindow button {
    font-weight: Bold;
    border: 1px solid shade(#686868, 1.15);
    box-shadow: none;
    background-image: none;
    background-color: #f2f1f1;
    color: #686868;
}

#XfceNotifyWindow button:hover {
    box-shadow: none;
    background-image: none;
    background-color: #e4e4e4;
    color: #686868;
}

#XfceNotifyWindow progressbar {
    min-height: 10px;
    border-radius: 3px;
}

#XfceNotifyWindow progressbar progress {
    background-image: none;
    background-color: shade (#ddd, 0.65);
    border: 1px solid shade (#ddd, 0.55);
}

#XfceNotifyWindow progressbar trough {
    background-image: linear-gradient(to bottom,
                                      shade(#ddd, 0.98),
                                      shade(#ddd, 1.25)
                                      );
    border: 1px solid shade(#ddd, 0.8);
    border-radius: 3px;
}

Do you need anything else?

I really appreciate your help, thanks
Comment 8 Simon Steinbeiss editbugs 2020-03-23 23:21:24 CET
I need the actual version of xfce4-notifyd - you can retrieve it e.g. with "xfce4-notifyd-config --version"
Comment 9 Abonnementspaul 2020-03-24 11:16:29 CET
$ xfce4-notifyd-config --version
xfce4-notifyd-config 0.4.4
Copyright (c) 2010 Brian Tarricone <bjt23@cornell.edu>
Copyright (c) 2010 Jérôme Guelfucci <jeromeg@xfce.org>
Copyright (c) 2016 Ali Abdallah <ali@xfce.org>
Copyright (c) 2016 Simon Steinbeiß <simon@xfce.org>
Publié sous les termes de la GNU General Public License, version 2
Merci de signaler les bogues à https://bugzilla.xfce.org/enter_bug.cgi?product=Xfce4-notifyd.
Comment 10 Simon Steinbeiss editbugs 2020-04-01 00:50:55 CEST
Actually the window not having rounded corners and alpha transparency is expected, I can reproduce that part also with git master.
What is still a little mysterious to me is why it would render "correctly" after hovering and that part I cannot reproduce.

In theory I could disable the rounded corners in the code if compositing is not available...
Comment 11 Abonnementspaul 2020-04-01 02:40:02 CEST
In my opinion finding out why the alpha works and using that would be the best solution, but I get you, it would be faster/easier to just force square-shaped bubbles. I'm not sure that would be a good compromise though, as I don't think the current default themes would look great with that. If you go that way, I would love to see a theme or variant of theme designed around the square shape. Microsoft got away very well with that with their "square" flat design for example.

Please let me know what you think or if there is significant progress on that, I want to get rid of my "hovering the notifications as they pop up" reflex!

Thank you again
Comment 12 Simon Steinbeiss editbugs 2020-04-01 07:43:36 CEST
Just out of curiosity - is there a specific reason to keep the compositor disabled in 2020?
Comment 13 Abonnementspaul 2020-04-01 11:54:24 CEST
I'm running XFCE on my 2016 Intel HD grahics-powered laptop and occasionaly play some "easy to run" games, and most of the time I can feel input lag and such when the compositor is on. I don't play so much anymore but now I'm used to having all the fancy stuff disabled.

I know I could re-enable it and uncheck every effect, but hey, you guys left disabling the compositor as an option, so I guess that's a "feature" you're willing to maintain!
Comment 14 Git Bot editbugs 2020-04-08 00:40:12 CEST
Simon Steinbeiss referenced this bugreport in commit cf77f20fb3885a692760deea3783868230dc6dd5

Disable rounded corners w/o compositing (Bug #16586)

https://git.xfce.org/apps/xfce4-notifyd/commit?id=cf77f20fb3885a692760deea3783868230dc6dd5
Comment 15 Simon Steinbeiss editbugs 2020-04-08 00:40:56 CEST
Rounded corners are now disabled without compositing, so no more screen artifacts. If you want rounded corners and transparency you will have to enable compositing.
Comment 16 Abonnementspaul 2020-04-08 15:36:38 CEST
Seems fair, I'll give you an update as soon as the changes reach my PC.
Comment 17 David Rosenstrauch 2020-04-09 16:51:25 CEST
Just upgraded to xfce4-notifyd 0.6.0 yesterday, and the new square notification windows are U G L Y !  :-(
Comment 18 David Rosenstrauch 2020-04-09 17:22:30 CEST
Would be nice if rounded corners were at least an option, rather than disabled altogether.  I've never noticed the black corners reported here.  And even if I did, I'd much prefer that to rectangular notification windows.
Comment 19 Simon Steinbeiss editbugs 2020-04-11 11:02:24 CEST
Please enable the compositor if you want rounded corners and translucency.
Comment 20 Abonnementspaul 2020-04-14 14:27:39 CEST
Hi again, I just installed the latest version, and that's exactly what I expected.
Though there are two very little details I'd adjust but it's ridiculously small and unimportant.

* The hover effect doesn't seem to change the background color anymore.
* The window is rounded but the button has a 1px border radius, it's it's mixing straight 90° edges and softened ones. That's very minor but UI wise it's not too consistent. I guess you did this because the style is defined in a CSS file and you can't make the difference between composited rounded borders and non-composited square ones with only CSS. Do you think adding a CSS class like ".no-composition" to the notification window only when composition is disabled is doable, and would add room for improvement? Doing that, I think you could customize other UI elements, as well as give a solution to David R. from above, allowing him the option to round the window with CSS.

Thank you!
Comment 21 Simon Steinbeiss editbugs 2020-04-14 22:11:15 CEST
> * The hover effect doesn't seem to change the background color anymore.
The hover effect was visible on translucent notifications, so this feature requires compositing (basically the translucency goes away when hovering so you can read the notification well).

> The window is rounded but the button has a 1px border radius, it's it's mixing straight 90° edges and softened ones.
I'm not sure I get that - screenshot?

> Do you think adding a CSS class like ".no-composition" to the notification window only when composition is disabled is doable
It's possible, not sure if people will adapt their themes. After all there are very few themes specifically for xfce4-notifyd (at least that I know of).

> Doing that, I think you could customize other UI elements, as well as give a solution to David R. from above, allowing him the option to round the window with CSS.
No, for properly rounded corners in windows you need alpha transparency, so compositing. (Or you use something like the XShape Extension, but let's not go there...)
Comment 22 Abonnementspaul 2020-04-15 01:27:59 CEST
Here is a screenshot of what I get: https://i.imgur.com/OOWw4Dp.png. It's hardly noticeable, but I noticed it and unfortunately I'm this kind of person getting OCD on these 1px misplacements. Anyway allowing CSS style fallbacks with a simple class selector when composition is disabled would be neat in my opinion, if that doesn't break anything else of course.

Also I understood that alpha is not available, it's just that David said he didn't mind the glitched borders.
I spotted a regression with the feedback indicating the bubble is clickable when hovering over it. The following theme works as intended in 0.4.4, but the hover on main window doesn't on 0.6.

#XfceNotifyWindow {
    background-color: blue;
    background-image: none;
}

#XfceNotifyWindow:hover {
    background-color: red;
}

#XfceNotifyWindow button {
    background-image: none;
    background-color: green;
}

#XfceNotifyWindow button:hover {
    background-color: lime;
}
Comment 23 Simon Steinbeiss editbugs 2020-04-15 02:09:56 CEST
The button can be rounded despite the window itself not being rounded. That's really up to the theme I'd say.

Also, the hover effect on the button still works without compositing.
Comment 24 Abonnementspaul 2020-04-15 02:26:55 CEST
Alright then, since a square window is now default when composition is disabled, do you think adding a default "out of the box" theme with blocky shapes would be a nice addition for folks disabling composition?

For the regression, I am referring to the window itself, not the button. The button works perfectly fine.
This part doesn't work in the latest version, when it did with 0.4.4. I tested it myslef compiling from source.

#XfceNotifyWindow {
    background-color: blue;
    background-image: none;
}

#XfceNotifyWindow:hover {
    background-color: red;
}
Comment 25 Abonnementspaul 2020-04-15 14:54:24 CEST
Hi again, since I had a bit of free time, I fixed the issue myself, to make it behave just like it used to.
Since there are no pull request systems, I made a gist with the updated file.
Please tell me what you think

https://gist.github.com/PaulCombal/724ccdaf6f353fa281a9b02460458c28#file-xfce-prelight-fix-c-L370
Comment 26 Simon Steinbeiss editbugs 2020-04-16 23:43:34 CEST
Looks plausible.
Would you mind saving me some time and doing a diff or better yet a git patch (git format-patch)?
Comment 27 Abonnementspaul 2020-04-17 00:03:47 CEST
Created attachment 9734 
patch for the prelight effect
Comment 28 Abonnementspaul 2020-04-17 00:04:51 CEST
Did I do this correctly?
Comment 29 Git Bot editbugs 2020-04-17 01:34:32 CEST
Simon Steinbeiss referenced this bugreport in commit 5e7d2615fb5aeafaddf857d28e807a8d417eb3c6

Fix hover effect without compositing (Bug #16586)

https://git.xfce.org/apps/xfce4-notifyd/commit?id=5e7d2615fb5aeafaddf857d28e807a8d417eb3c6
Comment 30 Simon Steinbeiss editbugs 2020-04-17 01:35:12 CEST
Thanks, pushed your fix (with some indentation fixes).

(If you provide an actual git patch it's easier to retain the author attribution.)

Bug #16586

Reported by:
Abonnementspaul
Reported on: 2020-03-22
Last modified on: 2020-04-17

People

Assignee:
Simon Steinbeiss
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information