Indicator menus are too short and scroll when opened from screen bottom

Bug #965953 reported by Lucazade
160
This bug affects 30 people
Affects Status Importance Assigned to Milestone
GTK+
Expired
Medium
Indicator Applet
Invalid
Low
Unassigned
gnome-panel (Ubuntu)
Invalid
Low
Unassigned

Bug Description

The indicator applet, installed by default in classic session of Precise, appears with just some up and down scroll arrows, and I have to scroll down before it fills in and shows the 3 items, and then the scroll arrows disappear.

Is it possible to fix this annoying behaviour?

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-panel 1:3.4.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
Date: Tue Mar 27 08:39:06 2012
SourcePackage: gnome-panel
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lucazade (lucazade) wrote :
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Does this bug occur when the panel is at the top?

Revision history for this message
Lucazade (lucazade) wrote :

It occurs only when the panel is placed at the bottom.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Seems more of an issue with the panel then.

Changed in gnome-panel (Ubuntu):
status: New → Confirmed
Changed in indicator-applet:
status: New → Confirmed
importance: Undecided → Low
Changed in gnome-panel (Ubuntu):
importance: Undecided → Low
Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

This is not light-themes fault, I've seen this behavior since my first days with Ubuntu (9.04 then) so this is really an ancient bug since GTK+2. You can also see this behavior with other menus placed at bottom of screen, such as the theme selector combobox in Appearance panel of Control Center.

affects: light-themes → gtk
Revision history for this message
Sebastien Bacher (seb128) wrote :

that's not a bug in gtk, rather in gnome-panel or the applet overwriting the menu position to align it to the border of the panel and doing it in a buggy way at the bottom of the screen

Changed in gtk:
status: New → Invalid
Revision history for this message
Lucazade (lucazade) wrote :

I would say it is an indicator-applet bug because the same issue is present in the xfce4-panel indicator when it is placed on the bottom.
It is easily reproducible in the network indicator when it populates the wifi networks available, the list is updated but the menu container is not and it show arrows to expand it.

Revision history for this message
Alex Cabal (acabal) wrote :

This seems to have gotten worse on 12.04 using Gnome Classic. I have my indicators on the bottom-right. Before, if the indicator menu had to change size (for example a new wireless network was detected while the indicator was open), it wouldn't resize right, but it would show scroll arrows at the top/bottom. Clicking the arrows would force the indicator menu to resize itself correctly.

However in 12.04 those arrows don't work any more. My Dropbox indicator menu is now completely invisible because it didn't resize right and the arrows don't work; I can't click on Banshee in the sound menu because it resized with the volume on top but the Banshee controls below the panel.

Very annoying in < 12.04, unusable in >= 12.04

Revision history for this message
Jiahua Huang (huangjiahua) wrote :

Thers is a patch:

diff --git indicator-applet/src/applet-main.c indicator-applet/src/applet-main.c
--- indicator-applet/src/applet-main.c
+++ indicator-applet/src/applet-main.c
@@ -362,6 +362,21 @@ accessible_desc_update (IndicatorObject
   return;
 }

+static gboolean
+do_menu_reposition(gpointer menu)
+{
+ gtk_widget_set_size_request(menu, -1, -1);
+ g_timeout_add(20, gtk_menu_reposition, menu);
+ return 0;
+}
+
+static void
+on_menuitem_show (GtkMenuItem *menuitem, gpointer menu)
+{
+ gtk_widget_set_size_request(menu, -1, 350);
+ g_idle_add(do_menu_reposition, menu);
+}
+
 static void
 entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * menubar)
 {
@@ -435,6 +450,7 @@ entry_added (IndicatorObject * io, Indic

   if (entry->menu != NULL) {
     gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entry->menu));
+ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(on_menuitem_show), entry->menu);
   }

   place_in_menu(menubar, menuitem, io, entry);

Revision history for this message
Jiahua Huang (huangjiahua) wrote :

I'm sorry for my negligence,
this is the patch:

