Notification bubble shows sometimes wide, sometimes narrow

Bug #45656 reported by Ricardo Pérez López
14
Affects Status Importance Assigned to Milestone
notification-daemon (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-notifier

I did a «sudo apt-get update» in a terminal, and the notification icon appeared, with the notification bubble telling me that there's updates available.

But the notification bubble appeared too much narrow, as you can see in the screenshot.

Then I log out and log in again, and now the notification bubble appears wide, as usual.

It's the second time I see that problem today. It seems a problem in the notification bubble code.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Incorrect notification bubble

This notification bubble appears too much narrow.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Correct notification bubble

This notification bubble has correct dimensions. It appeared when I logged out and then logged in again.

Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote :

I have a similar problem with Rhythmbox song notifications.
The bubble is often ugly, looking a lot too squarrish than it could/should (used to) be. It looks a bit crap. I don't recall having this problem in the past, must have started a couple weeks ago max.

Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote : Bubble is a big square instead of a wide rectangle

Example of a mis-proportionned notification bubble

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Another user has the same problem.

Changed in update-notifier:
status: Unconfirmed → Confirmed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Is it therefore an update-notifier bug? Since Rhythmbox has the same problem, too, I think the problem must be in the generic notification bubble code, but I don't know what package is responsible of it.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Mmm... after some investigation it seems that the problem is in the notification-daemon package. If you see the changelog:

notification-daemon (0.3.4-0ubuntu6) dapper; urgency=low

  * debian/patches/01_ubuntu_theme.diff:
    - fix the in height caclulation for the body (ubuntu: #40379)

Maybe the problem is in the above patch (maybe).

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Reassigning to notification-daemon.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Yet another notification bubble with wrong dimensions

This is the notification bubble that appeared last night. It has different dimensions than the other two.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

My latest notification-daemon upload fixed this problem for me. Please confirm after installing the new package and restarting the notification daemon if it works for you as well.

Thanks,
 Michael

Changed in notification-daemon:
assignee: nobody → mvo
status: Confirmed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Sorry: the problem is still here, even worse.

I installed the new version, and rebooted the system. Now, update-notifier's bubble has practically the same (wrong) dimensions as before, and the "low disk space" notification has now poor dimensions.

I attach screenshots.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : update-notifier's bubble

The same wrong dimensions as before.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : "low disk space" notification bubble: wrong dimension now (it was correct before)

Now, the "low disk space" notification bubble is narrower than before.

Before this update, all the text was in the same line. Now, it shows in two lines, and there's almost no space (the second line is almost not readable).

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Change status to "In Progress" meanwhile.

Changed in notification-daemon:
status: Fix Released → In Progress
Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote :

> My latest notification-daemon upload fixed this problem for me.

Yes, it seems to be fixed it for me as well. I played 100 different songs to test it, and all of them had a "good looking" bubble :-)

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I, instead, prefer the previous version. The "low disk space" bubble was better, at least.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Another notification bubble with wrong dimensions

This time, the bubble has the correct width, but its too tall.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Yet another wrong notification bubble

This is the notification bubble that appears when you upgrades firefox, asking you to restart the browser.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Changed from "In Progress" to "Confirmed", because I can't see any progress since the bugreport was send.

Changed in notification-daemon:
status: In Progress → Confirmed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I've solved the bug changing the notification-daemon-0.3.4/debian/patches/01_ubuntu_theme.diff file, replacing

+#define WIDTH 300

by

+#define WIDTH 500

After rebuilding and reinstalling the new package, the notification bubbles appears always perfectly, both the update-notifier's bubble and the "low disk space"'s bubble.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Patch for correct the width in the notification bubble

This patch is very simple, and works perfectly for me. Now, all the notification bubbles appears with the correct width.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Correct bubble after applying the patch

Now, all the text are in the same line, and is perfectly readable.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : update-notifier's bubble after applying the patch

This bubble also appears great with the patched notification-daemon.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

There's another possible patch in notification-daemon-0.3.4/debian/patches/01_ubuntu_theme.diff: leave the

+#define WIDTH 300

line untouched, and replace the line #487 with the following content:

+ gtk_widget_set_size_request(((body != NULL && *body == '\0') ? windata->body_label : windata->summary_label),

After some experiments, I can confirm that this patch works well with both update-notifier & "low disk space" bubbles, and moreover, does the rhythmbox's box renders better (the first patch do the bubble too much wide, IMO).

Revision history for this message
Ricardo Pérez López (ricardo) wrote : New version of "correct_width.patch"

Actually, the code for this patch is in the proper upstream code. It works better for me, in general, than the actual notification-daemon version, or even the first "correct_width" patch.

Revision history for this message
Michael Vogt (mvo) wrote : debdiff for the fix

debdiff for the fix

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Michael, can this patch be applied and inserted into the package before Dapper release?

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks, just talked to mdz and it will have to go into -updates.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Thanks to you. It's a pity not to get it into dapper... it's a rather simple, non intrusive, patch :(

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

By the way... when will the patch go into dapper-updates? In other words, when will dapper-updates be opened? One day after dapper release? Maybe one week?

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Hi, Michael!

dapper-updates was opened several days ago. Will this patch be inserted into -updates soon?

Thanks a lot, and sorry if I'm annoying.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

After a deep investigation and many many experiments, my conclusion is that the actual version (without my patch) seems to work well, with only one exception: the bottom-right notification that appears the first in a session shows misplaced (too down in the screen). However, subsequent notifications appears correctly.

Therefore, it seems that the problem is not in the width or height calculation, but in the Y position the first time the library needs to show a notification.

The notifications that appears in the top of the screen (update-notifier or rhythmbox) don't seem to have this problem.

I attach screenshots to illustrate the problem.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : update-notifier's bubble, shows ok without my patch

As you can see, the update-notifier's bubble appears ok without the need of my patch (at least in the last experiments I did).

Revision history for this message
Ricardo Pérez López (ricardo) wrote : The first notify of the session appears misplaced

Immediatly after the login, I type:

$ notify-send -t 0 "Poco espacio en disco" "Se está usando el 95% del espacio de disco en «/»"

and, as you can see, the bubble appears too down. The second line of text touch the bottom of the screen. However, the bubble dimensions are ok.

I would like to remember that this is the actual behavior, with the actual version, not with my patch.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Screenshot after a second "notify-send" execution

However, if I run

$ notify-send -t 0 "Poco espacio en disco" "Se está usando el 95% del espacio de disco en «/»"

again, in the same session, a second bubble appears over the first, and the first is re-arranged, so now appears ok and you can see the whole bubble perfectly.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Screenshot after closing all the bottom bubbles and executing a third "notify-send"

Since then, all the bubbles appears ok. I close both bottom bubbles, and retype the same notify-send command line, and now the bubble appears ok.

I don't know exactly where is the problem. It seems an issue in the Y calculation, or maybe, an issue in the height calculation, but curiously the problem only appears in the first notification bubble.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I've realized that the bubble shows with wrong dimensions when the tray icon area (the area where the notification icon appears) has more icons than usual.

For example, in this screenshot I show my desktop with the following applications opened: aMSN, X-Chat, aMule. Their respective icons appears on the tray icon area.

The notification icon appears to the left of the aMSN icon, and the bubble has wrong dimensions (too much taller and narrower).

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

However, if you apply the patch I did before [1] on 2006-05-28, the bubble shows with correct dimensions even in that case (many icons in the tray icon area). Here's an screenshot that shows it. It's the same case as above, after applying the patch and restarting the notification-daemon.

Notification-daemon, therefore, seems to have a better behavior in some cases when you apply the patch, although it does not yet resolve the issue I told in comment #34 and in bug #56581, which could require a deeper hack.

Michael, this patch was proposed to be introduced into dapper-updates (according to the DapperReleaseRadar [2], "Post-release updates" section), but that never was done. Will this be done during Dapper lifecycle?

Another possibility could be to introduce the patch into Edgy looking for feedback from the Edgy users, testers and developers.

[1] http://librarian.launchpad.net/2966376/correct_width_v2.patch

[2] https://wiki.ubuntu.com/DapperReleaseRadar

Revision history for this message
Sebastien Bacher (seb128) wrote :

Sorry for the lack of reply on that, somebody will comment on that soon

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your detailed analysis and sorry for the terrrible long delay. If we meet in real-life I owe you a beer for this. I uploaded your fix to dapper-updates and it will go in once a archive-admin looked over it.

Thanks,
 Michael

Changed in notification-daemon:
status: Confirmed → Fix Committed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Oh, thank you very much, Michael :) Although the beer is not necessary ;) I only want to help.

Thanks again.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks :) The good thing is that I have taken the opportunity to fix the badly shaped notifications finally in my tree as well (when the notifcation has a arrow that points downwards it looks a bit ugly currently).

