After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687724 - Notification bubbles with long text are displayed partially off-screen
Notification bubbles with long text are displayed partially off-screen
Status: RESOLVED FIXED
Product: notification-daemon
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: notification-daemon-maint
notification-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-06 06:00 UTC by Balló György
Modified: 2014-10-30 01:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Fix positioning notifications with long text (6.36 KB, patch)
2014-10-08 22:05 UTC, Balló György
needs-work Details | Review
[PATCH] Fix positioning notifications with long text (v2) (4.92 KB, patch)
2014-10-30 01:42 UTC, Balló György
committed Details | Review

Description Balló György 2012-11-06 06:00:26 UTC
When a notification bubble contains long title or body, it positioned partially outside of the screen. This not happens with short text.

Tested on GNOME 3.6 fallback mode with the default Adwaita theme.
Comment 1 intrigeri 2014-06-07 17:28:17 UTC
Same here, both on Debian Wheezy (mostly GNOME 3.4) in fallback mode, and on current Debian sid (a mix of GNOME 3.8, 3.10 and 3.12).

In all cases, I see this message as soon as the notification gets displayed:

(notification-daemon:5179): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -23 and height 27

This is reproducible with:

  $ notify-send "title" "1234567890 1234567890 1234567890"

=> the notification text is not truncated, while:

  $ notify-send "title" "1234567890 1234567890 1234567890 1234567890"

=> the notification text is truncated after the last "6", that is, after the 39th character of the message body.

This has been reported in Debian as https://bugs.debian.org/684474 and https://bugs.debian.org/693837, the latter with screenshots attached.

Is there any more information that I can provide to help fix this bug, that causes usability issues (at least) in Debian and in Tails?

On sid, it gets worse, as notification-daemon simply crashes (#728157) later, when the notification disappears, but that's an entirely different problem, presumably.
Comment 2 intrigeri 2014-06-19 11:12:54 UTC
On current Debian sid (a mix of GNOME 3.8, 3.10 and 3.12):

  * I can reproduce this bug with MATE's notification-daemon running in a GNOME Flashback desktop environment;
  * I can reproduce this bug with GNOME's notification-daemon running in a MATE desktop environment;
  * I cannot reproduce it with mate-notification-daemon running in a MATE desktop environment.

I'm aware that MATE is a totally different project, but this seems to indicate perhaps there's some communication mismatch between GNOME (in flashback mode) and notification-daemon, e.g. about the screen resolution or something. Hoping it helps :)
Comment 3 Balló György 2014-10-08 22:05:23 UTC
Created attachment 288083 [details] [review]
[PATCH] Fix positioning notifications with long text

I created a patch which fixes the problem.
Comment 4 intrigeri 2014-10-09 11:08:42 UTC
(In reply to comment #3)
> I created a patch which fixes the problem.

Thanks! I've applied this patch on top of 0.7.6 and tested on current Debian unstable => I confirm this does fix the problem for me.

Any developer willing to review and merge?
Comment 5 Alberts Muktupāvels 2014-10-30 01:03:50 UTC
Review of attachment 288083 [details] [review]:

Please split this patch as two patches - one for fixing bug, one for fixing deprecated warning.

::: src/nd-stack.c
@@ +362,2 @@
                 if (bubble == NULL || nw2 != bubble) {
+                        gtk_widget_get_preferred_size (GTK_WIDGET (nw2), &minimum_size, &natural_size);

minimum_size is not used so no need to get it - use NULL.

@@ +432,3 @@
         int             x, y;
 
+        gtk_widget_get_preferred_size (GTK_WIDGET (bubble), &minimum_size, &natural_size);

same
Comment 6 Balló György 2014-10-30 01:42:13 UTC
Created attachment 289619 [details] [review]
[PATCH] Fix positioning notifications with long text (v2)

> Please split this patch as two patches - one for fixing bug, one for fixing
deprecated warning.

I can't split this patch, because both parts are needed for fixing this bug. Without the second part, the notification bubble is displayed outside of the screen.

> minimum_size is not used so no need to get it - use NULL.

Done, attached an updated patch.
Comment 7 Alberts Muktupāvels 2014-10-30 01:46:38 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 8 Alberts Muktupāvels 2014-10-30 01:47:17 UTC
(In reply to comment #6)
> Done, attached an updated patch.

Thanks!