StatusIcon color shift on blinking


I'm trying to convert a script from using TrayIcon to StatusIcon.
All is going well except for some color changing during blinking.

Using a previous example by Emmanuel Rodriguez ( I added a blink button
to the menu); I get a background color change on ICE Window Manager, where
my tray is black. Can anyone run this, and tell me if it's due to ICEWM, or
is there a way to maintain color during flashing.

use strict;
use warnings;
use Glib qw(TRUE FALSE);
use Gtk2 '-init';

exit main();

sub main {

    # Create a system tray icon
    my $tray = Gtk2::StatusIcon->new_from_stock('gtk-color-picker');
    # Build the tray's popup menu
    my $tray_menu = Gtk2::Menu->new();
    # Add a blinking menu item
    my $menu_item_blink = Gtk2::ImageMenuItem->new('Blink');
    $menu_item_blink->signal_connect(activate => sub {

    # Add a close menu item
    my $menu_item_close = Gtk2::ImageMenuItem->new_from_stock('gtk-close');
    $menu_item_close->signal_connect(activate => sub {


    # Show the menu when there's a right click
    $tray->signal_connect('popup-menu' => sub {
            my ($tray, $button, $time) = @_;

    # Start the main loop
    return 0;

Thanks, zentara

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]