summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-27 13:37:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-27 13:37:15 +0000
commit6702b248463bc6d33332cc96be4309f4f4fc5037 (patch)
treeaee7251c3a4dec5475d1dfa6b447db3fe3478628 /perl-install
parenta4bf5454a6181c5d340b79dfc6472fa35ee67711 (diff)
downloaddrakx-backup-do-not-use-6702b248463bc6d33332cc96be4309f4f4fc5037.tar
drakx-backup-do-not-use-6702b248463bc6d33332cc96be4309f4f4fc5037.tar.gz
drakx-backup-do-not-use-6702b248463bc6d33332cc96be4309f4f4fc5037.tar.bz2
drakx-backup-do-not-use-6702b248463bc6d33332cc96be4309f4f4fc5037.tar.xz
drakx-backup-do-not-use-6702b248463bc6d33332cc96be4309f4f4fc5037.zip
strange protection against ensure_focus generating a "focus" event causing a
dead-loop (reminder: ensure_focus helps ensuring a widget is focused)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/my_gtk.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 8bbd6a7a8..312d903f2 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -840,7 +840,12 @@ sub _create_window($$) {
$w->signal_connect(delete_event => sub { $w->destroy; die 'wizcancel' });
$w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position};
- $w->signal_connect(focus => sub { Gtk->idle_add(sub { $w->ensure_focus($_[0]); 0 }, $_[1]) }) if $w->can('ensure_focus');
+ my $focusing;
+ $w->signal_connect(focus => sub {
+ return 1 if $focusing;
+ $focusing = 1;
+ Gtk->idle_add(sub { $w->ensure_focus($_[0]); $focusing = 0; 0 }, $_[1]);
+ }) if $w->can('ensure_focus');
if ($::o->{mouse}{unsafe}) {
$w->set_events("pointer_motion_mask");