Re: TrayIcon on Win32 Entry point error

On Wed, 29 Oct 2008 13:02:07 +0000
Emmanuele Bassi <ebassi gmail com> wrote:

On Wed, 2008-10-29 at 08:47 -0400, zentara wrote:

I wrote a generic outline for a Gtk2::TrayIcon app at 

... Gtk2::TrayIcon is not meant to be used anymore. use a new Gtk2
module compiled against gtk+ >= 2.10 and Gtk2::StatusIcon, which is
portable and does not require another dependency.

beware that Gtk2::TrayIcon and Gtk2::StatusIcon are *not* 1:1
equivalent, exactly because StatusIcon is meant to be portable across
different platforms.


I running into one glitch with Statusicon. My icons have a transparent background,
and with TrayIcon and the Eventbox, the right click menu never corrupted the transparent
However, with StatusIcon, it is not a Gtk2 Widget, and when the right click popup menu
is invoked on it, remnants of the menu window remain as artifacts in the transparent icon's
background, after the menu is closed.

I can see 2 fixes:
1 Use icon images that do not have a transparent background. Easiest.

2. Somehow make the menu appear off of the corner of the icon, so they don't
overlap.  I did try the 

(x, y, push_in) = Gtk2::StatusIcon::position_menu (menu, x, y, icon)

where :
           This function can be used as the menu_pos_func argument to

as in 

      $menu->popup( undef, undef, \&menu_pos_func , undef, 0, 0 );

sub menu_pos_func{
   return   Gtk2::StatusIcon::position_menu ($menu, 100, 100, $icon);


  But no luck and alot of errors.

Would you happen to know how to pop the menu at an offset from the mouse position?


I'm not really a human, but I play one on earth. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]