--- deliantra/Deliantra-Client/DC.pm 2006/06/07 06:28:28 1.91 +++ deliantra/Deliantra-Client/DC.pm 2006/07/02 13:57:57 1.95 @@ -27,6 +27,7 @@ use AnyEvent (); use BerkeleyDB; use Pod::POM (); +use Scalar::Util (); use Storable (); # finally package CFClient::PodToPango; @@ -293,7 +294,7 @@ $w = undef; } ); - $entry->focus_in; + $entry->grab_focus; $w->show; } @@ -301,6 +302,9 @@ sub update_widgets { my ($self) = @_; + # necessary to avoid cyclic references + Scalar::Util::weaken $self; + my $button_cb = sub { my (undef, $ev, $x, $y) = @_; @@ -454,13 +458,15 @@ my $w = new CFClient::UI::FancyFrame title => "Bind Action", - x => "center", - y => "center"; + x => "center", + y => "center", + z => 1000, + has_close_button => 1; $w->add (my $vb = new CFClient::UI::VBox); $vb->add (new CFClient::UI::Label text => "Press a modifier (CTRL, ALT and/or SHIFT) and a key." - ."You can only bind 0-9 and F1-F15 without modifiers." + . "You can only bind 0-9 and F1-F15 without modifiers." ); $vb->add (my $entry = new CFClient::UI::Entry text => "", @@ -486,14 +492,14 @@ return; } - $entry->focus_out; + $entry->grab_focus; $cb->($mod, $sym); $w->destroy }); - $entry->focus_in; + $entry->grab_focus; $w->show; }