summaryrefslogtreecommitdiffstats
path: root/perl-install/my_gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r--perl-install/my_gtk.pm17
1 files changed, 9 insertions, 8 deletions
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',