GNOME Bugzilla – Bug 687724
Notification bubbles with long text are displayed partially off-screen
Last modified: 2014-10-30 01:47:17 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.
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.
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 :)
Created attachment 288083 [details] [review] [PATCH] Fix positioning notifications with long text I created a patch which fixes the problem.
(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?
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
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.
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.
(In reply to comment #6) > Done, attached an updated patch. Thanks!