From e0228a8f6ffce2fee9ffa965ac8b343b8b1c8c1a Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 7 Mar 2003 22:50:46 +0000 Subject: refine the already dirty code to workaround gtk bug leading to bugzilla #1445 (clicking two times too fast still lead to same problem) --- perl-install/ugtk2.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 3d3027064..1e23d61d0 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1240,7 +1240,8 @@ sub ask_browse_tree_info_given_widgets { $w->{tree}->signal_connect(key_press_event => sub { my $c = chr($_[1]->keyval & 0xff); if ($_[1]->keyval >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ') { - Gtk2->timeout_add(1, sub { $toggle->(0), 0 }) + Gtk2->update_ui; #- ultra dirty hackish so that gtk + Gtk2->timeout_add(1, sub { $toggle->(0), 0 }) #- will not loop forever } 0; }); @@ -1260,6 +1261,7 @@ sub ask_browse_tree_info_given_widgets { #- two changed events, the first being on a different row :/ (is it a bug in gtk2?) - that #- happens in rpmdrake when doing a "search" and directly trying to select a found package if ($mouse_toggle_pending eq $model->get($iter, 0)) { + Gtk2->update_ui; Gtk2->timeout_add(1, sub { $toggle->(1), $mouse_toggle_pending = 0 }); } 0; -- cgit v1.2.1