Cheers,
 Michael

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Hi.

The update is not in dapper-updates yet. Is it normal, or maybe there's a problem with the upload process?

Thanks.

Revision history for this message
Michael Vogt (mvo) wrote :

Unfortunately there is a long backlog of updates and the review process is not as fast as we would like. Sorry for this.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Oh, great. Don't worry. Thanks again :)

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

I have question about the notifier and it seems i am right here.

I had an update where afterwards the bubble asking for an reboot apears, but it is broken i think.

The bubble is broken erverytime when it pops up the first time after login (see screenie).
If i
$ killall update-notifier
then the bubble is ok.

First i thought it needs some time to seddle down after login, but it seems it has to pop up _once_ and only after that it will help to:
$ killall update-notifier && update-notifier

my question does the patch fix this, too?

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

maybe it is important:
i get used to an Xfce style of panels, which means the default upper panel is at the bottom here and the other way round.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Michael, I'm trying Edgy now, and I realized that the "reboot" bubble doesn't render the title correctly.

As you can see in the screenshot, all the words of the title ("Se requiere reiniciar el sistema", in Spanish) must be in the same line (there's enough space), but however the word "sistema" (the last word of the title) appears in another line, below the other words of the title.

Revision history for this message
Sebastien Bacher (seb128) wrote :

That new comment seems to be a different issue. Maybe better to open a different bug than abusing an already lonf one for it

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Yes, you are right, Sebastien. I've created the bug #62586 for that. Thanks a lot.

Revision history for this message
Martin Pitt (pitti) wrote :

 notification-daemon (0.3.4-0ubuntu9) dapper-updates; urgency=low
 .
   * debian/patches/01_ubuntu_theme.diff:
     - set the minimum width for the labels not the content_hbox
       (ubuntu #45656)

I rejected this old upload, since it hasn't gone through the usual SRU process, and TBH this bug does not really warrant an SRU. But if you think it is appropriate, please start the SRU process.

Also, please fix this in Feisty first (it's still not 'fix released')

Changed in notification-daemon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.