diff --git indicator-applet/src/applet-main.c indicator-applet/src/applet-main.c
--- indicator-applet/src/applet-main.c
+++ indicator-applet/src/applet-main.c
@@ -362,6 +362,21 @@ accessible_desc_update (IndicatorObject
   return;
 }

+static gboolean
+do_menu_reposition(gpointer menu)
+{
+ gtk_widget_set_size_request(menu, -1, -1);
+ g_timeout_add(20, (GSourceFunc) gtk_menu_reposition, (gpointer) menu);
+ return 0;
+}
+
+static void
+on_menuitem_show (GtkMenuItem *menuitem, gpointer menu)
+{
+ gtk_widget_set_size_request(menu, -1, 350);
+ g_idle_add((GSourceFunc) do_menu_reposition, (gpointer) menu);
+}
+
 static void
 entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * menubar)
 {
@@ -435,6 +450,7 @@ entry_added (IndicatorObject * io, Indic

   if (entry->menu != NULL) {
     gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entry->menu));
+ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(on_menuitem_show), entry->menu);
   }

   place_in_menu(menubar, menuitem, io, entry);

Revision history for this message
Alex Cabal (acabal) wrote :

#9 That's awesome! Can you give instructions on how to compile so I can help testing? If it works would it be possible to get this patch in to an SRU?

Revision history for this message
MikeR (mike-rechtman) wrote :

1. I see this happening in the top panel, also (Ubuntu Precise. updated this morning)
2. When (if) will there be a downloadable update of the Indicator-applet? (preferably via a supported repository)

Thanks,
Mike

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix scroll arrows of menu" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Jiahua Huang (huangjiahua) wrote : Re: indicator applet with scroll arrows

Hi, Alex,
it can use these commands to apply the patch::

    cd /tmp
    apt-get build-dep indicator-applet
    apt-get source indicator-applet
    wget https://raw.github.com/gist/2760441/indicator-applet-scroll-arrows.patch
    cd indicator-applet-0.5.0
    patch -p1 < ../indicator-applet-scroll-arrows.patch
    time dpkg-buildpackage -rfakeroot
    cd ..
    sudo dpkg -i indicator-applet*.deb

Revision history for this message
Alex Cabal (acabal) wrote :

Thanks Jiahua, I was able to test it out with your instructions. It looks like your patch fixes the problem, thanks!

However there's a slight issue: with the patch applied, when you open an indicator, the menu flickers near the top of the screen for a split second before aligning back down to the bottom where it should be. (Or perhaps the menu opens up to double-size and the instantly shrinks back to normal size, it goes so fast it's hard to tell.)

This doesn't seem to affect usability, but it's very noticeable and detracts a bit from the smoothness of the UI. Is there anything that can be done for that?

Revision history for this message
Alex Cabal (acabal) wrote :

