From a4299593feb14ed8317da49980b8c06e59688aa2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 14 Apr 2000 23:59:01 +0000 Subject: no_comment --- perl-install/my_gtk.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'perl-install/my_gtk.pm') diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 2c0c185d3..a2aa953bf 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -327,14 +327,15 @@ sub _create_window($$) { $w->signal_connect(focus => sub { Gtk->idle_add(sub { $w->ensure_focus($_[0]); 0 }, $_[1]) }) if $w->can('ensure_focus'); - $w->set_events("pointer_motion_mask"); - my $signal; - $signal = $w->signal_connect(motion_notify_event => sub { - delete $o->{mouse}{unsafe}; - log::l("unsetting unsafe mouse"); - $w->signal_disconnect($signal); - }) if $o->{mouse}{unsafe}; - + if ($::o->{mouse}{unsafe}) { + $w->set_events("pointer_motion_mask"); + my $signal; + $signal = $w->signal_connect(motion_notify_event => sub { + delete $::o->{mouse}{unsafe}; + log::l("unsetting unsafe mouse"); + $w->signal_disconnect($signal); + }); + } $w->signal_connect(key_press_event => sub { my $d = ${{ 65470 => 'help', 65481 => 'next', -- cgit v1.2.1