summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm19
1 files changed, 7 insertions, 12 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 4562bc127..6144af723 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -168,29 +168,24 @@ sub selectInstallClass1 {
#------------------------------------------------------------------------------
sub selectMouse {
my ($o, $force) = @_;
-
- my $set = sub {
- my ($mouse) = @_;
- symlinkf($mouse->{device}, "/dev/mouse");
- c::setMouseLive($ENV{DISPLAY}, mouse::xmouse2xId($mouse->{XMOUSETYPE}));
- };
-
my %old = %{$o->{mouse}};
$o->SUPER::selectMouse($force);
- $old{type} eq $o->{mouse}{type} && $old{name} eq $o->{mouse}{name} && !$force and return;
+ my $mouse = $o->{mouse};
+ $old{type} eq $mouse->{type} && $old{name} eq $mouse->{name} && !$force and return;
local $my_gtk::grab = 1; #- unsure a crazy mouse don't go wild clicking everywhere
while (1) {
log::l("telling X server to use another mouse");
- eval { modules::load('serial') } if $o->{mouse}{device} =~ /ttyS/;
+ eval { modules::load('serial') } if $mouse->{device} =~ /ttyS/;
if (!$::testing) {
- symlinkf($o->{mouse}{device}, "/dev/mouse");
- c::setMouseLive($ENV{DISPLAY}, mouse::xmouse2xId($o->{mouse}{XMOUSETYPE}));
+ symlinkf($mouse->{device}, "/dev/mouse");
+ c::setMouseLive($ENV{DISPLAY}, mouse::xmouse2xId($mouse->{XMOUSETYPE}), $mouse->{nbuttons} < 3);
}
- install_gtk::test_mouse($o->{mouse}) and return;
+ install_gtk::test_mouse($mouse) and return;
$o->SUPER::selectMouse(1);
+ $mouse = $o->{mouse};
}
}