#events and timeouts $eventbox->signal_connect('button_release_event', \&click); # add a left click binding $eventbox->signal_connect('button_press_event', \&click); #handles tray clicks sub click { #left mouse button if ($_[1]->button == 1) { #Window show/hide controls if ( $current_controls != 0) { #&interface; if ( $visible == 0) { $visible = 1 } if ( $visible == 1) { $visible = 0 } } ################################ # call the interface window if a left click is done &interface; ############################## } #right mouse button elsif ($_[1]->button == 3) { &menu; } return 1; }