diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-12 21:16:09 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-12 21:16:09 +0000 |
commit | 4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2 (patch) | |
tree | 3101d334f197c1912d11c2182f55a57d0551c142 /perl-install/install_steps_gtk.pm | |
parent | ef9cf6c94dd36993441c07a566bbfcca1592ea1e (diff) | |
download | drakx-4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2.tar drakx-4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2.tar.gz drakx-4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2.tar.bz2 drakx-4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2.tar.xz drakx-4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 32b78c041..42e017f81 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -178,16 +178,25 @@ sub selectInstallClass1 { #------------------------------------------------------------------------------ sub selectMouse { my ($o, $force) = @_; - my $old = $o->{mouse}{XMOUSETYPE}; + my %old = %{$o->{mouse}}; $o->SUPER::selectMouse($force); - if ($old ne $o->{mouse}{XMOUSETYPE} && !$::testing) { + my $set = sub { + my ($mouse) = @_; + symlinkf($mouse->{device}, "/dev/mouse"); + c::setMouseLive($ENV{DISPLAY}, mouse::xmouse2xId($mouse->{XMOUSETYPE})); + }; + + if ($old{XMOUSETYPE} ne $o->{mouse}{XMOUSETYPE}) { log::l("telling X server to use another mouse"); eval { commands::modprobe("serial") } if $o->{mouse}{device} =~ /ttyS/; - symlinkf($o->{mouse}{device}, "/dev/mouse"); - my $id = mouse::xmouse2xId($o->{mouse}{XMOUSETYPE}); - log::l("XMOUSETYPE: $o->{mouse}{XMOUSETYPE} = $id"); - c::setMouseLive($ENV{DISPLAY}, $id); + + $set->($o->{mouse}) unless $::testing; + + install_gtk::test_mouse($o->{mouse}) and return; + + $set->(\%old); + goto &selectMouse; } } |