After messing around with the patch some more, the issue I mentioned above seems to be that the menu is being generated super-tall, then shrunk back to size almost instantly. I somehow managed to get the super-tall menu to stay open for both the Dropbox and Battery indicators. Not as huge an issue as completely unusable indicators (like before Jiahua's patch) but still a very noticeable UX issue.

Revision history for this message
Jiahua Huang (huangjiahua) wrote :

Hi Alex,
yes, it use a reserved menu height to fix this bug, so...

Hi Mike,
there are some indicator-applet debs in this attachment.

summary: - indicator applet with scroll arrows
+ Indicator menus are too short and scroll when opened from screen bottom
Revision history for this message
ionospheric (berthold1) wrote :

The patch fixed the problem with the menus being too small for me. I also have the brief flicker with the menu popping up maximized at first, but I can live with that. Thanks for the fix. I am sure as upgrade will fix the flicker, too eventually.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Please submit a merge proposal against lp:indicator-applet if you want to get this patch reviewed/applied. Thanks.

Changed in gnome-panel (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Iain Lane (laney) wrote :

Thanks for the patch - I'm not sure about it though; it seems odd to me to call gtk_widget_set_size_request() twice, once after an idle delay. Can you help us to understand what you're trying to achieve here?

I'm subscribing Ted (an indicator-applet developer) in case he can think of a fix for this bug quickly.

However, I can't make the described issue happen myself. Can someone give more detailed steps to reproduce it?

Changed in indicator-applet:
status: Confirmed → Incomplete
Revision history for this message
Alex Cabal (acabal) wrote :

It shouldn't be hard to reproduce, I noticed it immediately after upgrading. Just use the gnome classic session, add a bottom panel, and set the indicator applet on the bottom panel in Precise. The WiFi indicator is the easiest to reproduce the issue as it updates frequently. Sound indicator is another example, when it changes tracks. Try scrubbing left and right across the indicators. The patch above is a sort of fix, but it adds a new bug where frequently instead of being too small, the indicator menus become massive and reach nearly to the top of the screen. I've been living with this bug for a long time as a bottom panel user of Precise :/

Changed in indicator-applet:
status: Incomplete → Confirmed
Revision history for this message
Sebastian Geiger (lanoxx) wrote :

@Ian Lane:

The issue happens only when the panel is at the bottom, not at the top. The issue also most frequently happens with Skype, but also sometimes with other applets such as network-manager or dropbox. It appears particularly after the menuitems in the menu change, such as when a new Wireless network has been detected or the network adaper looses/gains a connection. Try pulling the network cabel from your notebook and the network-manager menu will collapse to 0px height. After that only a restart of the applet can fix the issue.

Revision history for this message
Sebastian Geiger (lanoxx) wrote :

I have been inserting debugging in formation and here is a trace that I am getting when I click on the Skype entry in the indicator applet. For some reason, whenever the items in a menu change, then all items of the menu are removed and then inserted again. For Skype this seems to happen every single time I open the menu. When I open other menu items such as bluetooth or Ubuntu One, then the entries are not removed and inserted. But the menu simply opens. However I can reproduce the same phenomen with network-manager. When I open the menu and then pull the network cable I can see how all items get removed and then re-inserted.

Indicator-Applet-Message: button_press_event cb: entry_secondary_activated
Indicator-Applet-Message: size_allocate: New height: 356
Indicator-Applet-Message: entry-activated cb: entry_activated
Indicator-Applet-Message: size_allocate: New height: 356
Indicator-Applet-Message: menu_entry_remove: menu_shell: 0xd4d0c0; child: 0xfb22d0
[ ... 19 repeating entries truncated ... ]
Indicator-Applet-Message: size_allocate: New height: 0
Indicator-Applet-Message: menu_entry_insert: menu_shell: 0xd4d0c0; child: 0xfc82d0
[ ... 15 repeating entries truncated ... ]

(indicator-applet:6978): Gtk-CRITICAL **: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(indicator-applet:6978): Gtk-CRITICAL **: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
Indicator-Applet-Message: menu_entry_insert: menu_shell: 0xd4d0c0; child: 0xfb25f0
Indicator-Applet-Message: menu_entry_insert: menu_shell: 0xd4d0c0; child: 0xfb2460
Indicator-Applet-Message: menu_entry_insert: menu_shell: 0xd4d0c0; child: 0xf9e8f0
Indicator-Applet-Message: menu_entry_insert: menu_shell: 0xd4d0c0; child: 0xfb22d0

(indicator-applet:6978): Gtk-CRITICAL **: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(indicator-applet:6978): Gtk-CRITICAL **: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
Indicator-Applet-Message: menu_entry_insert: menu_shell: 0xd4d0c0; child: 0xffc790
Indicator-Applet-Message: size_allocate: New height: 378
Indicator-Applet-Message: size_allocate: New height: 378

From the trace I can see there are 20 items removed from the Skype menu, but 21 added. This explains the 22px size difference between the first and last size_allocate call. I have not measured this, but it seems the menu is painted with a height of 356px while at the end it has 378px thus requiring scrolling.

Note that the menu is a member of 'IndicatorObjectEntry' (from libindicator) and indicator-applet has no control over adding or removing entries.

Revision history for this message
Sebastian Geiger (lanoxx) wrote :

I was able to reproduce this bug in a pure gtk+ application, and have reported a bug to gtk+:

https://bugzilla.gnome.org/show_bug.cgi?id=726030

Revision history for this message
Sebastian Geiger (lanoxx) wrote :

I seems very likely that this bug is actually in gtk+. I am setting this bug to new, when the attached bug is confirmed, then the watch bot should automatically update this to confirmed.

Changed in gtk:
importance: Undecided → Unknown
status: Invalid → Unknown
Changed in indicator-applet:
status: Confirmed → Invalid
Changed in gtk:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Martin Spacek (mspacek) wrote :

I've had this problem for years. Currently, I'm using Xubuntu 14.04 with my panel located at the bottom edge of the screen. I see this most often with nm-applet, skype, and sometimes the sound applet. Really annoying! Thanks Lannoxx for opening a bug at GTK+'s bugzilla, and submitting the patch.

Revision history for this message
Vlad Orlov (monsta) wrote :

Unfortunately, as stated in the upstream bug's comments, the patch causes a regression...

Revision history for this message
baptx (b4ptx) wrote :

I'm using Xubuntu with the panel at the bottom of the screen and I have fixed the scroll problem by removing xfce4-indicator-plugin and indicator-application (I also removed all Unity indicator-* packages). This way Xfce can directly use the notification area. Another solution was to use dbus-launch nm-applet http://askubuntu.com/questions/449658/networkmanager-tray-nm-applet-is-gone-after-upgrade-to-14-04-trusty#comment806285_458800

Revision history for this message
Yanpas (yanpaso) wrote :

Thank you man! I'm happy to get rid of this crappy and nasty indicators (which are not linux-way). I've installed xfce4-mixer and xfce4-battery-plugin. Removed indicator-messages xfce4-indicator-plugin xchat-indicator indicator-application xfce4-indicator-plugin

Changed in gtk:
status: New → Confirmed
Revision history for this message
Kevin Brubeck Unhammer (unhammer) wrote :

Removing xfce4-indicator-plugin and indicator-application fixed not only network-manager's menu, but also Skype and any other menu that I see.

(I would've liked having the indicator sound menu, but it's not worth it.)

Revision history for this message
jamina1 (jamina1) wrote :

Unfortunately the "solution" from @unhammer removes the messaging applet and the sound control, which isn't really a usable fix for me.

Revision history for this message
Darin (newhoa) wrote :

This is worse than ever in Xubuntu 17.04. And since they have removed the XFCE4 mixer plugin from the repositories, I don't know a way to have volume control after having removed the indicator plugin.

Changed in gtk:
status: Confirmed → Expired
Revision history for this message
trideceth12 (trideceth12) wrote :

Xubuntu 17.10 still affected.

Remvoing xfce4-indicator-plugin and indicator-application fixed it for me

Revision history for this message
gregg128 (gregg128) wrote :

It's still there in 18.10 :(

Revision history for this message
Kent Asplund (hoglet) wrote :

It got worse in 18.04. Now the workaround does not work any more.

And it is ignored by GTK people.....

Revision history for this message
baptx (b4ptx) wrote :

I can confirm that my workaround (removing indicator packages) does not work anymore with Xubuntu 18.10. Even using "dbus-launch nm-applet" workaround does not work anymore. You can easily reproduce the issue by having WiFi switched off and when you switch it on, you will have to scroll to see all the network names.
Another problem now is that when I click on the network manager system trail button to connect to network for example, I cannot use button anymore for several seconds and have to wait so it becomes available. I don't know if this issue is related.
If there is no other workaround, users could switch to Lubuntu which has the menu bar at the bottom by default and it now comes preinstalled with LXQt (the creator of LXDE switch from GTK to Qt because he was not satisfied).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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