[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Gtk2::MenuItem on a StatusIcon disapears on mouse-up
- From: Grant McLean <grant mclean net nz>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk2::MenuItem on a StatusIcon disapears on mouse-up
- Date: Mon, 11 Jun 2007 15:09:43 +1200
On Mon, 2007-06-11 at 14:59 +1200, Grant McLean wrote:
> Hi
>
> I think your problem is due to the fact that when you call $menu->popup
> you're passing a 0 for the last parameter (the activate time). What you
> need to do is pass $event->time.
Perhaps it might be a good idea to amend the example accordingly:
--- Gtk2/examples/cellrenderer_popup.pl 10 Jul 2004 02:52:54 -0000
1.9
+++ Gtk2/examples/cellrenderer_popup.pl 11 Jun 2007 03:08:48 -0000
@@ -209,7 +209,7 @@
$menu->set_active ($cell->{index});
$menu->popup (undef, undef,
\&menu_pos_func, [$widget, $cell_area],
- $event ? $event->button : 0, 0);
+ $event ? $event->button : 0, $event->time);
$item = $menu->get_active;
$menu->select_item ($item) if $item;
Cheers
Grant
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]