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 617992 - percentage tooltips don't get updated
percentage tooltips don't get updated
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: multiload
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 423676 603747 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-05-07 07:41 UTC by max ulidtko
Modified: 2011-11-14 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the patch (4.03 KB, application/octet-stream)
2010-05-07 07:41 UTC, max ulidtko
Details

Description max ulidtko 2010-05-07 07:41:15 UTC
Created attachment 160490 [details]
the patch

When i hover mouse cursor over one of multiload graphs, a tooltip with according details appears. But the tooltip seams to be static, its text doesn't change according to new data arriving to the graph.

The function responsible for updating the tooltip is multiload_applet_tooltip_update(), which is called from load_graph_update(), which is timer callback. The call is conditional and depends on whether the tooltip_update property of LoadGraph is set. It is set in multiload_enter_cb() and cleared back in multiload_leave_cb(). But, it turns out that multiload_leave_cb() is called immediately after multiload_enter_cb(). Here is a gdb session, where the breakpoint triggered immediately after moving cursor into graph:

Reading symbols from /home/max/src/gnome-applets/multiload/multiload-applet-2...done.
(gdb) break multiload_leave_cb 
Breakpoint 1 at 0x804cbf3: file main.c, line 225.
(gdb) run
Starting program: /home/max/src/gnome-applets/multiload/multiload-applet-2 
[Thread debugging using libthread_db enabled]

Breakpoint 1, multiload_leave_cb (widget=0x80811f8, event=0x80dd240, data=0x80cb670) at main.c:225
225	{
(gdb) bt
  • #0 multiload_leave_cb
    at main.c line 225
  • #1 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.20.0/gtk/gtkmarshalers.c line 84
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 ??
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.20.0/gtk/gtkwidget.c line 4951
  • #7 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.20.0/gtk/gtkmain.c line 1660
  • #8 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.20.0/gdk/x11/gdkevents-x11.c line 2372
  • #9 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #10 ??
    from /lib/libglib-2.0.so.0
  • #11 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #12 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #13 bonobo_generic_factory_main_timeout
    from /usr/lib/libbonobo-2.so.0
  • #14 bonobo_generic_factory_main
    from /usr/lib/libbonobo-2.so.0
  • #15 panel_applet_factory_main_closure
    from /usr/lib/libpanel-applet-2.so.0
  • #16 panel_applet_factory_main
    from /usr/lib/libpanel-applet-2.so.0
  • #17 main
    at main.c line 567
$1 = GDK_NOTIFY_INFERIOR


The documentation says about GDK_NOTIFY_INFERIOR: "the window is entered from an inferior or left towards an inferior". The enter and leave signals are being connected to the panel widget, so upon hovering cursor there, they first arrive to the widget, and then traverse down to appropriate child, generating leave event with GDK_NOTIFY_INFERIOR flag for the parent.

So the fix itself is in moving the dispatching of hover signals to the LoadGraph's bottommost widgets. Patch is included.
Comment 1 max ulidtko 2010-05-07 07:46:25 UTC
bug #423676 describes the save issue, i.e. is duplicate
Comment 2 max ulidtko 2010-05-07 08:06:12 UTC
also, the patch fixes bug #556858. Tooltip updating should not involve changing  graph's data in any case.
Comment 3 Callum McKenzie 2010-06-21 19:48:34 UTC
The patch looks good and I've committed it to master. Thanks for the ping.
Comment 4 Callum McKenzie 2010-06-21 19:50:13 UTC
*** Bug 423676 has been marked as a duplicate of this bug. ***
Comment 5 Robert Roth 2011-11-14 19:28:51 UTC
*** Bug 603747 has been marked as a duplicate of this bug. ***