I'm guessing it's your test subroutine. It looks like once you click the button that it will go into an infinite loop. I don't know the Gtk stuff, but I'd imagine that until test returns, you can't process the next event in the message loop. And since it looks like it's looping as fast as it can, it should make your system a bit more sluggish.
I simplified your test routine a little just so I could see what was going on. I didn't attempt to fix any bugs though, due to my aforementioned ignorance of perl GUI programming.
sub test { OUTER: # how is $die getting set? while ($die != 1) { # if magic != 1, we're buzzing as fast as # we can in this while loop. if ($magic == 1) { while (1) { if ( $magic == 2) { for (;;) { # buzzing in loop again... if ( $magic == 1) { last}; } } print "happy\n"; last OUTER if $die == 1; if ( $magic == 0) { last}; } } } }
...roboticus
In reply to Re: Gtk2: Message dialog
by roboticus
in thread Gtk2: Message dialog
by deadpickle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |